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
Atom editor settings for Belanton Team. | |
You can use these settings on your Atom editor [http://atom.io] copy. Here are | |
defaults Atom config files (config.cson, init.coffee, keymap.cson, snippets.cson and | |
styles.less) and Project Manager package list [http://atom.io/packages/project-manager]. |
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
/** | |
* Configure advanced options for the Express server inside of Sails. | |
* | |
* For more information on configuration, check out: | |
* http://sailsjs.org/#documentation | |
*/ | |
module.exports.express = { | |
middleware: { | |
poweredBy: false | |
}, |
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
## | |
# The MIT License (MIT) | |
# | |
# Copyright (c) 2014 Ryan Morrissey | |
# | |
# Permission is hereby granted, free of charge, to any person obtaining a copy | |
# of this software and associated documentation files (the "Software"), to deal | |
# in the Software without restriction, including without limitation the rights | |
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
# copies of the Software, and to permit persons to whom the Software is |
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
# * Style guide based on Rails documention | |
module Namespace #:nodoc: don't document this | |
# Generic Namespace exception class | |
class NamespaceError < StandardError | |
end | |
# Raised when... | |
class SpecificError < NamespaceError | |
end |
Sublime Text 2 ships with a CLI called subl (why not "sublime", go figure). This utility is hidden in the following folder (assuming you installed Sublime in /Applications
like normal folk. If this following line opens Sublime Text for you, then bingo, you're ready.
open /Applications/Sublime\ Text\ 2.app/Contents/SharedSupport/bin/subl
You can find more (official) details about subl here: http://www.sublimetext.com/docs/2/osx_command_line.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
# autoload concerns | |
module YourApp | |
class Application < Rails::Application | |
config.autoload_paths += %W( | |
#{config.root}/app/controllers/concerns | |
#{config.root}/app/models/concerns | |
) | |
end | |
end |
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
@javascript | |
Scenario: confiming when saving inactive | |
Given I expect to click "OK" on a confirmation box saying "Are you sure?" | |
When I press "Save" | |
Then the confirmation box should have been displayed | |
And I should see "TV" in the "Campaign Keywords" section | |
Scenario: alert when form is not valid | |
Given I expect to click on an alert box saying "Please complete all fields in this form" | |
When I press "Save" |
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
echo 'export PATH=$HOME/local/bin:$PATH' >> ~/.bashrc | |
. ~/.bashrc | |
mkdir ~/local | |
mkdir ~/node-latest-install | |
cd ~/node-latest-install | |
curl http://nodejs.org/dist/node-latest.tar.gz | tar xz --strip-components=1 | |
./configure --prefix=~/local | |
make install # ok, fine, this step probably takes more than 30 seconds... | |
curl https://www.npmjs.org/install.sh | 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
# Support for http digest auth | |
# Discovered here: http://johan.bingodisk.com/public/code/net_digest_auth.rb | |
require 'digest/md5' | |
require 'net/http' | |
module Net | |
module HTTPHeader | |
@@nonce_count = -1 | |
CNONCE = Digest::MD5.new("%x" % (Time.now.to_i + rand(65535))).hexdigest |