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
#!/bin/sh | |
BACKUP_DIR='/var/lib/pgsql/backups/' | |
FINAL_FILE='backup.gz' | |
TMP_FILE='tmp.gz' | |
BACKUP_TMP_FILE="$BACKUP_DIR$TMP_FILE" |
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
#! /bin/sh | |
# | |
# chkconfig: - 55 45 | |
# description: The memcached daemon is a network memory cache service. | |
# processname: memcached | |
# config: /etc/sysconfig/memcached | |
# Standard LSB functions | |
#. /lib/lsb/init-functions |
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
global.TestHelper = { | |
loadFixtures: function(db) { | |
var file = fs.readFileSync("fixtures.yml").toString(); | |
var fixtures = yaml.eval(file); | |
for(var table in fixtures) { | |
db.collection(table, function(err, collection) { | |
collection.remove(); |
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
member = Member.create(:username => "keith") | |
Relationship.exists?( :member1_id => member ) # Fails | |
Relationship.exists?( :member1_id => member.id ) # Works |
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
def merge_suppliers | |
@supplier_from = Supplier.find(params[:id]) | |
begin | |
@supplier_to = Supplier.find(params[:supplier_id]) | |
rescue ActiveRecord::RecordNotFound | |
flash[:error] = "#{t('object.supplier')} #{t('messages.not_found')}" | |
return redirect_to(manage_supplier_path(@supplier_from.id)) | |
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
+++ b/lib/locomotive/liquid/tags/paginate.rb | |
@@ -42,7 +42,7 @@ module Locomotive | |
page_count, current_page = pagination['total_pages'], pagination['current_page'] | |
- path = context.registers[:page].fullpath | |
+ path = context.registers[:controller].request.fullpath | |
pagination['previous'] = link(I18n.t('pagination.previous'), current_page - 1, path) if pagination['previous_page'] | |
pagination['next'] = link(I18n.t('pagination.next'), current_page + 1, path) if pagination['next_page'] |
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
export RELEASE_NOTES = `git log --format=oneline | grep "$GIT_COMMIT" | sed -e 's/'${GIT_COMMIT}'//'` |
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
{ "description" : "Sproutcore Handlebars Precompiler" | |
, "version" : "0.1.0" | |
, "author" : "Alex Sexton <[email protected]>" | |
, "engines" : ["node >=0.4.7"] | |
, "main" : "./lib/main" | |
, "dependencies": { | |
"handlebars": "1.0.x" | |
} | |
} |
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
These tests are very un-scientific. We just loaded up | |
these pages on our local netfox, refreshed a few times, | |
and tool a ballpark average of the results. | |
As someone mentioned on Twitter, these are very different | |
frameworks - all doing very different things. This is not | |
intended to mean a (Backbone is better than Ember) type page. | |
Its just some numbers that I thought were interesting. |
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
❯ time ~/.rbenv/shims/ruby -e 'exit' redthread-provisioner/git/master | |
~/.rbenv/shims/ruby -e 'exit' 0.10s user 0.11s system 97% cpu 0.210 total | |
❯ time ~/.rbenv/versions/1.9.3-p194-perf/bin/ruby -e 'exit' redthread-provisioner/git/master | |
~/.rbenv/versions/1.9.3-p194-perf/bin/ruby -e 'exit' 0.02s user 0.02s system 94% cpu 0.047 total |
OlderNewer