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 | |
namespace :assets do | |
desc 'Run the precompile task locally and rsync with shared' | |
task :precompile, :roles => :app, :except => { :no_release => true } do | |
system("bundle check"); exit if $? != 0 | |
system("RAILS_ENV=#{stage} bundle exec rake assets:precompile"); exit if $? != 0 | |
servers = find_servers :roles => :web, :except => { :no_release => true } | |
run <<-CMD.compact | |
cp -- #{shared_manifest_path.shellescape} #{current_path.to_s.shellescape}/assets_manifest#{File.extname(shared_manifest_path)} | |
CMD |
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
To perform a syntax check/dry run of your bash script run: | |
bash -n myscript.sh | |
To produce a trace of every command executed run: | |
bash -v myscripts.sh | |
To produce a trace of the expanded command use: |
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
{ | |
"auto_complete_commit_on_tab": true, | |
"binary_file_patterns": | |
[ | |
"*.jpg", | |
"*.jpeg", | |
"*.png", | |
"*.gif", | |
"*.ttf", | |
"*.tga", |
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 sh | |
set -o nounset | |
set -o errexit | |
set -o pipefail | |
shopt -s nullglob | |
declare -a environments=("production" "staging" "development") | |
declare -a workers=(*.worker) |
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
check file alerttest with path /.nonexistent | |
if does not exist then alert |
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
var http = require('http'); // require is unique to nodejs | |
var server = http.createServer(function (request, response) { | |
response.writeHead(200, {"Content-Type": "text/plain"}); | |
response.end("Hello World\n"); | |
}); | |
// Listen on port 8080, IP defaults to 127.0.0.1 | |
server.listen(8080); |
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
1. To pull in functions from multiple Tests a different before_compile hook needs to be registered for each test module | |
2. To add mocks to multiple mock modules, a attribute needs to be set up for each mock |
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 csv | |
HARD_MODE = 2 | |
NORMAL_MODE = 3 | |
recs_column = HARD_MODE | |
name_column = 0 | |
from constraint import * | |
problem = Problem() |
OlderNewer