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
### Keybase proof | |
I hereby claim: | |
* I am keithpitt on github. | |
* I am keithpitt (https://keybase.io/keithpitt) on keybase. | |
* I have a public key whose fingerprint is 287D 82C1 F448 4545 23E6 AE11 2E32 9798 2C44 10DA | |
To claim this, I am signing this object: |
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 <Alex.Sexton@bazaarvoice.com>" | |
, "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
# Install bash | |
$ sudo pkg install bash | |
$ sudo sh -c 'echo "fdesc /dev/fd fdescfs rw 0 0" >> /etc/fstab' | |
$ sudo mount -a | |
$ bash | |
# To change your default shell to bash, you can type: | |
$ sudo chsh -s /usr/local/bin/bash freebsd | |
# This bit isn't great, but the agent requires the bash executable to be at /bin/bash |
OlderNewer