I am not actively updating this gist and it is already out of date. Please see http://altheamesh.com/documents/universal-payment-channels.pdf
Jehan Tremback
Zackary Hess
| Promise = require('bluebird') | |
| var A = function() { | |
| return new Promise(function(resolve, reject) { | |
| var result = 'A is done' | |
| console.log(result) | |
| resolve(result); | |
| }) |
I am not actively updating this gist and it is already out of date. Please see http://altheamesh.com/documents/universal-payment-channels.pdf
Jehan Tremback
Zackary Hess
| namespace Analogy | |
| { | |
| /// <summary> | |
| /// This example shows that a library that needs access to target .NET Standard 1.3 | |
| /// can only access APIs available in that .NET Standard. Even though similar the APIs exist on .NET | |
| /// Framework 4.5, it implements a version of .NET Standard that isn't compatible with the library. | |
| /// </summary>INetCoreApp10 | |
| class Example1 | |
| { | |
| public void Net45Application(INetFramework45 platform) |
| echo 'export PATH=$HOME/local/bin:$PATH' >> ~/.bashrc | |
| . ~/.bashrc | |
| mkdir ~/local | |
| mkdir ~/node-latest-install | |
| cd ~/node-latest-install | |
| curl http://nodejs.org/dist/node-latest.tar.gz | tar xz --strip-components=1 | |
| ./configure --prefix=~/local | |
| make install # ok, fine, this step probably takes more than 30 seconds... | |
| curl https://www.npmjs.org/install.sh | sh |
| #!/bin/bash | |
| # A simple script to backup an organization's GitHub repositories. | |
| # NOTE: if you have more than 100 repositories, you'll need to step thru the list of repos | |
| # returned by GitHub one page at a time, as described at https://gist.github.com/darktim/5582423 | |
| GHBU_BACKUP_DIR=${GHBU_BACKUP_DIR-"github-backups"} # where to place the backup files | |
| GHBU_ORG=${GHBU_ORG-"<CHANGE-ME>"} # the GitHub organization whose repos will be backed up | |
| # (if you're backing up a user's repos instead, this should be your GitHub username) | |
| GHBU_UNAME=${GHBU_UNAME-"<CHANGE-ME>"} # the username of a GitHub account (to use with the GitHub API) |
| #!/bin/sh | |
| LOGIN=YOURLOGIN | |
| TOKEN=YOURTOKEN | |
| ORG=YOURORG | |
| DONE=0 | |
| PAGE=0 | |
| # sample output: | |
| # "total_private_repos": 50, |
| // | |
| // wifi_scan.m | |
| // WifiDump | |
| // | |
| // Created by Shawn Cicoria on 12/22/16. | |
| // Copyright © 2016 CedarLogic, LLC. All rights reserved. | |
| // | |
| /* The official example for CoreWLAN is now obsolete, |
| #!/bin/sh | |
| set -e | |
| set -x | |
| for package in $(npm -g outdated --parseable --depth=0 | cut -d: -f3) | |
| do | |
| npm -g install "$package" | |
| done |
| contract EscrowContract { | |
| address buyer; | |
| address seller; | |
| address agent; | |
| // Each party has an entry here with the timestamp of their acceptance | |
| uint[3] acceptances; | |
| bool active; |
| // Ethereum + Solidity | |
| // This code sample & more @ dev.oraclize.it | |
| import "github.com/oraclize/ethereum-api/oraclizeAPI.sol"; | |
| contract PriceFeed is usingOraclize { | |
| uint public ETHUSD; | |
| function PriceFeed(){ | |
| oraclize_setProof(proofType_TLSNotary | proofStorage_IPFS); |