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
<script type="text/javascript" src="https://getfirebug.com/firebug-lite.js"> | |
{ | |
startOpened: true, | |
enableTrace: true | |
} | |
</script> |
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
#tables | |
for tbl in `psql -qAt -c "select tablename from pg_tables where schemaname = 'public';" YOUR_DB` ; do psql -c "alter table $tbl owner to NEW_OWNER" YOUR_DB ; done | |
#sequences | |
for tbl in `psql -qAt -c "select sequence_name from information_schema.sequences where sequence_schema = 'public';" YOUR_DB` ; do psql -c "alter table $tbl owner to NEW_OWNER" YOUR_DB ; done |
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
# Developer | |
.env | |
# Ignore bundler config | |
/.bundle | |
# Ignore the default SQLite database. | |
/db/*.sqlite3 | |
# Ignore uploads |
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
# For Production you would probably want to default the Log Level to 'INFO' instead of 'DEBUG'. | |
# Rails 3 | |
config.logger = Logger.new(STDOUT) | |
config.logger.level = Logger.const_get( | |
ENV['LOG_LEVEL'] ? ENV['LOG_LEVEL'].upcase : 'DEBUG' | |
) | |
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
# Fix "unpermitted parameters" devise & rails 4 strong parameters issue | |
# registrations_controller.rb | |
class RegistrationsController < Devise::RegistrationsController | |
... | |
def sign_up_params | |
params.require(:user).permit(:email, :username, :whatever, :other, :params) | |
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
=IFERROR(VLOOKUP(F2,'Week 1 '!$R$1:$S$4,2,FALSE),0)+IFERROR(VLOOKUP(G2,'Week 1 '!$R$1:$S$4,2,FALSE),0)+IFERROR(VLOOKUP(H2,'Week 1 '!$R$1:$S$4,2,FALSE),0)+IFERROR(VLOOKUP(I2,'Week 1 '!$R$1:$S$4,2,FALSE),0)+IFERROR(VLOOKUP(J2,'Week 1 '!$R$1:$S$4,2,FALSE),0) |
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
# Rebuilds all RVM rubies with 'approved' version of open SSL. | |
# Taken from https://github.com/pivotal/pivotal_workstation/issues/221#issuecomment-14577443 | |
rvm pkg install openssl; rvm reinstall all --with-open-ssl-dir=$rvm_path/usr --force |
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
select count(*) from pg_stat_activity where pid <> pg_backend_pid() and usename = current_user; |
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
#include all in an override initializer | |
module Devise | |
module Models | |
module Trackable | |
alias_method :original_update_tracked_fields!, :update_tracked_fields! | |
def update_tracked_fields!(request) | |
original_update_tracked_fields!(request) unless request.env["devise.skip_trackable"] |
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
/*jshint browser:true laxcomma:true */ | |
/* | |
* Tiny Carousel 1.9 | |
* http://www.baijs.nl/tinycarousel | |
* | |
* Copyright 2010, Maarten Baijs | |
* Dual licensed under the MIT or GPL Version 2 licenses. | |
* http://www.opensource.org/licenses/mit-license.php | |
* http://www.opensource.org/licenses/gpl-2.0.php |
OlderNewer