Skip to content

Instantly share code, notes, and snippets.

Hacking my way through this world..

T.V.VIGNESH tvvignesh

Hacking my way through this world..
Block or report user

Report or block tvvignesh

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
fvigotti /
Created Oct 1, 2018
this is a sample script that clean old metrics from pushgateway, not very clean but working anyway, used as sample in a issue
trap 'echo "got sigterm" ; exit 0' SIGTERM
function convert_to_standardnotation(){
# convert number from scientific notation to standar d( ie '1.5383780136826127e+09' )
printf '%.0f' $1
GitRay /
Last active May 24, 2019 — forked from mrocklin/
Serialization benchmark
# This has been edited to work with python3. Some of the tested combinations will not work in python2.
import pandas as pd
df = pd.DataFrame({'text': [str(i % 1000) for i in range(1000000)],
'numbers': range(1000000)})
import pickle
# Python 3 has no cPickle
#import cPickle
import json
from functools import partial
Rich-Harris /
Last active Oct 17, 2019
Stuff I wish I'd known sooner about service workers

Stuff I wish I'd known sooner about service workers

I recently had several days of extremely frustrating experiences with service workers. Here are a few things I've since learned which would have made my life much easier but which isn't particularly obvious from most of the blog posts and videos I've seen.

I'll add to this list over time – suggested additions welcome in the comments or via

Use Canary for development instead of Chrome stable

Chrome 51 has some pretty wild behaviour related to console.log in service workers. Canary doesn't, and it has a load of really good service worker related stuff in devtools.

craigbeck / introspection-query.graphql
Created Apr 6, 2016
Introspection query for GraphQL
View introspection-query.graphql
query IntrospectionQuery {
__schema {
queryType { name }
mutationType { name }
subscriptionType { name }
types {
directives {
OlegIlyenko / Event-stream based GraphQL
Last active Oct 7, 2019
Event-stream based GraphQL subscriptions for real-time updates
View Event-stream based GraphQL

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.

You can’t perform that action at this time.