This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Letterpress CSS Loader | |
*/ | |
body { | |
background: #f8f8f8; | |
} | |
div { | |
width: 36px; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 . ' '); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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 |