I hereby claim:
- I am jotto on github.
- I am jotto (https://keybase.io/jotto) on keybase.
- I have a public key whose fingerprint is 076D B3E2 8BEB 4B6D C493 70E8 5A06 9D26 BB21 17B8
To claim this, I am signing this object:
// prerequisites: node.js installed on your computer | |
// step 1: make a directory on your computer called "defi-assets-and-their-exchanges" | |
// step 2: copy and paste this file into that directory, call it "index.js" | |
// step 3: npm install --save got | |
// step 4: paste your messari API key into the empty string below | |
// step 5: node index.js | |
const YOUR_PERSONAL_MESSARI_API_KEY = ""; | |
const got = require("got"); |
I hereby claim:
To claim this, I am signing this object:
// npm install prerendercloud | |
require('prerendercloud') | |
.screenshot("https://google.com") | |
.then(jpgBuffer => fs.writeFileSync("out.jpg", jpgBuffer)); | |
require('prerendercloud') | |
.pdf("https://google.com") | |
.then(pdfBuffer => fs.writeFileSync("out.pdf", pdfBuffer)); |
<!DOCTYPE HTML> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<title>ReactJS 15.5.0 working example for noscript tags and SSR: 2017-06-28</title> | |
</head> | |
<body> | |
<div id='root'></div> |
FROM ubuntu:14.04 | |
RUN apt-get -y update | |
RUN apt-get -y install libnss3 libfontconfig1-dev | |
COPY ./* / | |
EXPOSE 9222 | |
ENTRYPOINT ["./headless_shell", "--remote-debugging-address=0.0.0.0", "--remote-debugging-port=9222", "--no-sandbox"] |
require 'csv' | |
# example usage: | |
# ruby omron-to-withings.rb ExportReport_CSV.txt | |
# and it outputs a new CSV file that withings can read | |
if ARGV[0].to_s == "" | |
puts "first arg must be path to omron csv file for blood pressure readings" | |
exit(1) | |
end |
// just an extension of the default Negroni logger | |
// https://github.com/codegangsta/negroni/blob/c7477ad8e330bef55bf1ebe300cf8aa67c492d1b/logger.go | |
// USAGE | |
// import ( | |
// "github.com/gorilla/mux" | |
// "github.com/codegangsta/negroni" | |
// "github.com/kr/pretty" | |
// ) | |
// router := mux.NewRouter() |
raise "Expecting Paperclip version 3.3.1 since we are monkey patching it in application.rb" unless Paperclip::VERSION == "3.3.1" | |
module Paperclip | |
class Thumbnail < Processor | |
def make | |
src = @file | |
dst = Tempfile.new([@basename, @format ? ".#{@format}" : '']) | |
dst.binmode | |
begin |
# (create oauth2 tokens from Google Console) | |
client_id = "" | |
client_secret = "" | |
# (paste the scope of the service you want here) | |
# e.g.: https://www.googleapis.com/auth/gan | |
scope = "" | |
# returns an array of keys formatted like this | |
# blog[id] | |
# blog[title] | |
# blog[user_id] | |
# blog[admin][pageview] | |
# blog[admin][metrics][conversion_rate_last_30_days] | |
Backbone.Model.prototype.flatten_hash = (_attribs = this.attributes, _param_root = [this.paramRoot]) -> | |
_.flatten( | |
_(_attribs).map (v, k) => | |
if v? && typeof(v) == 'object' |