Skip to content

Instantly share code, notes, and snippets.

View shafqatevo's full-sized avatar

Shafqat Ullah shafqatevo

View GitHub Profile
package sample.hello
import akka.actor.ActorSystem
import akka.actor.Props
import akka.actor.UntypedActor
import akka.actor.UntypedActorContext
import akka.actor.ActorPath
import scala.concurrent.duration.Duration
import java.util.HashMap
import akka.actor.ActorSystem
@staltz
staltz / introrx.md
Last active July 29, 2024 05:55
The introduction to Reactive Programming you've been missing
@kim0
kim0 / linux-tc-notes-sch-hfsc-fq_codel.txt
Created July 31, 2015 19:47
linux-tc-notes-sch-hfsc-fq_codel.txt
Tutorial [Copied from: http://linux-tc-notes.sourceforge.net/tc/doc/sch_hfsc.txt]
========
HFSC stands for Hierarchical Fair Service Curve. Unlike its
cousins CBQ and HTB it has a rigorous mathematical foundation that
delivers a guaranteed outcome. In practice that means it does a
better job than either CBQ or HTB, both of which are essentially
best effort guesses at solving what is a surprisingly complex
problem. Both of them get it wrong in subtle ways which show up
as them not meeting their bandwidth and latency guarantees.
@smarr
smarr / truffle-material.md
Last active May 14, 2024 07:48
Truffle: Languages and Material
@OlegIlyenko
OlegIlyenko / Event-stream based GraphQL subscriptions.md
Last active July 4, 2024 07:31
Event-stream based GraphQL subscriptions for real-time updates

In this gist I would like to describe an idea for GraphQL subscriptions. It was inspired by conversations about subscriptions in the GraphQL slack channel and different GH issues, like #89 and #411.

Conceptual Model

At the moment GraphQL allows 2 types of queries:

  • query
  • mutation

Reference implementation also adds the third type: subscription. It does not have any semantics yet, so here I would like to propose one possible semantics interpretation and the reasoning behind it.

@ochrons
ochrons / WorkerMain.scala
Created May 25, 2016 19:59
Web Worker PoC in Scala.js
package poc
import org.scalajs.dom
import scala.scalajs.js
import scala.scalajs.js.annotation.JSExport
@js.native
object WorkerGlobal extends js.GlobalScope {
def addEventListener(`type`: String, f: js.Function): Unit = js.native
@simenbrekken
simenbrekken / schema.js
Created December 21, 2016 14:06
Firebase backed GraphQL schema
import firebase from 'firebase'
import { filter, map } from 'lodash'
import { makeExecutableSchema } from 'graphql-tools'
firebase.initializeApp({
databaseURL: 'https://grafire-b1b6e.firebaseio.com',
})
const mapSnapshotToEntity = snapshot => ({ id: snapshot.key, ...snapshot.val() })
const mapSnapshotToEntities = snapshot => map(snapshot.val(), (value, id) => ({ id, ...value }))
@aturley
aturley / pony-considerations.md
Last active March 17, 2023 03:21
Information about Pony based on the items outlined in https://twitter.com/casio_juarez/status/898706225642086400

Pony Considerations

If you're thinking of checking out the Pony programming language, here's a list of things that I think are important to know. This list is based on a Tweet that I wrote.

Editor/IDE support

There are Pony packages for several popular editors.

interface Package
object Echo : Package
object Broadcast : Package
data class Children(val response: Receptionist.Listing) : Package
val childrenServiceKey: ServiceKey<Echo> = ServiceKey.create(Echo::class.java, "children")
val father: Behavior<Package> = Behaviors.setup<Package> { ctx ->
val receptionistAdapter = ctx.messageAdapter(Receptionist.Listing::class.java) { Children(it) }