View gist:89cb05623d4a33b68a3ff3af1b1c9234
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
// remove all local branches except from the ones that exist in remote | |
git fetch --all -p; git branch -vv | grep ": gone]" | awk '{ print $1 }' | xargs -n 1 git branch -D |
View webkit-only-styles.css
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
@media screen and (-webkit-min-device-pixel-ratio:0) { | |
/* CSS Statements that only apply on webkit-based browsers (Chrome, Safari, etc.) */ | |
body { background:red; } | |
} |
View index.html
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> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width"> | |
<title>JS Bin</title> | |
</head> | |
<body> | |
<script id="jsbin-javascript"> |
View index.html
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 lang="en"> | |
<head> | |
<meta charset="utf-8" /> | |
<title>Really simple HTML5 template</title> | |
<link rel="stylesheet" type="text/css" href="style.css" /> | |
<!--[if lt IE 9]><script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script><![endif]--> | |
</head> |
View commitPushAndPublishToNpm.sh
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 commit -m “Release 0.0.1” | |
git tag v0.0.1 | |
git push origin master --tags | |
npm publish |
View ios-splash-screens.html
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
<html> | |
<head> | |
<meta charset="utf-8"> | |
<meta content="yes" name="apple-mobile-web-app-capable"> | |
<title>Cool web-app</title> | |
<!-- iPhone - iPod touch - 320x460 --> | |
<link href="splashscreen.png" media="(device-width: 320px) and (device-height: 480px) and (-webkit-device-pixel-ratio: 1)" rel="apple-touch-startup-image"> | |
<!-- iPhone - iPod (Retina) - 640x920 --> |
View example.rb
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
# module | |
module Findable | |
def find_by_name(name) | |
# find something | |
end | |
end | |
# Class | |
class Klass | |
# class stuff |
View atbash.rb
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
class Atbash | |
LETTERS = %w(A B C D E F G H I J K L M N O P Q R S T U V W X Y Z) | |
NUMBERS = %w(0 1 2 3 4 5 6 7 8 9) | |
PUNCTUATION = [' ', ',', '.'] | |
def self.encode(str) | |
cipher = [] | |
str.chars.each do |char| | |
next if PUNCTUATION.include?(char) |
View console_tips7.js
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
dir($('el')); |
View console_tips3.js
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
console.log('Window : ' + window ) // Window : [object Window] | |
console.log('Window : ', window ) // logs correctly the Window object | |
console.log('Window : ', window , 'Object : ', object) // logs everything as expected |
NewerOlder