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
/** | |
* Note: the following function should already exist in your application delegate file. | |
* Replace it with the following implementation. | |
* | |
* Thanks to @purplecabbage for implementation. | |
*/ | |
// ... | |
/** |
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 hook is run after every virtualenv is activated. | |
export OLD_GEM_HOME=$GEM_HOME | |
export GEM_HOME=$VIRTUAL_ENV/gems/ | |
export GEM_PATH= | |
export PATH=$VIRTUAL_ENV/gems/bin:$PATH |
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 | |
if [ $(git diff HEAD@{1} HEAD --name-only | grep 'requirements/' -c) -ne 0 ] | |
then | |
$VIRTUAL_ENV/bin/pip install -r requirements/dev.txt | |
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
# Configure colors, if available. | |
if [ -x /usr/bin/tput ] && tput setaf 1 >&/dev/null; then | |
c_reset='\[\e[0m\]' | |
c_user='\[\e[0;32m\]' | |
c_path='\[\e[1;34m\]' | |
c_git_clean='\[\e[0;37m\]' | |
c_git_staged='\[\e[0;32m\]' | |
c_git_unstaged='\[\e[0;31m\]' | |
else | |
c_reset= |
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
# Iterates over files and subdirectories in directorie[s] given as arguments | |
# and adds raw text of those files to merged.txt in the working directory | |
# where the script is called | |
# Call like this: | |
# ruby merge.rb {absolute path portion to delete} {directory to scan} [{directory to scan}] | |
# For example: | |
# ruby merge.rb /Users/donnieclapp/Projects/ ~/Projects/htl-website/myproject/static_media/stylesheets | |
# create or open the merged.txt file for writing (in working directory) |
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
Single line, no attribution: | |
<figure class="quote"> | |
<blockquote>It is the unofficial force—the Baker Street irregulars.</blockquote> | |
</figure> | |
Single line, with attribution and optional cite: | |
<figure class="quote"> | |
<blockquote>It is the unofficial force—the Baker Street irregulars.</blockquote> |
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
# Configure colors, if available. | |
if [ -x /usr/bin/tput ] && tput setaf 1 >&/dev/null; then | |
c_reset='\[\e[0m\]' | |
c_user='\[\e[0;32m\]' | |
c_path='\[\e[1;34m\]' | |
c_git_clean='\[\e[0;37m\]' | |
c_git_staged='\[\e[0;32m\]' | |
c_git_unstaged='\[\e[0;31m\]' | |
else | |
c_reset= |