This file contains hidden or 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
ssh-keygen -t rsa -b 4096 -C "[email protected]" |
This file contains hidden or 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
$('[href=\\#]').click(function(e) { | |
e.preventDefault() | |
}) | |
$(document).on('click', '[href=\\#]', function(e) { | |
e.preventDefault() | |
}) |
This file contains hidden or 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
--default-character-set=utf8 |
This file contains hidden or 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
RewriteCond %{HTTP_HOST} ^www.foobar\.com$ | |
RewriteRule ^(.*)$ http://foobar.com/$1 [R=301,L] | |
RewriteCond %{HTTP_HOST} ^foobar\.com$ | |
RewriteRule ^(.*)$ http://www.foobar.com/$1 [R=301,L] |
This file contains hidden or 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
@media only screen and (-webkit-min-device-pixel-ratio: 2) {} |
This file contains hidden or 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
-fobjc-arc | |
-fno-objc-arc |
This file contains hidden or 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
// NSArray Literals | |
NSArray *array = @[]; | |
NSArray *array = @[@"foo", @"bar", @42]; | |
NSMutableArray *array = [@[] mutableCopy]; | |
// NSDictionary Literals | |
NSDictionary *dict = @{}; | |
NSDictionary *dict = @{ | |
@"key": @"value", | |
@42: @"int", |
This file contains hidden or 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
$.fn.selectText = function() { | |
var element = $(this)[0]; | |
if (document.body.createTextRange) { | |
var range = document.body.createTextRange(); | |
range.moveToElementText(element); | |
range.select(); | |
This file contains hidden or 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
function setCookie(name, value, path, expires) { | |
var date = new Date; | |
date.setTime(date.getTime()+(expires*24*60*60*1000)); | |
document.cookie = name+"="+value+";path="+path+";expires="+date.toGMTString(); | |
} | |
function getCookie(name) { | |
if (document.cookie) { |
This file contains hidden or 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
:%s/foo/bar/g |