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
| namespace :deploy do | |
| task :symlink_config, roles: :app do | |
| run "rm #{release_path}/config/database.yml" | |
| run "ln -nfs #{shared_path}/config/database.yml #{release_path}/config/database.yml" | |
| end | |
| after "deploy:finalize_update", "deploy:symlink_config" | |
| 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
| App.FoodController = Ember.ArrayController.extend({ | |
| needs: 'table', | |
| tableBinding: 'controllers.table', | |
| addFood: function(food) { | |
| var table = this.get('table').get('content') | |
| tabItems = table.get('tab.tabItems'); | |
| tabItems.createRecord({ | |
| food: food, |
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
| $.ajax({ | |
| url: 'https://maps.googleapis.com/maps/api/place/nearbysearch/json?location=-33.8670522,151.1957362&radius=500&types=food&name=harbour&sensor=false&key=AIzaSyCQdt0PINcQqpoZiviY731oUEprhc84yO8&callback=', | |
| type: 'GET', | |
| crossDomain: true, | |
| dataType: 'jsonp', | |
| }); |
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
| config.before(:suite) do | |
| DatabaseCleaner.clean_with(:deletion) | |
| end | |
| config.before(:each) do | |
| DatabaseCleaner.strategy = :transaction | |
| end | |
| config.before(:each, js: true) do | |
| DatabaseCleaner.strategy = :deletion |
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 'capybara' | |
| require 'capybara/dsl' | |
| require 'capybara/poltergeist' | |
| Capybara.register_driver :poltergeist do |app| | |
| Capybara::Poltergeist::Driver.new(app, logger: nil, phantomjs_logger: nil) | |
| end | |
| class ApplicationController < ActionController::Base | |
| # Prevent CSRF attacks by raising an exception. |
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
| <?xml version="1.0" encoding="UTF-8"?> | |
| <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
| <plist version="1.0"> | |
| <dict> | |
| <key>Ansi 0 Color</key> | |
| <dict> | |
| <key>Color Space</key> | |
| <string>sRGB</string> | |
| <key>Blue Component</key> | |
| <real>0.1568627450980392</real> |
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
| import System.Random | |
| guessNumber :: Int -> IO () | |
| guessNumber answer = do | |
| guess <- getLine | |
| if read guess == answer | |
| then putStrLn "You Win!" | |
| else guessWrong answer (read guess) | |
| guessWrong :: Int -> Int -> IO () |
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
| scheme: "Wasteland" | |
| author: "foobar" | |
| base00: "282828" | |
| base01: "32302f" | |
| base02: "3c3836" | |
| base03: "504945" | |
| base04: "665c54" | |
| base05: "d5c4a1" | |
| base06: "ebdbb2" | |
| base07: "fdf4c1" |
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
| # Stupid simple script for OS X that uses the terminal-notifier script to | |
| # send notifications via Notification Center. It has literally 0 configuration. | |
| def weechat_init | |
| Weechat.register( | |
| "terminal_notifier", | |
| "Blake Williams", | |
| "0.2", | |
| "BSD", | |
| "Use terminal-notifier for highlights", |
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
| ! Base16 Wasteland | |
| ! Scheme: foobar | |
| #define base00 #282828 | |
| #define base01 #32302f | |
| #define base02 #3c3836 | |
| #define base03 #504945 | |
| #define base04 #665c54 | |
| #define base05 #d5c4a1 | |
| #define base06 #ebdbb2 |