Skip to content

Instantly share code, notes, and snippets.

View leoromanovsky's full-sized avatar

Leo Romanovsky leoromanovsky

View GitHub Profile
@crofty
crofty / leaflet-google.js
Created March 25, 2012 15:07
Leaflet plugin that enables the use of Google Map tiles - http://matchingnotes.com/using-google-map-tiles-with-leaflet
/*
* L.TileLayer is used for standard xyz-numbered tile layers.
*/
L.Google = L.Class.extend({
includes: L.Mixin.Events,
options: {
minZoom: 0,
maxZoom: 18,
tileSize: 256,
@iainbeeston
iainbeeston / application_helper.rb
Created March 6, 2012 23:43
Facebook real-time updates Rails Metal controller.
module ApplicationHelper
def signature(str, key = nil)
key ||= CONFIG['facebook']['secret'] if defined?(CONFIG)
OpenSSL::HMAC.hexdigest(OpenSSL::Digest::Digest.new('sha1'), key, str)
end
end
@Kalisen
Kalisen / up_plugin
Created December 29, 2011 01:22
list/upgrade plugin's version across all projects
#/bin/sh
PLUGIN_NAME=$1
PLUGIN_VERSION=$2
if [ -z "$1" -o "$1" = "-h" ]
then
echo Usage:
echo List usage of a plugin:
@filtersquad
filtersquad / gcwi.rb
Created June 21, 2011 05:40
A preliminary clicky client example built on api_smith
require 'rubygems'
require 'api_smith'
require 'date'
require 'ipaddr'
module GettinClickyWithIt
class Error < StandardError; end
SMART_NUMBER_TRANSFORMER = lambda { |v| Integer(v) rescue v }
@njvitto
njvitto / deploy.rake
Created April 11, 2010 16:56 — forked from RSpace/deploy.rake
Rakefile to deploy and rollback to Heroku in two different environments (staging and production) for the same app
#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
PRODUCTION_APP = 'YOUR_PRODUCTION_APP_NAME_ON_HEROKU'
STAGING_APP = 'YOUR_STAGING_APP_NAME_ON_HEROKU'
task :staging_migrations => [:set_staging_app, :push, :off, :migrate, :restart, :on, :tag]
task :staging_rollback => [:set_staging_app, :off, :push_previous, :restart, :on]