We'll use NixOps to deploy, so we need to install it
nix-env -i nixopsAnd to deploy on DigitalOcean we need to have an account and create an API access token for it.
| { pkgs ? import <nixpkgs> {} }: | |
| let | |
| # BCC is currently broken in NixOS as it's compiled with a path to kernel modules that don't have the required information | |
| bcc = pkgs.lib.overrideDerivation (pkgs.bcc) (old: { cmakeFlags = old.cmakeFlags ++ [ "-DBCC_KERNEL_MODULES_DIR=${pkgs.linux.dev}/lib/modules" ]; }); | |
| in | |
| pkgs.mkShell { | |
| nativeBuildInputs = with pkgs; [ | |
| autoconf |
We'll use NixOps to deploy, so we need to install it
nix-env -i nixopsAnd to deploy on DigitalOcean we need to have an account and create an API access token for it.
Tested on Ubuntu 16.04 Docker container. The Dockerfile is a single line FROM ubuntu:16.04.
NOTE: stopping services didn't work for me for some reason. That's why there is pidof <service name> | xargs kill after each failed service <service name> stop to kill it.
THIS GIST HAS BEEN MOVED TO https://github.com/t-bast/lightning-docs/blob/master/lightning-txs.md TO MAKE IT EASIER TO COMMENT ON AND MAINTAIN.
This gist contains everything you need to understand Bitcoin/Lightning transactions. We ignore segwit subtleties and fields that aren't necessary for our global understanding.
| document.querySelector('#readme').setAttribute('style', 'position: absolute; top: 0; left: 0; right: 0; bottom: 0; z-index: 100; background-color: white') | |
| document.querySelector('body').appendChild(document.querySelector('#readme')) | |
| window.print() |
Add the following to your user's git config file (~/.gitconfig for linux):
[alias]
pr = "!f() { git fetch -fu ${2:-origin} refs/pull/$1/head:pr/$1 && git checkout pr/$1; }; f"
Then use the command in the project directory, like this:
git pr NUMBER_OF_PULL_REQUEST REMOTE
| function logClass(target: any) { | |
| // save a reference to the original constructor | |
| var original = target; | |
| // a utility function to generate instances of a class | |
| function construct(constructor, args) { | |
| var c : any = function () { | |
| return constructor.apply(this, args); | |
| } |
| function Timeout(milliseconds: number = 0) { | |
| return function(target, key, descriptor) { | |
| const originalMethod = descriptor.value; | |
| descriptor.value = function(...args) { | |
| setTimeout(() => { | |
| originalMethod.apply(this.args); | |
| }, milliseconds) |