Skip to content

Instantly share code, notes, and snippets.

call me on my #!/bin/sh phone

Matt Loberg mloberg

call me on my #!/bin/sh phone
Block or report user

Report or block mloberg

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
mloberg / Guardfile
Last active Aug 29, 2015
View Guardfile
require 'jekyll'
module ::Guard
class Jekyll < Guard
def start
puts "Starting Jekyll on port #{port}"
options = ::Jekyll.configuration({:serving => true, :watch => true, :port => port})
p = ::Process.fork do
import sys
import fcntl
class Flock(object):
mloberg / gist:5469030
Last active Dec 16, 2015
Append a gitignore template to your local .gitignore.
View gist:5469030
#!/usr/bin/env python
import os
import sys
import fcntl
import termios
import struct
import urllib2
import json
mloberg / com.gitlab.gitlab.plist
Created Dec 3, 2012
Gitlab LaunchD Startup Script
View com.gitlab.gitlab.plist
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "">
<plist version="1.0">
mloberg / redis.php
Created Oct 18, 2012
PHP Redis Class
View redis.php
class Redis {
const CRLF = "\r\n";
private $connection;
* Create a new instance of the class.
mloberg / sifter.php
Created Oct 4, 2012
PHP Sifter API Class
View sifter.php
* A simple PHP class to interact with the Sifter API.
class Sifter
* Sifter account hostname (
mloberg / gist:3750653
Created Sep 19, 2012
Find file in git based on md5 checksum.
View gist:3750653
if [[ -z "$CHECKSUM" ]]; then
echo "Usage: $0 md5 file"
exit 1
elif [[ -z "$FILE" ]]; then
echo "Usage: $0 md5 file"
View .vimrc
"Don't think about using arrow keys in vim
noremap <Up> :q!<Enter>
noremap! <Up> <Esc>:q!<Enter>
noremap <Down> :q!<Enter>
noremap! <Down> <Esc>:q!<Enter>
noremap <Left> :q!<Enter>
noremap! <Left>
mloberg / gist:3099019
Created Jul 12, 2012
Simple Load Test
View gist:3099019
# Set up parallel processes (
mkfifo pipe
exec 3<>pipe
rm -rf pipe
mloberg / gist:3084643
Created Jul 10, 2012
Find and cd to projects.
View gist:3084643
#!/usr/bin/env bash
# Add or source this from .bash_profile/.bashrc
# usage: project project_name
project() {
PROJECTS=( $(find $PROJECT_DIR -type d -iname "$1") )
if [[ "${#PROJECTS[@]}" -gt 1 ]]; then
You can’t perform that action at this time.