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
<CORSRule> | |
<AllowedOrigin>*</AllowedOrigin> | |
<AllowedMethod>PUT</AllowedMethod> | |
<AllowedMethod>POST</AllowedMethod> | |
<AllowedMethod>DELETE</AllowedMethod> | |
<AllowedHeader>*</AllowedHeader> | |
<MaxAgeSeconds>3000</MaxAgeSeconds> | |
</CORSRule> |
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
# Tell system when Xcode utilities live: | |
sudo xcode-select -switch /Applications/Xcode.app/Contents/Developer | |
# Set "opendiff" as the default mergetool globally: | |
git config --global merge.tool opendiff |
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
/* | |
A less error occured trying to build your bundle. | |
You've likely entered an invalid input into the less variable field. | |
Check your syntax and try again! | |
thanks! | |
*/ | |
{ |
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
#################################################################################### | |
# Awesome prompt with git branch name & dirty flag. | |
function parse_git_dirty { | |
[[ $(git status 2> /dev/null | tail -n1) != "nothing to commit (working directory clean)" ]] && echo "*" | |
} | |
function parse_git_branch { | |
git branch --no-color 2> /dev/null | sed -e '/^[^*]/d' -e "s/* \(.*\)/[\1$(parse_git_dirty)]/" | |
} | |
export PS1='\[\033[0;35m\]\w\[\033[0;36m\]$(parse_git_branch)\[\e[0m\]: ' |
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/env ruby -wKU | |
# encoding: UTF-8 | |
# | |
# Sequentially renames *all* files in a directory. | |
# You'll be prompted for a filename prefix (ex: "image-") and will | |
# be shown a preview of the new filenames before the rename is performed. | |
# | |
# Installation: | |
# 1) Symlink this script somewhere on your $PATH, ex: `ln -s fileseq.rb /usr/local/bin/fileseq` | |
# 2) Make it executable: `chmod +x /usr/local/bin/fileseq` |
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
# This is a hack. Just playing around. | |
# | |
# Original image: | |
# http://media.photobattle.me.s3.amazonaws.com/images/5417/original.jpg | |
# | |
# To resize, use ImageMagick geometry strings (http://www.imagemagick.org/script/command-line-processing.php#geometry) in place of `original` in the URL. | |
# | |
# -- Examples -- | |
# | |
# Proxies an existing image: |
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
// Sass mixins for columns | |
.features div:first-child, | |
.features div:last-child, | |
+column(3) | |
.features div:nth-child(2) | |
+column(6) |
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
// Start fading in slowly... | |
jQuery('.alert').fadeIn("slow", function() { | |
// This callback gets run once the fadeIn has finished. | |
jQuery('.alert').fadeOut("slow"); | |
}); |
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
_captionLabelContainer.autoresizingMask = UIViewAutoresizingFlexibleLeftMargin | UIViewAutoresizingFlexibleTopMargin; |
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
-(void)realAuthenticate { | |
NSURLRequest *request = [self getURLRequest]; | |
AFJSONRequestOperation *operation = [AFJSONRequestOperation JSONRequestOperationWithRequest:request | |
success:^( NSURLRequest *request , NSHTTPURLResponse *response , id JSON ) { | |
NSString *domain = [[(NSArray *)[JSON objectForKey:@"sites"] lastObject] objectForKey:@"domain"]; | |
Portfolio *portfolio = [[Portfolio alloc] init]; | |
portfolio.domain = domain; | |
self.portfolio = portfolio; | |
[self finishAuth:YES]; |