Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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/bash | |
# Sets up a new OS X installation with reasonable defaults | |
# Based partially on https://gist.github.com/saetia/1623487 | |
echo 'Setting defaults...' | |
# Use plain text mode for new TextEdit documents | |
defaults write com.apple.TextEdit RichText -int 0 | |
# Set default Finder location to home folder (~/) |
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
<?php | |
/** | |
* Calculate entropy of a string | |
* | |
* @see https://github.com/jreesuk/entropizer | |
* | |
* @param string $str | |
* @return integer | |
*/ | |
function entropizer($str) { |
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
git ls-tree --name-only -z -r HEAD |\ | |
grep -zZP '^(?!(lib|tmp|fonts|app/helper/(diff|textile))/)(?!(css|less|js)/(bootstrap|jquery|chart|respond|modernizr|datepicker|simplemde|intercom|stupidtable|typeahead|bootswatch)).*\.(php|css|less|js|html)$' |\ | |
xargs -0 -n1 git blame --line-porcelain |\ | |
grep \"^author \" | sort | uniq -c | sort -nr |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>iOS 5</title> | |
<style type="text/css"> | |
body { | |
margin: 0; | |
font-family: 'Helvetica Neue', Arial, sans-serif; | |
background-image: url("data:image/gif;base64,R0lGODlhCgAKAIABAN3d3f///yH5BAEKAAEALAAAAAAKAAoAAAIRjA2Zhwoc3GMSykqd1VltzxQAOw=="); | |
background-repeat: repeat; |
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/bash | |
mkdir -p mediterranean-gtk-themes/usr/share/ && cd $_ | |
git clone --depth=1 https://github.com/rbrito/mediterranean-gtk-themes.git themes | |
cd themes | |
VER=$(git rev-parse --short=12 HEAD) | |
rm -rf .git | |
rm LICENSE README.md | |
cd ../../.. | |
mkdir DEBIAN | |
cat >DEBIAN/control <<EOL |
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/bash | |
PROJPATH="/var/www/phproject" | |
cd $PROJPATH | |
/usr/bin/git pull | |
cd $PROJPATH/app/plugin | |
for i in */; do | |
echo "Updating $i ..." | |
cd $i |
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
<?php | |
/** | |
* Get terminal window size in characters | |
* @return array | |
*/ | |
function getWindowSize() { | |
return array(exec('tput cols'), exec('tput lines')); | |
} |
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/bash | |
# This script is designed to run on Xubuntu 14.04, but should work on | |
# most Ubuntu and Debian-based distros | |
################## | |
# Define globals # | |
################## | |
SETUPNAME="Alan's Xubuntu Setup" | |
DISTRO=`lsb_release -c | awk '{ print $NF }'` |
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/bash | |
function prompt() { | |
echo -n $1 | |
echo -n " [y/n] " | |
read prompt_response | |
if [ $prompt_response == 'y' ]; then | |
return 0 | |
else | |
return 1 |