Skip to content

Instantly share code, notes, and snippets.

Working from home

Ben Keith benlk

Working from home
View GitHub Profile
benlk / gist:3494788
Created Aug 28, 2012
Linux Dualboot installation instructions with existing Windows partition
View gist:3494788
  1. Boot into Windows.

  2. Using Windows' partition tool Disk Management, resize the Windows partition to create a blank area as large as you desire.

  3. Insert your Linux install media.

  4. Reboot into your Linux install media.

  5. Do the Linux partitioning from your Linux install media.

benlk /
Last active Dec 11, 2015
OSU OSC Hackathon details




Feb 23, 1-5 p.m.


Ohio Union Interfaith/Prayer Room, 3rd floor

how much

$5 registration fee


Open to students and non-students

benlk /
Last active Dec 19, 2015
Markdown testing posts for Dropplets ( ). Released under the WTFPL.

Draft testing post.

  • Ben Keith
  • benlkeith
  • 2020-12-22
  • Testing
  • draft

If you see this post, something's gone terribly wrong with your css.

Make sure that your style.css has the following css:

benlk / comments-disqus.php
Last active Dec 19, 2015
Disqus-based comments system for @dropplets. Based on
View comments-disqus.php
<?php ?>
<div id="disqus_thread"></div>
<!-- Disqus comment code from -->
<script type="text/javascript" src="<?php print($template_dir_url); ?>custom/comments-disqus-js.js">
var disqus_shortname = 'benlk'; // required: replace example with your forum shortname
/* * * More information available at */
var disqus_identifier = <?php echo( "'" . $slug . "'" ) ?>; // optional . this line sets a unique identifier that disqus uses to track comments by post. Change it to something else if you want to.
var disqus_title = <?php echo( "'" . $post_title . "'" ) ?>; // this sets the post title, for Disqus\' purposes.
benlk / keybase
Created Apr 10, 2014 proof
View keybase
### Keybase proof
I hereby claim:
* I am benlk on github.
* I am benlk ( on keybase.
* I have a public key whose fingerprint is 4C2D F6E4 5925 87CB 9DCF 8CBF E6E2 B01D C9C6 01F7
To claim this, I am signing this object:
benlk /
Last active May 22, 2019
Setting up phpdoc-md for phpdoc -> GitHub Wikis
benlk / regex
Last active Aug 29, 2015
Why doesn't this javascript regex work?
View regex
var quoteHTML = "34. If you’re leaving scorch-marks, you need a bigger gun. ";
quoteHTML.replace(/(^\d+[.,:;](\ |\d+\ ))/m, '<span class="dnumber">$1<\/span>');
// returns '34. If you’re leaving scorch-marks, you need a bigger gun. '
// goal is to:
// - match 1. 22. 33.44 44:55 5:66 at the start of a line, followed by a space
// - wrap it in <span class="dnumber"></span>
// ideal output '<span class="dnumber">34. </span>If you’re leaving scorch-marks, you need a bigger gun. '
benlk / 404.php
Created Oct 30, 2014
An improved 404 page
View 404.php
* I see lots of cute 404 pages with funny messages.
* Most 404 pages don't tell you what link you used to get to the 404,
* and they don't really give you options on how to get to where you want to go
* other than "Click here to return to our front page."
* That approach is as bad as
* Sadly, this page doesn't do anything fancy like list other articles.
benlk /
Last active Aug 29, 2015
Accessing multisite WordPress from a database dump on Vagrant.


  • A WordPress multisite database loaded on your Vagrant box, accessible at with the IP address (See your Vagrantfile and /etc/hosts)
  • WordPress already installed and configured on your Vagrant box
  • WP-CLI installed on your Vagrant box
  • The main site of your network is and the project site is
  • If you do not possess admin credentials for the network, we will create a new admin, whose username is admin and whose password is password.
  • If you want to be able to undo this, run vagrant plugin install vagrant-vbox-snapshot from the Vagrant host. To take a snapshot, run vagrant snapshot take default [optional-name-for-snapshot]. Take one before starting, and then at the start of every major section here.

Getting multisite set up:

benlk /
Last active Sep 9, 2018
For when you need to rebuild curl
# copied from
mkdir /tmp/curl
cd /tmp/curl
sudo apt-get update
sudo apt-get install build-essential debhelper libssh2-1-dev
apt-get source curl
sudo apt-get build-dep curl
cd curl-*