Skip to content

Instantly share code, notes, and snippets.


Orlin M Bozhinov orlin

  • Astrolet
  • Varna, Bulgaria
  • Twitter @orlin
View GitHub Profile
OlegIlyenko / Event-stream based GraphQL
Last active March 27, 2023 14:32
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.

jo /
Last active March 21, 2023 19:01
List of JavaScript Crypto libraries.

JavaScript Crypto Libraries

List some crypto libraries for JavaScript out there. Might be a bit out dated. Scroll to the bottom.


This specification describes a JavaScript API for performing basic cryptographic operations in web applications, such as hashing, signature generation and verification, and encryption and decryption. Additionally, it describes an API for applications to generate and/or manage the keying material necessary to perform these operations. Uses for this API range from user or service authentication, document or code signing, and the confidentiality and integrity of communications.

rbf /
Created September 14, 2015 10:09
Small script to download the binary of a release using curl.
# You can inspect the release by `tag` before to get the URL of the first asset.
# The you can download the release asset file (not the API object) by including the header 'Accept: application/octet-stream'
# NOTE: When downloading the binary file, don't forget to specify the name of the downloaded file (with -o <filename>).
# Otherwise the binary will be streamed into the terminal, doing weird unexpected things.
# Everything put together gives that script:
Rich-Harris /
Last active March 18, 2023 14:21
The truth about Svelte

I've been deceiving you all. I had you believe that Svelte was a UI framework — unlike React and Vue etc, because it shifts work out of the client and into the compiler, but a framework nonetheless.

But that's not exactly accurate. In my defense, I didn't realise it myself until very recently. But with Svelte 3 around the corner, it's time to come clean about what Svelte really is.

Svelte is a language.

Specifically, Svelte is an attempt to answer a question that many people have asked, and a few have answered: what would it look like if we had a language for describing reactive user interfaces?

A few projects that have answered this question:

erikh /
Created March 31, 2012 07:02 — forked from DAddYE/
OSX For Hackers
#!/usr/bin/env sh
# This is script with usefull tips taken from:
# install it:
# curl -sL | sh
bitmorse /
Created March 20, 2013 00:51
lastfm scrobble exporter (from // changed the script to try more often on failure )
#!/usr/bin/env python
#-*- coding: utf-8 -*-
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
JosephPecoraro / shell-execution.rb
Last active March 12, 2023 21:44
Shell Execution in Ruby
View shell-execution.rb
# Ways to execute a shell script in Ruby
# Example Script - Joseph Pecoraro
cmd = "echo 'hi'" # Sample string that can be used
# 1. Kernel#` - commonly called backticks - `cmd`
# This is like many other languages, including bash, PHP, and Perl
# Synchronous (blocking)
# Returns the output of the shell command
# Docs:
RubenSomsen /
Last active March 5, 2023 01:13
Silent Payments – Receive private payments from anyone on a single static address without requiring any interaction or extra on-chain overhead

Silent Payments

Receive private payments from anyone on a single static address without requiring any interaction or extra on-chain overhead.


The recipient generates a so-called silent payment address and makes it publicly known. The sender then takes a public key from one of their chosen inputs for the payment, and uses it to derive a shared secret that is then used to tweak the silent payment address. The recipient detects the payment by scanning every transaction in the blockchain.

Compared to previous schemes[^1], this scheme avoids using the Bitcoin blockchain as a messaging layer[^2] and requires no interaction between sender and recipient[^3] (other than needing to know the silent payment address). The main downsides are the scanning requirement, the lack of light client support, and the requirement to control your own input(s). An example use case would be private one-time donations.

othiym23 /
Created September 20, 2014 19:36
a safe way to upgrade all of your globally-installed npm packages
set -e
set -x
for package in $(npm -g outdated --parseable --depth=0 | cut -d: -f3)
npm -g install "$package"
venkateshshukla / AndroidDevLinux
Last active February 25, 2023 22:33
Setting up your Linux for Android Application Development
View AndroidDevLinux
Step 1. Preparation
First take care of the dependencies for Android Application Development.
Dependencies are -
1. Java
2. ant
3. Eclipse and Android Development tools (IDE)
4. Android SDK and NDK
5. adb