I hereby claim:
- I am jmnsf on github.
- I am jmnsf (https://keybase.io/jmnsf) on keybase.
- I have a public key whose fingerprint is CE79 517D FC44 351A 723F 7E49 8848 D447 4094 8B88
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
Endpoint:
POST /collect/aliases
Request Headers:
Key | Value |
---|---|
"Authorization" | "Token " + token |
"Accept" | "application/vnd.lqd.v1+json" |
"Content-Type" | "application/json" |
alias ll='ls -lhG' | |
alias cp='cp -irv' | |
alias mv='mv -iv' | |
alias rm='rm -ir' | |
alias jspec="RAILS_ENV=test bundle exec rake spec:javascript" | |
alias http="ruby -run -ehttpd . -p8000" | |
alias dockerclean="docker ps -a | grep Exit | cut -d ' ' -f 1 | xargs docker rm" | |
alias gitclean="git branch --merged | ack '^(?![\* ] master).+$' | xargs git branch -d" | |
alias nodev="node -r ./scripts/dev.js" | |
alias tunnel="forever ssh -vND 1080 -p 443 root@proxy.jmnsf.com" |
User.disk_aggregate([ | |
{ '$match' => { '$and' => [ | |
{ 'attrs.first_seen_at' => { '$gte' => DateTime.parse('2015-06-01') } }, | |
{ 'attrs.first_seen_at' => { '$lte' => DateTime.parse('2015-06-30 23:59') } }] } }, | |
{ '$project' => { | |
days_seen_at: { '$map'=> { | |
input: '$attrs.seen_at', | |
as: 'date', | |
in: { '$dayOfYear' => '$$date' } } }, | |
fsa: { '$dayOfYear' => '$attrs.first_seen_at' }, |
ptSalary :: (Ord a, Fractional a) => a -> a | |
ptSalary yearly = | |
let levels = [((0, 7000), 0.145), ((7001, 20000), 0.285), ((20001, 40000), 0.37), ((40001, 80000), 0.45), ((80001, 250000), 0.505)] | |
leftVal el = fst . fst $ el | |
rightVal el = snd . fst $ el | |
pct el = snd el | |
reducer sal el = sal - (min (rightVal el - leftVal el) (yearly - leftVal el)) * pct el | |
validLevels levels = takeWhile ((< yearly) . leftVal) levels | |
in foldl reducer yearly (validLevels levels) | |
<snippet> | |
<content><![CDATA[ | |
afterEach((${1:args}) => ${2:{}}); | |
]]></content> | |
<tabTrigger>aea</tabTrigger> | |
<scope>source.js</scope> | |
<description>ES 6 afterEach </description> | |
</snippet> |
Echelon Tax Overtax | |
€7,000.00 0.145 0 | |
€20,000.00 0.285 0.01 | |
€40,000.00 0.37 0.0175 | |
€80,000.00 0.45 0.03 | |
€99,999,999,999.00 0.48 0.035 |
# @author jmnsf | |
# | |
# This script attempts to clean the local repository of stale branches. This | |
# goes in a few steps: | |
# | |
# 0. Fetch with `-p` is run to remove references to deleted remote branches. | |
# 1. Merged branches are removed (except for `master`). | |
# 2. Branches with no conflicts or changes vs `master` are removed. | |
# 3. Branches that have the same head as a merged PR in GitHub will be merged. | |
# |
require 'nokogiri' | |
if ARGV.length != 1 | |
puts "Usage:\n$ ruby marvin-annotations.rb <path-to-library.mrvi>" | |
exit | |
end | |
def extract_highlights(book) | |
min_ts = 3000000000 # very large | |
max_ts = 0 |
Use this for protected networks where port 22 isn't available, or for general security reasons where your traffic will be routed through an external server via SSH tunnel.
An EC2 micro instance or a tiny DigitalOcean droplet will work for this. For the initial configuration, access to port 22 is required, as you'll have to SSH onto your host.
In the host, edit /etc/ssh/sshd_config
and add the line Port 443
. Reboot. From now on you can SSH into the server through port 443 (ssh -p 443 user@server
).