git config --global push.default current
git config --global merge.defaultToUpstream true
git config --global branch.autosetupmerge true
git config --global branch.autosetuprebase remote
git config --global alias.cb 'checkout -b'
git config --global alias.ps 'push -u'
git config --global alias.pl '!git fetch -p && git rebase'
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
<% | |
app_name = Dir.getwd.split('/')[-1] | |
branch = `git symbolic-ref --short HEAD 2>/dev/null`.chomp.gsub(/\W/, '_') | |
db_name = branch.match(/feature/) ? "#{app_name}_#{branch}" : "#{app_name}_master" | |
puts "DATABASE: #{db_name}" | |
%> | |
mysql2: &mysql2 | |
adapter: mysql2 | |
socket: /tmp/mysql.sock |
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
# x (or exec) will run anything on the same line as a shell command. | |
# we need to checkout a temporary branch because git won't push detached HEADs. | |
# after deploy, the "checkout -" means checkout the previously checked out thing, | |
# which will go back to our detached head and we clean up the temporary branch so | |
# that we don't need to worry about merging. | |
# if your branch is already based on the same point as your rebase command, then | |
# the 'pick' stage is essentially the same as a fast-forward merge; no new commits | |
# are created. | |
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
$('#mod-item-list>li').each(function(index, el){ | |
// defaults to unsync; to sync, set unsync to 0 | |
var unsync = 1; | |
var folder_id = el.attributes['data-view_id'].textContent; | |
var data = ["q[items][0]=", folder_id, "&q[unsync]=", unsync, "&request_token=", request_token, "&realtime_subscriber_id=", realtime_subscriber_id].join(''); | |
var url = ["https://", location.host, "/index.php?rm=box_sync_mark_item_sync"].join(''); | |
$.post(url, data, function(x,status,z){ console.log(folder_id, ': ', status) }); | |
}); |
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
$ pip install pyyaml | |
Downloading/unpacking pyyaml | |
Downloading PyYAML-3.10.tar.gz (241kB): 241kB downloaded | |
Running setup.py egg_info for package pyyaml | |
Installing collected packages: pyyaml | |
Running setup.py install for pyyaml | |
checking if libyaml is compilable | |
cc -fno-strict-aliasing -fno-common -dynamic -I/usr/local/include -I/usr/local/opt/sqlite/include -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/usr/local/Cellar/python/2.7.3/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c build/temp.macosx-10.8-x86_64-2.7/check_libyaml.c -o build/temp.macosx-10.8-x86_64-2.7/check_libyaml.o | |
build/temp.macosx-10.8-x86_64-2.7/check_libyaml.c:2:10: fatal error: 'yaml.h' file not found |
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
Running jasmine specsrake aborted! | |
Modal dialog present | |
[remote server] file:///var/folders/0r/jzw528_d75gbznxsjfnn4sz80000gn/T/webdriver-profile20130107-27002-3feaho/extensions/[email protected]/components/command_processor.js:10287:in `nsCommandProcessor.execute' | |
[remote server] file:///var/folders/0r/jzw528_d75gbznxsjfnn4sz80000gn/T/webdriver-profile20130107-27002-3feaho/extensions/[email protected]/components/driver_component.js:7328:in `Dispatcher.executeAs/<' | |
[remote server] file:///var/folders/0r/jzw528_d75gbznxsjfnn4sz80000gn/T/webdriver-profile20130107-27002-3feaho/extensions/[email protected]/components/driver_component.js:7488:in `Resource.handle' | |
[remote server] file:///var/folders/0r/jzw528_d75gbznxsjfnn4sz80000gn/T/webdriver-profile20130107-27002-3feaho/extensions/[email protected]/components/driver_component.js:7435:in `Dispatcher.dispatch' | |
[remote server] file:///var/folders/0r/jzw528_d75gbznxsjfnn4sz80000gn/T/webdriver-profile20130107-27002-3feaho/extensions/fxdriver@g |
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
Loaded Taps v0.3.23 | |
Receiving schema | |
Schema: 0% | | ETA: --:--:-- | |
Schema: 6% |== | ETA: 00:00:48 | |
Schema: 13% |===== | ETA: 00:00:46 | |
Schema: 20% |======== | ETA: 00:00:41 | |
Schema: 26% |========== | ETA: 00:00:38 | |
Schema: 33% |============= | ETA: 00:00:34 | |
Schema: 40% |================ | ETA: 00:00:30 | |
Schema: 46% |=================== | ETA: 00:00:27 |
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
# monkey-patch to raise an exception when attempting to mass-assign a protected attr | |
# more info: http://is.gd/MiA1mn | |
module ActiveModel | |
module MassAssignmentSecurity | |
module Sanitizer | |
protected | |
def warn!(attrs) | |
self.logger.debug "WARNING: Can't mass-assign protected attributes: #{attrs.join(', ')}" if self.logger | |
raise RuntimeError, "these attributes are protected from mass assignment, use `attr_accessible :#{attrs.join(', :')}`" | |
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
Failure/Error: Unable to find matching line from backtrace | |
ActiveRecord::RecordNotUnique: | |
Mysql2::Error: Duplicate entry '1' for key 'PRIMARY': INSERT INTO `nodes` (`type`, `ancestry`, `parent_id`, `name`, `ancestry_depth`, `created_at`, `updated_at`, `active`, `id`) VALUES ('Team', NULL, 2, 'Team 1', 0, '2011-06-26 10:19:42', '2011-06-26 10:19:42', 1, 1) | |
# ./spec/support/custom.rb:18:in `setup_league_structure' | |
# ./spec/support/controller_macros.rb:5:in `block in login_user' |