Skip to content

Instantly share code, notes, and snippets.

View mspirek's full-sized avatar

Mark Spirek mspirek

View GitHub Profile
# Install dnsmasq
brew install dnsmasq
# Copy the default configuration file.
cp $(brew list dnsmasq | grep /dnsmasq.conf.example$) /usr/local/etc/dnsmasq.conf
# Copy the daemon configuration file into place.
sudo cp $(brew list dnsmasq | grep /homebrew.mxcl.dnsmasq.plist$) /Library/LaunchDaemons/
# Start Dnsmasq automatically.
sudo launchctl load /Library/LaunchDaemons/homebrew.mxcl.dnsmasq.plist
@dprevite
dprevite / osx-for-hackers.sh
Last active November 28, 2016 05:43 — forked from brandonb927/osx-for-hackers.sh
My fork of osx-for-hackers.sh
#!/bin/sh
# Ask for the administrator password upfront
sudo -v
# Keep-alive: update existing `sudo` time stamp until script has finished
while true; do sudo -n true; sleep 60; kill -0 "$$" || exit; done 2>/dev/null &
# Set the colours you can use
black='\033[0;30m'
@dprevite
dprevite / checkout_all_branch_to_dirs.php
Last active December 15, 2015 16:08
Pulls all feature branches to their own folders so they can be served by the web server for easy QA. These are run via cron. *.branches.projectdomain.com
#!/usr/bin/php
<?php
// Constants we need to do things
define('WEB_ROOT', '/var/www/branches.projectdomain.com/'); // Requires trailing slash!
define('GIT', '/usr/bin/git');
define('GIT_REPO', WEB_ROOT . '__base__/'); // Requires trailing slash!
define('GIT_DIR', GIT_REPO . '.git');
define('GIT_CMD', GIT . ' --git-dir=' . GIT_DIR . ' ');
@bylatt
bylatt / gist:4971506
Last active September 16, 2018 16:58
My .bash_profile setup on OS X. Modified from Mark Otto's bash style (http://markdotto.com/2013/01/13/improved-terminal-hotness/) by adding git color for status.
alias ls='ls -Glah'
alias web='open -a Safari.app'
alias mail='open -a Mail.app'
alias todo='open -a Reminders.app'
git_branch () {
if git rev-parse --git-dir >/dev/null 2>&1
then echo -e "" [$(git branch 2>/dev/null| sed -n '/^\*/s/^\* //p')]
else
echo ""
fi
@james2doyle
james2doyle / dabblet.css
Created November 7, 2012 14:03
Letterpress CSS Loader
/**
* Letterpress CSS Loader
*/
body {
background: #f8f8f8;
}
div {
width: 36px;
@brandonb927
brandonb927 / osx-for-hackers.sh
Last active May 14, 2024 18:00
OSX for Hackers: Yosemite/El Capitan Edition. This script tries not to be *too* opinionated and any major changes to your system require a prompt. You've been warned.
#!/bin/sh
###
# SOME COMMANDS WILL NOT WORK ON macOS (Sierra or newer)
# For Sierra or newer, see https://github.com/mathiasbynens/dotfiles/blob/master/.macos
###
# Alot of these configs have been taken from the various places
# on the web, most from here
# https://github.com/mathiasbynens/dotfiles/blob/5b3c8418ed42d93af2e647dc9d122f25cc034871/.osx