Skip to content

Instantly share code, notes, and snippets.

Clicking away on my new Model M. It's a lovely sound.

Jay Williams jaywilliams

Clicking away on my new Model M. It's a lovely sound.
Block or report user

Report or block jaywilliams

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
jaywilliams /
Last active Aug 14, 2019 — forked from palexander/gist:2975305
Compiling and running mosh on Dreamhost (Updated - 2018)
#!/usr/bin/env bash
# Thanks to @samsonjs for the cleaned up version:
# Create Source Directory
mkdir -p $PREFIX/src
View deploy.rb
set :repo_url, ''
set :application, ''
set :theme_name, 'sage'
# Branch options
# Prompts for the branch name (defaults to current branch)
#ask :branch, -> { `git rev-parse --abbrev-ref HEAD`.chomp }
# Hardcodes branch to always be master
# This could be overridden in a stage config file
jaywilliams / xpath_escape.php
Created Jun 6, 2012 — forked from chrif/xpath_escape.php
Function to escape single and double quotes in XPath queries using PHP
View xpath_escape.php
function xpathEscape($query, $default_delim = '"')
if (strpos($query, $default_delim) === false)
return $default_delim . $query . $default_delim;
preg_match_all("#(?:('+)|[^']+)#", $query, $matches);
list($parts, $apos) = $matches;
foreach ($parts as $i => &$part) {
$delim = $apos[$i] ? '"' : "'";
$part = $delim . $part . $delim;
View test_php_skill.php
* Created this test for job interviews. *
* Directions
* Read the direction in the Q and respond below A.
You can’t perform that action at this time.