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 / 2014-01.csv
Last active August 29, 2015 14:15
Weather data from CMH during January 2014
We can make this file beautiful and searchable if this error is corrected: It looks like row 8 should actually have 19 columns, instead of 2. in line 7.
STATION,STATION_NAME,DATE,PRCP,SNWD,SNOW,TMAX,TMIN,AWND,WDF2,WDF5,WSF2,WSF5,WT09,WT01,WT06,WT02,WT08,WT03
GHCND:USW00014821,COLUMBUS PORT COLUMBUS INTERNATIONAL AIRPORT OH US,20140113,58,0,0,100,44,41,190,180,76,107,-9999,1,-9999,-9999,-9999,-9999
GHCND:USW00014821,COLUMBUS PORT COLUMBUS INTERNATIONAL AIRPORT OH US,20140114,3,0,0,83,17,37,290,290,116,143,-9999,-9999,-9999,-9999,-9999,-9999
GHCND:USW00014821,COLUMBUS PORT COLUMBUS INTERNATIONAL AIRPORT OH US,20140115,0,0,0,17,-49,47,240,240,89,107,-9999,-9999,-9999,-9999,1,-9999
GHCND:USW00014821,COLUMBUS PORT COLUMBUS INTERNATIONAL AIRPORT OH US,20140116,10,0,10,-5,-60,46,190,170,89,107,-9999,1,-9999,-9999,-9999,-9999
GHCND:USW00014821,COLUMBUS PORT COLUMBUS INTERNATIONAL AIRPORT OH US,20140117,23,0,23,17,-105,46,270,270,116,157,-9999,-9999,-9999,-9999,-9999,-9999
GHCND:USW00014821,COLUMBUS PORT COLUMBUS INTERNATIONAL AIRPORT OH US,20140118,23,30,38,-49,-116,40,230,240,67,89,-9999,-9999,-9999,-9999,-9999,-9999
GHCND:USW00014821,COLUMBUS PORT COLUMBUS INTERNAT
<div id="main" class="container">
<div class="12u">
<p>The Open Source Club at the Ohio State University is a <a href="https://ohiounion.osu.edu/get_involved/student_organizations/directory?org_id=1042">registered student organization</a> composed of members from all around campus and out into the community who share a common enthusiasm for <a href="https://www.fsf.org/about/what-is-free-software">free, open source software</a>. Our focus is on building a strong community of open source users and developers in order to bring the benefits of open development, open standards, and free software to the university community.</p>
</div>
</div>
<div id="main" class="container">
<div class="4u 12u(small)">
<p><h2>IRC</h2>The Open Source Club at The Ohio State University has its own IRC Channel. You can join it by clicking <a href="irc://irc.freenode.net/osuosc">here</a>, or if you do not have an IRC client installed you can use the Freenode webchat <a href="https://webchat.freenode.net/?channels=#osuosc">here<
@benlk
benlk / Setting up a server
Last active August 29, 2015 14:16
Notes from the D3 talk
0. Open a terminal
1. change to the directory where you've saved the project and start a web server.
cd Desktop/
cd web-app-template-simple
python -m SimpleHTTPServer
@benlk
benlk / README.md
Last active August 29, 2015 14:16
if `pip install tarbell` fails with a message about gnureadline on Ubuntu

If pip install tarbell fails with an error that looks like this:

Command "/home/benlk/.virtualenvs/gene-wolfe/bin/python -c "import setuptools,
tokenize;__file__='/tmp/pip-build-pJSsCN/gnureadline/setup.py';exec(compile(getattr(
tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))"
install --record /tmp/pip-WluX7C-record/install-record.txt --single-version-externally-managed
--compile --install-headers /home/benlk/.virtualenvs/gene-wolfe/include/site/python2.7" 
failed with error code 1 in /tmp/pip-build-pJSsCN/gnureadline

You probably don't have the development headers for linbncurses

@benlk
benlk / steps.md
Created March 12, 2015 18:37
Debugging things in WordPress
  • is it in The Loop?
    • should it be in the Loop?
    • is it Loop-agnostic?
    • can it be made Loop-agnostic?
  • are filters messing with the query?
@benlk
benlk / CSS
Last active August 29, 2015 14:16
How XKCD What If? does tooltip text.
/* the reference tooltips style starts here */
.ref {
position: relative;
vertical-align: baseline;
}
.refnum {
position: relative;
left: 2px;
@benlk
benlk / 0-toc.md
Last active March 29, 2023 13:13
Collection of notes on WP_UnitTestCase
  1. Table of contents
  2. General information
    1. Terms
    2. General structure of a test
    3. WordPress-specific assertions and test functions
      • enqueues
      • creating posts
      • creating terms
      • attaching images
  • ?
@benlk
benlk / reddits.js
Created April 12, 2015 20:10
A way to generate all the country code reddit domains, and then some.
// Why? Because I wanted to blacklist them in my /etc/hosts file.
// This does not cover the subredditname.reddit.com subdomains, but those redirect to www.reddit.com/r/subredditname
var letters = Array(
'a',
'b',
'c',
'd',
'e',
'f',
@benlk
benlk / 0-deprecated.md
Last active October 23, 2015 22:34
Updating largo-umbrella with a new commit

Check out inn/docs, folder projects/largo

This gist is out of date.

@benlk
benlk / recipe.md
Last active August 29, 2015 14:22
Bacon pancake recipe
  1. Make a batch of thicker pancake batter. If your pancakes are normally a quarter of an inch thick, you're good. if they're thinner, use less milk or water.
  2. Cut your normal-length bacon strips into half-length strips.
  3. Cook the bacon until it is done but soft. Drain the griddle.
  4. Put two strips side-by-side.
  5. Pour the batter over the bacon, right in the bacon grease.
  6. Flip the pancakes as usual.
  7. Serve with a spoonful of butter, or with syrup.

If you're feeling adventurous, use chocolate chips in the batter.