I hereby claim:
- I am jgornick on github.
- I am jgornick (https://keybase.io/jgornick) on keybase.
- I have a public key whose fingerprint is 8215 CFA5 BEE5 C06E 9E25 9B34 A4E4 F2DE F764 D124
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
db.foo.remove({}); | |
db.foo.insert({ _id: 1, channels: [ { number: 1, history: [ { value: 1, date: new Date(+new Date) }, { value: 2, date: new Date(+new Date - (1000*60*3)) }, { value: 3, date: new Date(+new Date - (1000*60*10)) }] } ] }); | |
db.foo.insert({ _id: 2, channels: [ { number: 1, history: [ { value: 1, date: new Date(+new Date) }, { value: 2, date: new Date(+new Date - (1000*60*10)) }, { value: 3, date: new Date(+new Date - (1000*60*15)) }] } ] }); | |
db.foo.find(); | |
db.foo.update({ 'channels.history': { $elemMatch: { date: { $lte: new Date(+new Date - (1000*60*5)) } } } }, { $pull: { 'channels.$.history': { date: { $lte: new Date(+new Date - (1000*60*5)) } } } }, { multi: true }); | |
db.foo.find(); |
poke-interactive-process () { | |
while :; do | |
printf '\n' | |
sleep 1 | |
done | |
} | |
watch-interactive-process () { | |
local args=( "$@" ) |
#!/bin/bash | |
docker rm $(docker ps -q -f status=exited) | |
docker rmi $(docker images -q -f dangling=true) |
now() { | |
local format="${1:-"%s"}" | |
echo -n "$(date -u +"$format")" | |
} | |
# Extract the last element of a list. | |
last() { | |
echo -n "${@:(-1)}" | |
} |
*filter | |
# Allow all outgoing, but drop incoming and forwarding packets by default | |
:INPUT DROP [0:0] | |
:FORWARD DROP [0:0] | |
:OUTPUT ACCEPT [0:0] | |
# Don't attempt to firewall internal traffic on the loopback device. | |
-A INPUT -i lo -j ACCEPT |
#!/bin/bash | |
. /usr/bin/pdivt-funcs | |
pipe="$(mktemp -u)" | |
log info "Logging cell signal level..." | |
log info "Creating fifo at $pipe..." | |
mkfifo $pipe |
*nat | |
:PREROUTING ACCEPT [0:0] | |
:INPUT ACCEPT [0:0] | |
:OUTPUT ACCEPT [0:0] | |
:POSTROUTING ACCEPT [0:0] | |
# Redirect FTP port 11121 from 0/0 to 21. | |
-A PREROUTING -p tcp --dport 11121 -j REDIRECT --to-ports 21 |
The following is an evolving list of features that are missing from online music services.
Disclaimer: I am an old Rdio user and enjoyed how their experience was focused on discovering new music. Most of these features relate to discovering new music. However, there are some that improve the overall experience. I created this list after using Apple Music and most recently Google Play Music.
#!/bin/bash | |
# Returns a UTC timestamp of the current date/time. | |
# Can provide an optional format that matches date(1) format | |
now() { | |
local format="${1:-"%s"}" | |
echo -n "$(date -u +"$format")" | |
} | |
# Extract the first element of a list. |