profile
viewpoint
Trevor Sibanda trevorsibanda Bulawayo, Zimbabwe https://medium.com/sibandatrevor/ Software Engineer. Previously @faunadb, @golixdotcom . Interned @snowplow explo(r|it)ing boundaries

slick/slick 2413

Scala Language Integrated Connection Kit

trevorsibanda/oneshop 5

Working shopify clone written in PHP

trevorsibanda/mdefender 1

My first attempt at writing an antivirus software back in high school. Decided to upload this buggy legacy code. Uses YARA malware analysis engine and a sqlite database of malware hashes. NB: This is the most embarassing code I've written... ever

trevorsibanda/activator 0

Typesafe Activator

trevorsibanda/algorithms 0

Implementation of algorithms in different languages. For educational purposes

trevorsibanda/argon-dashboard 0

Argon - Dashboard for Bootstrap 4 by Creative Tim

trevorsibanda/cbt 0

CBT - fun, fast, intuitive, compositional, statically checked builds written in Scala

trevorsibanda/colladoc.github.com 0

The Colladoc Homepage

trevorsibanda/condom.email 0

Free disposable email address with forwarding and API access built in Scala

issue closedtypelevel/cats

Why is a List not a functor?

I started reading the book scala with cats and it states that Option, List, and Either are all functors.

Screen Shot 2020-12-25 at 14 14 40

I created a simple method

  def foo(a: Functor[Int]) : Functor[Int] = {
    a
  }
 foo(List(1,2,3))

but this does not work because List(1,2,3) is not a functor Screen Shot 2020-12-25 at 14 17 23

so please what exactly is a Functor? What do I have to pass to the function to make is compile?

I have the same issue with

  • Applicatives
  • Monads

Please have some patience with me, I just want to understand these concepts and have a mental model or visual representation of what these are.

When someone says create a list, sequence or an option of something, I know straight away that a list is List() a sequence is Seq() and option is Some() but I do not have the model for Functors, Monads and Applicatives.

Please if You can explain this using simple words, I will be grateful. thank you

closed time in 12 hours

SarpongAbasimi

startedgoogle/aistplusplus_api

started time in 17 hours

push eventtwitter/finagle

Christopher Coco

commit sha 4773a06381c4febe058b94d91543ba474557ea90

oss: Update README copyright year to 2021 Problem We've crossed into a new year and our copyright ranges are now out of date. Solution Update them to 2021. JIRA Issues: CSL-10577 Differential Revision: https://phabricator.twitter.biz/D606603

view details

push time in 20 hours

startedshoreofwonder/OpenSyringePump

started time in 21 hours

push eventtwitter/finagle

Ryan O'Neill

commit sha 1422ffd5b35cfe01374b90122b671b2c69043ad7

finagle-core: Add Name.bound Variant Which Takes a Service Problem For testing Finagle clients, it's extremely useful to be able to pass it a `Service` directly that the client can use instead of talking to a server. This is possible because Finagle has a unified interface between client and server where a server exports a `Service` and a client imports it. Many long time Finagle users don't know that this is possible though because to go from a `Service` to a `Name` (which is necessary for `EndpointerStackClient.newService` et al.) requires multiple hops from `Service` to `ServiceFactory` to `Address` to `Name`. Solution Provide an alternative to `Name.bound` which can take in a `Service` directly and handles the necessary hops for the user. Differential Revision: https://phabricator.twitter.biz/D605745

view details

push time in a day

issue commenttrekhleb/javascript-algorithms

Linear Search Fix

I have already added a PR for the same please check.

Kachhadiyn

comment created time in a day

pull request commentfauna/faunadb-go

fix: clean module file.

Do you plan to merge this PR or I have to close in favor of #126?

ldez

comment created time in a day

delete branch fauna/faunadb-jvm

delete branch : combine-fields

delete time in a day

push eventfauna/faunadb-jvm

Marrony Neris

commit sha 0ce9554e3463aad42d05b7bfbae391ad1f7c9951

Adds ability to combine fields + some tests

view details

Marrony Neris

commit sha 4dd4cc03f7b72044f7c3a186bd17cc80d0a77d71

Merge pull request #152 from fauna/combine-fields Adds ability to combine fields + some tests

view details

push time in a day

PR merged fauna/faunadb-jvm

Adds ability to combine fields + some tests

