Skip to content

Instantly share code, notes, and snippets.

View benlk's full-sized avatar
🏡
Working from home

Ben Keith benlk

🏡
Working from home
View GitHub Profile
@benlk
benlk / signs.md
Last active August 29, 2015 14:24
How much would it cost to put "Walk Left | Stand Right" signs in the DC Metro
Cost of signs x number of signs

Cost of signs

According to this site, figure $20 per square foot.

How large should the "Walk Left | Stand Right" sign be? Let's say four feet wide and one foot tall. 4 sq. ft per sign.

$80 per sign, plus mounting brackets, so let's call it an even $100 per sign.

Do you:

  • open 1Password.html on Dropbox.com to access your shared passwords?
  • receive a 403 error about being unable to load data/default/encryption-keys.js?
  • have your Dropbox folder on your machine, say at ~/Dropbox?
  • have Python installed?

Here's how to get access to your passwords:

  1. Open a terminal
@benlk
benlk / .sh
Last active August 29, 2015 14:28
# From https://twitter.com/addyosmani/status/633405466094120960
!! # run the last command executed
sudo !! # run the last command, but as root
!<word> # run the last command that started with the word
!<word>:p # List, but don't run that last command. :p is like "print"
<space>command # execute a command without saving it in history
echo "ls -l" | at midnight # execute command at a given time. `man at` has come really nice examples.
ls -lhS # sort files by sizes in directory
top -o vsize # why is your computer slow
@benlk
benlk / caches.txt
Last active September 15, 2015 19:14
A list of things we do to caches
break
bust
clear
dump
flip
invalidate
kick
purge
trash
<div class="pq-pA a-E-Pc Aq" role="log" aria-live="polite">
<hr class="Kc-Nd">
<div class=" Fm Eq Kc-we" data-from="undefined">
<div class="Kc-Oc">
<div class="Kc-Ca Fm">David Ryan joined group chat.</div>
</div>
</div>
<hr class="Kc-Nd">
<div class=" Fm Eq Kc-we" data-from="undefined">
<div class="Kc-Oc">

Ingredients

  • 2 gallons apple juice
  • 1/2 gallon cranberry juice, unsweetened or sweetened
  • 2 cups orange juice
  • 1 tablespoon allspice
  • 1 tablespoon cloves
  • 1 tablespoon nutmeg or cinnamon, I can't remember which
  • 3 drops orange extract
  • 2.5 pounds sugar (powdered or granulated, white or brown; feel free to lessen the sugar content)

Wednesday:

  • shopping (see Google Keep)
  • Make cookies
  • ask Brian how early I can show up tomorrow to do cooking
  • what time is dinner?

Thursday

  • pack car, see Google Keep
@benlk
benlk / NASA-public.m3u8
Created December 3, 2015 22:47
Watching NASA Public Television without Flash
#EXTM3U
#EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=563000,RESOLUTION=1280x720,CODECS="avc1.77.30, mp4a.40.2"
http://nasatv-lh.akamaihd.net/i/NASA_101@319270/index_400_av-p.m3u8?sd=10&rebase=on
#EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=432000,RESOLUTION=428x240,CODECS="avc1.640029, mp4a.40.2"
http://nasatv-lh.akamaihd.net/i/NASA_101@319270/index_400_av-b.m3u8?sd=10&rebase=on
#EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=827000,RESOLUTION=1280x720,CODECS="avc1.77.30, mp4a.40.2"
http://nasatv-lh.akamaihd.net/i/NASA_101@319270/index_700_av-p.m3u8?sd=10&rebase=on
#EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=732000,RESOLUTION=428x240,CODECS="avc1.640029, mp4a.40.2"
http://nasatv-lh.akamaihd.net/i/NASA_101@319270/index_700_av-b.m3u8?sd=10&rebase=on
#EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=2128000,RESOLUTION=1280x720,CODECS="avc1.77.30, mp4a.40.2"

Number 17: the homepage as a clock

Parts:

  • post custom meta for scheduling ( begin, end )
  • posts sortable by scheduling ( if begin is not the post publish time )
  • homepage
  • homepage outputs posts in useful format without js
  • homepage outputs posts in useful format on mobile
  • progressive enhancement on large devices: the clock of posts appears, showing now and the post currently active

The goal is to search for tweets from people I am following in a specific time period:

t followings | xargs -n 1 -I TKTK 't search all "from:TKTK archive OR archives since:2015-06-22 until:2015-06-28"'

Here's my understanding of what I typed:

t followings : generates a list of people I am following on Twitter https://sferik.github.io/t/. Sample output is as follows: