Skip to content

Instantly share code, notes, and snippets.

@timurvafin
timurvafin / copy.rb
Created July 24, 2013 15:46
Copy members from one Github team to other
#!/usr/bin/env ruby
# copy members from one team to other
require 'json'
source_team_id =
target_team_id =
token = ''
@timurvafin
timurvafin / route_collector.rb
Last active December 14, 2015 11:50
Allow to store api_taster definitions in the app/api_tasters separated by files.
# app/api_tasters/posts.rb
ApiTaster::RouteCollector.route do
get '/posts'
end
# app/api_tasters/comments.rb
ApiTaster::RouteCollector.route do
get '/comments'
end
$ heroku addons:add deployhooks:http \
--url=http://airbrake.io/deploys.txt?deploy[rails_env]=RAILS_ENV&api_key=API_KEY&deploy[local_username]={{user}}&deploy[scm_revision]={{head_long}}&deploy[scm_repository]=SCM_REPOSITORY
$ heroku addons:add deployhooks:campfire \
--url=URL \
--ssl=1 \
--api_key=API_KEY \
--room="ROOM_NAME" \
--message="{{user}} deployed {{head}} to {{app}} {{url}}"
{
"bold_folder_labels": true,
"color_scheme": "Packages/Theme - Aqua/Color Schemes/Espresso Aqua.tmTheme",
"create_window_at_startup": false,
"detect_indentation": false,
"fallback_encoding": "UTF-8",
"font_face": "Monaco",
"font_size": 18,
"highlight_line": true,
"highlight_modified_tabs": true,
@timurvafin
timurvafin / Gemfile
Created October 13, 2012 07:49
Get http requests benchmark: sync vs. celluloid vs. em
source :rubygems
gem 'celluloid'
gem 'em-synchrony'
gem 'em-http-request'
# Returns activity by friends
#
# @note Undocumented
# @rate_limited Yes
# @authentication_required Yes
# @raise [Twitter::Error::Unauthorized] Error raised when supplied user credentials are not valid./
# @return [Array] An array of actions
# @param options [Hash] A customizable set of options.
# @option options [Integer] :count Specifies the number of records to retrieve. Must be less than or equal to 100.
# @option options [Integer] :since_id Returns results with an ID greater than (that is, more recent than) the specified ID.
#!/usr/bin/env ruby
require 'rubygems'
require 'bundler/setup'
require 'highrise'
module HighriseContactCreator
class Contact
end
#!/usr/bin/env ruby
$LOAD_PATH.unshift File.join(File.dirname(__FILE__), '../lib')
require 'rubygems'
require 'bundler/setup'
require 'highrise'
require 'notescript'
HIGHRISE_SITE = 'https://fsateam.highrisehq.com'
merged_attributes = if included_attributes.last.is_a?(Hash)
included_attributes.pop
else
{ }
end