| ⌘T | go to file |
| ⌘⌃P | go to project |
| ⌘R | go to methods |
| ⌃G | go to line |
| ⌘KB | toggle side bar |
| ⌘⇧P | command prompt |
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
| // Automatically replace SVG images on non-supporting browsers | |
| if (!Modernizr.svg || !Modernizr.inlinesvg) | |
| { | |
| $('img.svg').each(function() | |
| { | |
| this.src = this.src.replace('.svg', '.png'); | |
| $(this).addClass('svg_loaded'); | |
| }); | |
| } |
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
| The HTML | |
| <div id="container"> | |
| <h2>$10 Off</h2> | |
| </div> | |
| The CSS | |
| h2 { | |
| font-size: 80px; |
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
| The HTML | |
| <div id="container"> | |
| <p>Small Caps</p> | |
| </div> | |
| The CSS | |
| #container p { | |
| text-align: center; |
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 detect_city($ip) { | |
| $default = 'UNKNOWN'; | |
| if (!is_string($ip) || strlen($ip) < 1 || $ip == '127.0.0.1' || $ip == 'localhost') | |
| $ip = '8.8.8.8'; | |
| $curlopt_useragent = 'Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2) Gecko/20100115 Firefox/3.6 (.NET CLR 3.5.30729)'; | |
| $url = 'http://ipinfodb.com/ip_locator.php?ip=' . urlencode($ip); |
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
| #!/usr/bin/env ruby | |
| require 'mail' | |
| mysql_username = 'root' | |
| mysql_password = '123456' | |
| mysql_database = 'test' | |
| system("mysqldump --user=#{mysql_username} --password=#{mysql_password} #{mysql_database} > backup.sql") | |
| # Credit to : |
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
| class Class: | |
| pass | |
| def say_hello(self): | |
| print "Hello" | |
| Class.say_hello = say_hello | |
| Class().say_hello() |