Skip to content

Instantly share code, notes, and snippets.

@samdenty
samdenty / README.MD
Last active June 7, 2024 10:02
VS Code CSS addition to increase readability on file tree.

How to install

Custom CSS plugin

Install the custom CSS plugin, then make a file on your computer that will hold your custom CSS, I like to make one in my home directory called ~/.vscodestyles.css and then add the CSS into it.

Once done, open your command palette and select enable custom CSS and JS

@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.

@paulegan
paulegan / bookmarklet.js
Last active March 5, 2017 00:39
Bookmarklet for sorting feedly entries by engagement
javascript:(function () {
function engagement(entry) {
var e = entry.querySelector('[data-dot="engagement-count"]');
if (e) {
var t = e.innerText;
var x = t[t.length - 1] === 'K' ? 1000 : 1;
return parseInt(t) * x;
} else {
return 0;
}
@enjalot
enjalot / cors_server.py
Created June 10, 2012 06:19
Allow CORS with python simple http server
import SimpleHTTPServer
class CORSHTTPRequestHandler(SimpleHTTPServer.SimpleHTTPRequestHandler):
def send_head(self):
"""Common code for GET and HEAD commands.
This sends the response code and MIME headers.
Return value is either a file object (which has to be copied
to the outputfile by the caller unless the command was HEAD,
and must be closed by the caller under all circumstances), or