Skip to content

Instantly share code, notes, and snippets.


Nicola Junior Vitto njvitto

  • Italy
View GitHub Profile
View gist:8267b84c94ac0b1214e38ff290430e73
Verifying my Blockstack ID is secured with the address 172Edr9bprjFgGJEnKujCt8vWUWmK51aya
njvitto / Facebook likes
Created Sep 8, 2011
Useful script to ask Facebook social graph for how many likes gived an URL
View Facebook likes
<script type="text/javascript">
FB.api('/', {id: "<%= @url_for_FB %>"} ,function(response) {
fb_shares = "0";
if(typeof(response.shares)!=='undefined' && response.shares!=null)
fb_shares = response.shares;
njvitto / deploy.rake
Created Apr 11, 2010 — forked from RSpace/deploy.rake
Rakefile to deploy and rollback to Heroku in two different environments (staging and production) for the same app
View deploy.rake
#Deploy and rollback on Heroku in staging and production
task :deploy_staging => ['deploy:set_staging_app', 'deploy:push', 'deploy:restart', 'deploy:tag']
task :deploy_production => ['deploy:set_production_app', 'deploy:push', 'deploy:restart', 'deploy:tag']
namespace :deploy do
task :staging_migrations => [:set_staging_app, :push, :off, :migrate, :restart, :on, :tag]
task :staging_rollback => [:set_staging_app, :off, :push_previous, :restart, :on]