the main goal here is to adds the ability to combine 2 pre-existent Field. Currently we have the ability to:

val DataField = Field("data")
val ZField = DataField("x", "y", "z")

but we cannot do combine pre-existents fields, so now can can do:

val DataField = Field("data")
val XField = Field("x")
val YField = Field("y")
val ZField = DataField.at(XField).at(YField)

I also created a FieldSpec to tests some of the field extractions

+126 -0

5 comments

3 changed files

marrony

pr closed time in a day

Pull request review commentfauna/faunadb-jvm

Adds ability to combine fields + some tests

+package faunadb++import faunadb.values._+import org.scalatest.flatspec.AnyFlatSpec+import org.scalatest.matchers.should.Matchers++class FieldSpec extends AnyFlatSpec with Matchers {+

nice spec

marrony

comment created time in a day

push eventtypelevel/cats

Shohei Shimomura

commit sha 88ccb7a67b884eecea8d41e7fa735d23f5788b5c

Adjust to GitHub Actions (#3745)

view details

push time in a day

PR merged typelevel/cats

Adjust to GitHub Actions
+2 -10

0 comment

2 changed files

sh0hei

pr closed time in a day

push eventfauna/faunadb-python

SZinkevych

commit sha 25596e556593400c152f4e5fc6727c0083c14f66

DRV-398 Support Bearer auth tokens

view details

Sergii Zinkevych

commit sha 079c3c65c6e8a94e9332fad7a9fea163b287c3d3

Merge pull request #176 from fireridlle/fix/drv-398_support_jwt_token_as_secret DRV-398 Support Bearer auth tokens

view details

push time in a day

PR merged fauna/faunadb-python

Reviewers
DRV-398 Support Bearer auth tokens

Issue Support for create_access_provider and related functions has been implemented, but the lack of Bearer token support means that Python-based client applications cannot succeed in using JWT tokens in place of secrets: they always receive the error Unauthorized.

Ho to test? follow instruction to obtain an access token

from faunadb import query as q
from faunadb.client import FaunaClient
from faunadb.objects import Ref

client = FaunaClient(
    secret='place jwt here',
)

print(client.query(q.paginate(q.documents(q.collection('users')))))


def on_start(event):
    print("started stream at %s"%(event.txn))

def on_version(event):
    print("on_version event at %s"%(event.txn))
    print("    event: %s"%(event.event))
    stream.close()

def on_error(event):
    print("Received error event %s"%(event))
options = {"fields": ["document", "diff"]}
stream = client.stream(q.ref(q.collection('users'), '282652881944838658'), options, on_start, on_error, on_version)
stream.start()

For regression, re-run the same code with server secret key

+31 -15

0 comment

3 changed files

fireridlle

pr closed time in a day

startedKoenkk/zigbee2mqtt

started time in a day

pull request commentfauna/faunadb-jvm

drv-305: add SplitStr & SplitStrRegex (Java)

@lregnier can you take a look on this PR? @agourlay can you rebase your work, GH is saying the branch is out of date

agourlay

comment created time in a day

pull request commentfauna/faunadb-jvm

drv-287: add SplitStr & SplitStrRegex (Scala)

@lregnier can you take a look on this PR? @agourlay can you rebase your work, GH is saying the branch is out of date

agourlay

comment created time in a day

push eventfauna/faunadb-jvm

Marrony Neris

commit sha 0ce9554e3463aad42d05b7bfbae391ad1f7c9951

Adds ability to combine fields + some tests

view details

push time in a day

pull request commentfauna/faunadb-jvm

Adds ability to combine fields + some tests

I rebased this to fix a conflict on README and is planning to merge as soon as the tests finishes

marrony

comment created time in a day

push eventfauna/faunadb-jvm

Erick Pintor

commit sha db70b386984f34f1f27c124090f982ab75b9c5da

reviewing documentation for the Java driver

view details

Erick Pintor

commit sha 4fa4c5153a7c0d18202efa5a54de963e30396bcb

Merge pull request #153 from fauna/inline-docs Reviewing documentation for the Java driver

view details

Erick Pintor

commit sha 3dc2f18af70f93907ac8de44c68a63a59b07c958

add missing instant encoder

view details

Erick Pintor

commit sha 00702087b2257da05f3d6cd9b173a4da266426ce

adding tests for Instant encoder and decoder

view details

Erick Pintor

commit sha c64b657344bfb5432a0bf3faa656d7c7a48f13e3

Merge pull request #154 from fauna/add-missing-encoder Add missing instant encoder

view details

Ryan Knight

commit sha dd341ffa2daf97b661112a67e3ba8b9d68732556

first pass at java docs

view details

Ryan Knight

commit sha aa7bd799c222535a4c71952f48bdbe083e72d7ff

adding user defined types

view details

Ryan Knight

commit sha 04c892434ea3025097f1d2a0e31bc85e6fa716ac

add examples of encoding and decoding list of user defined classes

view details

Ryan Knight

commit sha cb73251f43d2727a5afe1f50ba36fe45d36873b0

refining list examples

view details

Ryan Knight

commit sha 35c894a7329ce482b4108e2be81613232811f667

fixing java docs based on review

view details

Ryan Knight

commit sha eccb7b70d529fee32fffecb10ff82ab64b7a9881

fixing samples in docs

view details

Ryan Knight

commit sha 6d0f1624dc2b1d92d15018fbd0c0cb1763588351

additional fixes

view details

Ryan Knight

commit sha 58ffd7325b04b07ce25580c4c1a3471fd200bc8b

adding spell java class

view details

Ryan Knight

commit sha 842e62750356b74843f7f06d5d7c4f3ccfcfddfa

fixing java docs based on Ericks feedback

view details

Ryan Knight

commit sha 6594af10d792a1186ab53e451dc2f5da80218882

fixing spelling and closing client connection

view details

Ryan Knight

commit sha b7123247ebba04bbf941dddd0c25e15046f88fc7

removing pretty printing of json

view details

Ryan Knight

commit sha a672e383e5f4f9b2289a753de9e8393a9e3d0678

removing pretty printing of json

view details

Ryan Knight

commit sha a22e77795a485fb89e8c85ee2fbb4e3f38b9ae42

Merge pull request #155 from retroryan/java-docs First pass at the Java docs

view details

Ryan Knight

commit sha 3549d26f0e323c8f037ed21c9ac175062ec3e553

adding scala docs

view details

Ryan Knight

commit sha 7830b243c9dbac9ee9d7850dddaebb51d563eb1d

fixing formatting

view details

push time in a day

push eventfauna/fauna-shell

Stanislav Parkhomenko

commit sha c549ae74556ec4f225b9f2497647f1c2ab4bc0c6

DRV-384 | fix: fauna list-keys throws an error when there are no keys (#77) DRV-384 | fix: fauna list-keys throws an error when there are no keys

view details

push time in a day

PR merged fauna/fauna-shell

Reviewers
DRV-384 | fix: fauna list-keys throws an error when there are no keys

Notes

Jira Ticket

How to test

  1. Go to /fauna-shell in your terminal
  2. Run bin/run cloud-login
  3. Run bin/run list-keys with appropriate options for your current database
  4. Confirm that you see information about keys for your current database and its children provided you have created some children databases and secret keys

Screenshots

image

+104 -24

0 comment

3 changed files

parkhomenko

pr closed time in a day

PR opened fauna/faunadb-python

DRV-398 Support Bearer auth tokens

Issue Support for create_access_provider and related functions has been implemented, but the lack of Bearer token support means that Python-based client applications cannot succeed in using JWT tokens in place of secrets: they always receive the error Unauthorized.

Ho to test? follow instruction to obtain an access token

from faunadb import query as q
from faunadb.client import FaunaClient
from faunadb.objects import Ref

client = FaunaClient(
    secret='place jwt here',
)

print(client.query(q.paginate(q.documents(q.collection('users')))))


def on_start(event):
    print("started stream at %s"%(event.txn))

def on_version(event):
    print("on_version event at %s"%(event.txn))
    print("    event: %s"%(event.event))
    stream.close()

def on_error(event):
    print("Received error event %s"%(event))
options = {"fields": ["document", "diff"]}
stream = client.stream(q.ref(q.collection('users'), '282652881944838658'), options, on_start, on_error, on_version)
stream.start()
+31 -15

0 comment

3 changed files

pr created time in a day

PR closed fauna/faunadb-js

Reviewers
Fix FaunaDate test to ignore timezone

Notes

Test "Values › date" doesn't respect timezone

Actual result

Values › date

    expect(received).toEqual(expected) // deep equality

    Expected: "{\"@date\":\"1970-01-01\"}"
    Received: "{\"@date\":\"1969-12-31\"}"

      86 |     var test_date = new FaunaDate(new Date(1970, 0, 1))
      87 |     var test_date_json = '{"@date":"1970-01-01"}'
    > 88 |     expect(json.toJSON(test_date)).toEqual(test_date_json)
         |                                    ^
      89 |     expect(json.parseJSON(test_date_json)).toEqual(test_date)
      90 |   })
      91 | 

      at Object.test (test/values.test.js:88:36)

Expected result

Test should be passed

How to test

Set custom timezone (in my case GMT+3) and run test

jest --env=node --verbose=false ./test/values.test.js 
+1 -1

3 comments

1 changed file

fireridlle

pr closed time in a day

pull request commentfauna/faunadb-js

Fix FaunaDate test to ignore timezone

closed as PR https://github.com/fauna/faunadb-js/pull/372 has this fix

fireridlle

comment created time in a day

push eventfauna/faunadb-js

SZinkevych

commit sha f897264fd656ded331c9976dd67eec04ed910a0d

handle stream end the same fashion as for browser

view details

Stanislav Parkhomenko

commit sha c6f51d82f6dcfe653f1a0bcdfca8401422383273

Merge pull request #383 from fireridlle/fix/DRV-365_handle_nodejs_stream_end DRV-365 handle stream end the same fashion as for browser

view details

push time in a day

PR merged fauna/faunadb-js

DRV-365 handle stream end the same fashion as for browser

Notes

Stream termination due to core's one-hour limit does not cause an error event

stream throw end event for nodejs and error event for the browser (tested at chrome). i suppose it would be a good idea if the driver will silently reconnect when such a case raised.

to simulate the same behaviour as for browser, fix listen for end event and as soon as the event appears, fix convert it to an error event.

How to test

const faunadb = require('./index')
const q = faunadb.query
const util = require('util')

var client = new faunadb.Client({
  secret: 'XXXXXX'
})

;(async () => {
  await client.query(
  q.Paginate(q.Collections())
  )
  .then(ret => console.log(ret))
  .catch(err => console.error('Error: %s', err))
})()

var stream
function startStream() {
  stream = client.stream.document(q.Ref(q.Collection('Status'),
  '278763355019149825'))
  .on('snapshot', snapshot => {
    const m = util.inspect(snapshot, { showHidden: false, depth: null })
    console.log(m)
  })
  .on('version', version => {
    const m = util.inspect(version, { showHidden: false, depth: null })
    console.log(m)
    console.log(stream._client._state)
  })
  .on('error', error => console.error('Error: %s', error))
  .start()
}

Screenshots

+12 -1

0 comment

1 changed file

fireridlle

pr closed time in a day

issue commentdanielmiessler/SecLists

PR #559 supporting issue (as per CONTRIBUTING.md )

"please use ONE of the following methods to submit them" - CONTRIBUTING.md

TAbdiukov

comment created time in 2 days

PR opened danielmiessler/SecLists

Standard LDAP attribute and classes lists

Recently while working with an LDAP injection I noticed that a list good list of attributes and objects was missing from the repo. Thus, I created the below 4 lists:

  • Fuzzing/LDAP-active-directory-attributes.txt
  • Fuzzing/LDAP-active-directory-classes.txt
  • Fuzzing/LDAP-openldap-attributes.txt
  • Fuzzing/LDAP-openldap-classes.txt

These were obtained by extracting the schema from both a default install of a Windows 2019 server with AD services and a OpenLDAP with wide selection of schemas enabled (including Samba's OpenLDAP schema).

While there was some overlap between them (especially as OpenLDAP has a msuser.schema file and Windows has definitions for posixAccount, posixGroup, etc.), I think its best to keep them separate. But if needed, they can be merged.

For reference, the files were generated using a command such as:

ldapsearch -s base -b cn=Subschema  "(objectclass=*)" attributetypes -LLL | sed -e ':x N ; s/\n // ; tx ; P ; s/^.*\n//; tx' | grep -e '^a' | cut -d "'" -f 2 | sort -u 

Hope they are of some use.

+2726 -0

0 comment

4 changed files

pr created time in 2 days

more