First add your twitter username and password. Then server.rb and once it's started open websocket.html in your browser. You should see some tweets appear. If not take a look at the javascript console.
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
# put this file in config/initializers | |
# | |
# USAGE: | |
# in your paperclip model: | |
# has_attached_file :document | |
# before_post_process { |c| transliterate_file_name(:document) } | |
module TransliteratePaperclip | |
def transliterate_file_name(paperclip_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
//if you need to andorse all in linkedin just go in to your profil and enter in browser console | |
setInterval(function(){document.getElementsByClassName('endorse-all-btn')[0].click()}, 5000) | |
//an leave your tab for some time |
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
desc "deploy precompiled assets" | |
task :sync_assets, :roles => :app do | |
run_locally 'mv public/no_assets public/assets || true' | |
run_locally 'if [ `find app/assets lib/assets vendor/assets -type f -newer public/assets | wc -l` -gt 0 ] ; then bundle exec rake assets:precompile ; fi' | |
servers = find_servers_for_task(current_task) | |
servers.each do |server| | |
run_locally "rsync -va --delete public/assets/ #{user}@#{server}:#{release_path}/public/assets/" | |
end | |
run_locally 'mv public/assets public/no_assets || true' | |
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
wget --no-check-certificate https://raw.github.com/bagder/curl/master/lib/mk-ca-bundle.pl | |
perl mk-ca-bundle.pl && rm certdata.txt | |
mkdir -p ~/.ssl/ && mv ca-bundle.crt mk-ca-bundle.pl ~/.ssl | |
echo "ca_certificate = ~/.ssl/ca-bundle.crt" >> ~/.wgetrc |
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
require 'rails_admin/config/actions' | |
require 'rails_admin/config/actions/base' | |
module RailsAdminApproveReview | |
end | |
module RailsAdmin | |
module Config | |
module Actions | |
class ApproveReview < RailsAdmin::Config::Actions::Base |
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 "God Process Monitoring" | |
author "Christoph Geschwind <christoph@mixxt.net>" | |
start on runlevel [2345] | |
stop on runlevel [!2345] | |
respawn # respawn the service if it dies | |
respawn limit 5 10 # stop respawning if it fails 5 times in 10 seconds | |
pre-start 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
<?php | |
use LaravelBook\Ardent\Ardent; | |
// You can extend Eloquent | |
// Example: http://laravel.io/bin/89V7 | |
class JsModel extends Ardent { | |
/** | |
* Mapping in an array of Laravel Validator class rules | |
* and jQuery validator rules in format as |
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
class ApplicationController < ActionController::Base | |
... | |
#Problem: | |
#In rails 3.0.1+ it is no longer possible to do this anymore; | |
# rescue_from ActionController::RoutingError, :with => :render_not_found | |
# | |
#The ActionController::RoutingError thrown is not caught by rescue_from. | |
#The alternative is to to set a catch-all route to catch all unmatched routes and send them to a method which renders an error | |
#As in http://techoctave.com/c7/posts/36-rails-3-0-rescue-from-routing-error-solution |
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
{ "keys": ["home"], "command": "move_to", "args": {"to": "bol"} }, | |
{ "keys": ["end"], "command": "move_to", "args": {"to": "eol"} } |
OlderNewer