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 first commented line is your dabblet’s title | |
| */ | |
| background: #f06; | |
| background: linear-gradient(45deg, #f06, yellow); | |
| min-height: 100%; | |
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
| require 'json' | |
| require 'net/http' | |
| def get_json(url) | |
| JSON.parse(Net::HTTP.get_response(URI.parse(url)).body) | |
| end |
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
| # copy and paste this into your terminal to start an IRB session and use Capybara's DSL to write tests interactively | |
| # Thanks to Tom Clements | |
| # http://tom-clements.com/blog/2012/02/25/capybara-on-the-command-line-live-browser-testing-from-irb/ | |
| # I prefer using chrome... | |
| # First you need to install the chromedriver https://sites.google.com/a/chromium.org/chromedriver/downloads | |
| # Unzip, and move the executable somewhere in your path... | |
| # e.g. | |
| mv ~/Downloads/chromedriver /usr/local/bin |
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
| require 'digest/md5' | |
| =begin | |
| About: | |
| This script automatically runs on a 2-second loop, searches the current directory for haml & sass files that have been modified since the last iteration and builds them as needed into a file with the same name minus the .haml/sass extension. I wrote it so I could use Haml & Sass to develop Wordpress themes. | |
| How-to: | |
| 1) Name your source files with the extension you'd like them to have, then add ".haml" or ".sass" as appropriate... | |
| For example: index.php.haml and styles.css.sass |
NewerOlder