Skip to content

Instantly share code, notes, and snippets.

@jisqyv
jisqyv / firstemail.html
Created March 26, 2019 22:24 — forked from CrystalOnScript/firstemail.html
Create your first AMP email
<!doctype html>
<html ⚡4email>
<head>
<meta charset="utf-8">
<script async src="https://cdn.ampproject.org/v0.js"></script>
<script async custom-element="amp-bind" src="https://cdn.ampproject.org/v0/amp-bind-0.1.js"></script>
<script async custom-element="amp-carousel" src="https://cdn.ampproject.org/v0/amp-carousel-0.1.js"></script>
<style amp4email-boilerplate>body{visibility:hidden}</style>
<style amp-custom>

Keybase proof

I hereby claim:

  • I am jisqyv on github.
  • I am jisqyv (https://keybase.io/jisqyv) on keybase.
  • I have a public key whose fingerprint is 6B4B 5E0B 9234 AD31 81E3 C74D 7956 8B66 3064 DFA9

To claim this, I am signing this object:

#!/bin/bash
set -eu
shopt -s nullglob
readonly base_dir=/var/lib/docker/registry
readonly output_dir=$(mktemp -d -t trace-images-XXXX)
readonly jq=/usr/bin/jq
readonly repository_dir=$base_dir/repositories
import os
from StringIO import StringIO
import json
import sys
import subprocess
import shutil
def getParent(rootid, id):
print "--> ", id
@jisqyv
jisqyv / mywallet.py
Last active August 29, 2015 14:10 — forked from anfedorov/mywallet.py
#!/usr/bin/env python
import base64, hashlib, hmac, json, sys, getpass
from Crypto.Cipher import AES
from Crypto.Hash import RIPEMD, SHA256
base58_chars = '123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz'
def prompt(p):
return getpass.getpass(p + ": ")
/*
* object.watch polyfill
*
* 2012-04-03
*
* By Eli Grey, http://eligrey.com
* Public Domain.
* NO WARRANTY EXPRESSED OR IMPLIED. USE AT YOUR OWN RISK.
*/

2-of-3 Escrow Example with Electrum

This is gmaxwell's 2-of-2 escrow example, adapted to Electrum and to a lesser extent, GFM.

The Scenario

Archey wants to pay Bertha 0.001 BTC for a Twitter Platinum invite, but prevent Bertha from cheating him. Archey selects Iceland to act as

1. Introduction to the replicator database

A database where you PUT/POST documents to trigger replications and you DELETE to cancel ongoing replications. These documents have exactly the same content as the JSON objects we used to POST to /_replicate/ (fields "source", "target", "create_target", "continuous", "doc_ids", "filter", "query_params".

Replication documents can have a user defined "_id". Design documents (and _local documents) added to the replicator database are ignored.

The default name of this database is _replicator. The name can be changed in the .ini configuration, section [replicator], parameter db.

2. Basics

@jisqyv
jisqyv / gist:3252498
Created August 3, 2012 23:13 — forked from ap/gist:624446
Git goodies: a grab bag
# you need this
alias gg='git grep -E'
# highlighted diff goodness is not just for git repos any more
alias diff='git diff --no-index'
# qf=quickfix
git config --global alias.qf 'commit --amend -C HEAD'
# Git Is My Refactoring IDE: edit all files that contain a particular pattern
@jisqyv
jisqyv / gist:3199087
Created July 29, 2012 14:06 — forked from danparsons/gist:3195652
How to stream the London 2012 Olympics

How to stream the London 2012 Olympics

There have been several HOWTOs posted regarding streaming the 2012 Olympics using HTTP / SOCKS proxies via SSH and other similar methods. None of these actually work using the latest Flash on Mountain Lion (with Firefox, Chrome or Safari). Additionally, the third-party streaming sites don't provide BBC's amazing interface, which lets you quickly skip to individual competitors and events. However, setting up an OpenVPN server does work, with some tweaks. You'll get the exact same UX that people in England receive.