sudo apt-get update && sudo apt-get upgrade && sudo apt-get dist-upgrade && sudo apt-get autoremove
sudo reboot
# Hack to change the Rails cookie serializer from Marshal to JSON and therefore allow the session | |
# to be shared between different languages but also avoid that someone knowing the | |
# cookie secret key could execute arbitrary code on the server by unmarshalling | |
# modified Ruby code added to the session/permanent cookie. | |
# | |
# Note that all users will beed to login again since both the remember me cookie and the session cookies | |
# won't be valid. Note also that the remember me cookie is tested multiple times per request even when it fails. | |
# for performance reasons you might want to delete it if these extra cycles are too costly for you. | |
# | |
# Rails 4 (not tested on Rails 3). |
/****** Current Format ******/ | |
// Basic Message | |
metadata = { | |
id: 1234234234, // Randomly generated by the client. Used for receiving success/fail callbacks | |
client_id: 123456 // Sent from the server with the `websocket_rails.client_connected` event which is sent after the connection is opened. Store this and send it with each message. | |
data: {name: 'shoes'} // Arbitrary data. Can be Object or String. This is available through #message or #data in the controller. | |
} | |
event = ["products.new", metadata] |
/System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/LaunchServices.framework/Versions/A/Support/lsregister -kill -r -domain local -domain user;killall Finder;echo "Open With has been rebuilt, Finder will relaunch" |
.lt-ie9 .top-bar { | |
background: #2f2f2f; | |
*zoom: 1; | |
overflow: visible; | |
} | |
.lt-ie9 .top-bar:before, .lt-ie9 .top-bar:after { | |
content: " "; | |
display: table; | |
} | |
.lt-ie9 .top-bar:after { clear: both; } |
/* The Grid ---------------------- */ | |
.lt-ie9 .row { width: 940px; max-width: 100%; min-width: 768px; margin: 0 auto; } | |
.lt-ie9 .row .row { width: auto; max-width: none; min-width: 0; margin: 0 -15px; } | |
.lt-ie9 .row.large-collapse .column, | |
.lt-ie9 .row.large-collapse .columns { padding: 0; } | |
.lt-ie9 .row .row { width: auto; max-width: none; min-width: 0; margin: 0 -15px; } | |
.lt-ie9 .row .row.large-collapse { margin: 0; } | |
.lt-ie9 .column, .lt-ie9 .columns { float: left; min-height: 1px; padding: 0 15px; position: relative; } | |
.lt-ie9 .column.large-centered, .columns.large-centered { float: none; margin: 0 auto; } |
defaults: | |
:port: 6379 | |
:host: localhost | |
development: | |
:db: 2 | |
:namespace: development | |
# force use of Redis::Distributed | |
:host: | |
- localhost |
Aaron Patterson
https://speakerdeck.com/u/tenderlove/p/aloha-ruby-conference-2012
Zach Holman
#overriding the csv limit, setting it to 30000 instead of the default 10000 | |
module ActiveAdmin | |
class ResourceController | |
module Collection | |
module Pagination | |
def max_csv_records | |
30_000 | |
end | |
end | |
end |
namespace :heroku do | |
namespace :deploy do | |
task :tag do | |
rev = `git rev-parse HEAD`.strip | |
if `git describe --contains #{rev} 2>&1`.include?('cannot describe') | |
version = Time.new.strftime("%Y%m%d%H%M%S") | |
sh "git tag -a heroku-#{version} -m 'Deploy version to Heroku: #{version}'" | |
sh "git push origin master" | |
sh "git push origin master --tags" | |
else |