> go get github.com/myorg/private-repo
# cd .; git clone https://github.com/myorg/private-repo mygopath/src/github.com/myorg/private-repo
Cloning into 'mygopath/src/github.com/myorg/private-repo'...
fatal: could not read Username for 'https://github.com': terminal prompts disabled
package github.com/myorg/private-repo: exit status 128
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Verifying my Blockstack ID is secured with the address 1NL1QgCqCFReoZGoE26UZwC2QJQJ3jJA4 https://explorer.blockstack.org/address/1NL1QgCqCFReoZGoE26UZwC2QJQJ3jJA4 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// we have an array of objects, | |
var myArray = [ { name: 'a', value: 1 }, { name: 'b', value: 2 }, { name: 'c', value: 3 } ]; | |
// we want an object like { a: 1, b: 2, c: 3 } | |
// accumulator is an object, we'll set it to an empty object | |
// initially, when we call the reducer | |
// currentValue is the value of the current array element. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM python:3.5.1 | |
MAINTAINER Katy Lavallee <[email protected]> | |
RUN mkdir -p /dockeripdb/ | |
ENTRYPOINT ["/usr/local/bin/python"] | |
WORKDIR /dockeripdb/ | |
ENV PYTHONPATH /dockeripdb/ | |
ENV DJANGO_SETTINGS_MODULE dockeripdb.settings |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var AWS_KEY = '<your key>'; | |
var AWS_SECRET = '<your secret>'; | |
function generateS3Url(bucket, path) { | |
var expiresDt = Math.floor(Date.now() / 1000) + (60 * 60 * 24); // can be up to 7 days from now | |
var stringToSign = 'GET\n\n\n' + expiresDt + '\n/' + bucket + '/' + encodeURIComponent(path); | |
var hmac = Utilities.computeHmacSignature(Utilities.MacAlgorithm.HMAC_SHA_1, stringToSign, AWS_SECRET, Utilities.Charset.UTF_8); | |
var signed = encodeURIComponent(Utilities.base64Encode(hmac)); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// A Node.js example which uses the npm package "request" (https://www.npmjs.com/package/request) | |
// to send a POST request to convert a ZPL string to a PDF file. | |
var fs = require('fs'); | |
var request = require('request'); | |
var zpl = "^xa^cfa,50^fo100,100^fdHello World^fs^xz"; | |
var options = { | |
encoding: null, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var fs = require('fs'); | |
var request = require('request'); | |
request.post({ body: "^xa^cfa,50^fo100,100^fdHello World^fs^xz", encoding: null, url: 'http://api.labelary.com/v1/printers/8dpmm/labels/4x6.75/0/' }, function(err, resp, body) { | |
if (err) { | |
return console.log(err); | |
} | |
console.log('headers', resp.headers); | |
console.log('status', resp.statusCode); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
""" | |
1. Copy pending transactions from chase.com | |
2. `pbpaste | path/to/pending2ynab.py > ~/Desktop/ynabimport.csv` | |
3. Import ~/Desktop/ynabimport.csv file into YNAB | |
""" | |
import re | |
import sys |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Commands are executed by cron when the minute, hour, and month of year | |
# fields match the current time, and at least one of the two day fields | |
# (day of month, or day of week) match the current time. A field may be | |
# an asterisk (*), which will always match. | |
# | |
# Fields in order: | |
# minute (0-59) | |
# hour (0-23) | |
# day of month (1-31) | |
# month (1-12 or first three letters) |
- stuff
- things
- more stuff
- more things
- number five
- dogs
- cats
- people
- monkeys
- i don't know what i'm talking about
NewerOlder