ACL defined in RFC 3744, section 8.1
BASELINE-CONTROL defined in RFC 3253, section 12.6.
BIND defined in RFC 5842, section 4
CHECKIN defined in RFC 3253, section 4.4 and section 9.4
CHECKOUT defined in RFC 3253, section 4.3 and section 8.8
curl --include --request POST 'https://shippo.p.mashape.com/addresses/' \ | |
--header "X-Mashape-Authorization: <mashape-key>" \ | |
--user "<username>:<password>" \ |
var predictions = predict(913,new Date()) | |
console.log(predictions) | |
function predict(count,date) { | |
var timestamp = date.getTime() | |
var y = date.getFullYear(), m = date.getMonth(), d = date.getDate() | |
var beginningOfDay = new Date(y, m, d).getTime() | |
var endOfDay = new Date(y, m, d+1).getTime() | |
var pacePerDay = count / (timestamp - beginningOfDay) |
#!/usr/bin/env fish | |
# Ubuntu Message of The Day | |
if test -f /etc/update-motd.d/* | |
chmod -x /etc/update-motd.d/* | |
end | |
# Fish Shell Greeting | |
set line1 "# Don't Show Fish Greeting" | |
set line2 "set --erase fish_greeting" |
Here is a few examples how you can play with the data | |
# get the data, saving as names.tsv in current working directory | |
curl -o names.tsv https://gist.githubusercontent.com/montanaflynn/d5c882ad680f94b972f6/raw/1d3ecfb6dae48e119961fe299062a21c0c3ae1ab/names.tsv | |
# convert tsv to csv | |
cat names.tsv | tr "\\t" "," > names.csv | |
# print the most post popular girls name throughout all the years | |
cat names.tsv | tail -n +2 | awk '{print $2}' | sort | uniq -c | sort -nr |
# mongo export all users who have an email and are not hellbanned | |
# take special notice that --query is in quotes and is valid JSON | |
# also that --fields is also wrapped with quotes and is comma seperated | |
mongoexport --db appname --collection users \ | |
--query '{ "$and" : [ { "email" : { "$ne" : "" } }, { "role" : { "$ne" : 666 } } ] }' \ | |
--csv --fields 'username, email' --out ./user-emails.csv |
var unirest = require('unirest') | |
// This is the starting timestamp of when the request was sent | |
var requestSent = new Date().getTime() | |
unirest | |
.get('http://localhost:1337/') | |
.end(function(res){ | |
if (res.status === 200) { | |
var os = require('os') | |
var response = {} | |
for (property in os) { | |
if (typeof os[property] === 'function') { | |
response[property] = os[property]() | |
} else { | |
response[property] = os[property] | |
} |
console.log(fancyDate(556095600000)) | |
// August 16th, 1987 | |
function fancyDate(input) { | |
var input = new Date(input) | |
var monthNames = ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"] | |
var monthName = monthNames[input.getMonth()] | |
var day = input.getDate() |
## MOVED REPOS: https://github.com/montanaflynn/palindromes ## | |
Learning exercise by writing the same program in multiple languages. The | |
time results below are the best out of ten runs, optimizations welcome! | |
Rust 0.12.0: 0.03s user 0.00s system 95% cpu 0.036 total | |
Clang 600.0.51: 0.04s user 0.00s system 96% cpu 0.039 total | |
GO 1.3.1: 0.11s user 0.01s system 101% cpu 0.112 total | |
Ruby 2.0.0: 0.15s user 0.01s system 99% cpu 0.154 total | |
Haskell 7.8.3: 0.20s user 0.01s system 99% cpu 0.211 total |
ACL defined in RFC 3744, section 8.1
BASELINE-CONTROL defined in RFC 3253, section 12.6.
BIND defined in RFC 5842, section 4
CHECKIN defined in RFC 3253, section 4.4 and section 9.4
CHECKOUT defined in RFC 3253, section 4.3 and section 8.8