git clone [email protected]:YOUR-USERNAME/YOUR-FORKED-REPO.git
cd into/cloned/fork-repo
git remote add upstream git://github.com/ORIGINAL-DEV-USERNAME/REPO-YOU-FORKED-FROM.git
git fetch upstream
git clone [email protected]:YOUR-USERNAME/YOUR-FORKED-REPO.git
cd into/cloned/fork-repo
git remote add upstream git://github.com/ORIGINAL-DEV-USERNAME/REPO-YOU-FORKED-FROM.git
git fetch upstream
package main | |
import ( | |
"fmt" | |
"github.com/gorilla/mux" | |
"github.com/gorilla/securecookie" | |
"net/http" | |
) | |
// cookie handling |
var options, paths, | |
gulp = require("gulp"), | |
merge = require("merge-stream"), | |
path = require("path"), | |
clean = require("gulp-clean"), | |
concat = require("gulp-concat"), | |
markdown = require("gulp-markdown"), | |
minifyCSS = require("gulp-minify-css"), | |
removeLines = require("gulp-remove-lines"), |
# -*- coding: utf-8 -*- | |
"""From a Query.all(), turn this result to a pandas DataFrame | |
Table creation and example data come from the official SQLAlchemy ORM | |
tutorial at http://docs.sqlalchemy.org/en/latest/orm/tutorial.html | |
Just take a look at the 'query_to_dict' function and the last part of the __main__. | |
""" |
Language | Vehicle | Reason |
---|---|---|
GoLang | Tesla | The future, but want somebody I know to buy one first |
Haskell | Batmobile | Looks awesome but you'll never figure out how to drive it |
Java | Hummer | Uses way more resources than is strictly necessary |
Perl | Classic Mini | A classic that has influenced many cars, but not practical for 2015 |
PHP | Fiat Multipla | Ugly, nobody wants to be seen driving this |
Ruby | Smart Car | Practical design. Will get you around the city fast, but not great on motorways |
Python | VW Golf | Solid. Reliable. Middle of the road. |
#include <stdio.h> | |
/* | |
* Calculates what Ada Lovelace labeled "B7", which today we would call the 8th | |
* Bernoulli number. | |
*/ | |
int main(int argc, char* argv[]) | |
{ | |
// ------------------------------------------------------------------------ | |
// Data |
with | |
double_entry_book as ( | |
select | |
array_to_string(outputs.addresses,',') as address, | |
value, block_timestamp | |
from `crypto-etl-bitcoin-prod.bitcoin_blockchain.transactions` join unnest(outputs) as outputs | |
union all | |
select | |
array_to_string(inputs.addresses,',') as address, | |
-value as value, block_timestamp |
SELECT | |
SUM (fees) | |
FROM ( | |
SELECT | |
*, | |
eth * eth_price / 1e18 AS trade_volume, | |
eth * eth_price * 0.003 / 1e18 AS fees | |
FROM ( | |
SELECT distinct | |
a.hash, |
# install nodejs and dependencies | |
sudo apt -y install curl dirmngr apt-transport-https lsb-release ca-certificates | |
curl -sL https://deb.nodesource.com/setup_10.x | sudo bash | |
sudo apt -y install gcc g++ make | |
sudo apt -y install nodejs | |
# install yarn | |
curl -sL https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add - | |
echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list | |
sudo apt-get update && sudo apt-get install yarn | |
# check on node and npm versions (for me was 10.17.0 and 6.11.3) |
1. create DNS "A" record (link ip address with FQDN) | |
2. make sure port 443 is open | |
3. sudo apt install nginx | |
4. stop attestation-service (so we can get certificate on default port 80) | |
5. sudo systemctl start nginx | |
6. sudo systemctl enable nginx | |
7. https://certbot.eff.org/instructions?ws=nginx&os=ubuntubionic | |
(sudo snap install --classic certbot; sudo ln -s /snap/bin/certbot /usr/bin/certbot; sudo certbot --nginx) | |
8. sudo vi /etc/nginx/sites-available/default (doc root change to /dev/null so that http://ipaddress will fail) | |
9. attestation.config should point to new port (8080) |