Skip to content

Instantly share code, notes, and snippets.

View lgs's full-sized avatar

Luca G. Soave lgs

View GitHub Profile
package storage
import (
"fmt"
"io/ioutil"
"log"
"net/http"
"os"
"code.google.com/p/goauth2/oauth/jwt"

Rationale

Github makes it easy to start participating to a project. The recommended way of doing this is just fork, push your changes and send a pull request to the origin project. So the question is now, how are projects using this workflow, and which projects are relying on it.

Note: all along, I use a kernel of query to extract pull requests related to forks. The request is limited to one month to keep it under the size limit. As an added bonus, the query provides the average latency between fork and pull-request.

Projects using the fork to pull paradigm

The query named Fork2PullRequestByProject.sql helps sort out the greatest projects using of this feature over the month of april:

@lgs
lgs / load_csv.rb
Created August 21, 2014 16:04 — forked from a-know/load_csv.rb
require 'bundler/setup'
require 'google/api_client'
require 'yaml'
require 'json'
def multipart_boundary
'xxx'
end
# load credential yaml
@lgs
lgs / makeiso.sh
Created August 1, 2014 23:46 — forked from geekle/makeiso.sh
#!/bin/bash
# Creates a bootable ISO from CoreOS' PXE images.
# Also adds a run script to the OEM partition and converts the ISO so it can boot from USB media.
# Based heavily off https://github.com/nyarla/coreos-live-iso - Thanks Naoki!
set -e
# Default configurations
SYSLINUX_VERSION="6.02"
namespace :mongo do
def db_name
Mongoid.database.name
end
def db_connection_options
host, port = Mongoid.database.connection.host_to_try
auths = Mongoid.database.connection.auths
module ActsAsTaggable
module Taggable
def self.included(base)
base.field :tags, :type => Array, :default => []
end
end
module Tagger
def tag(object, tags)
@lgs
lgs / Gemfile
Created May 17, 2014 11:12 — forked from metaskills/Gemfile
gem 'jekyll', '~> 2.0.0.alpha'
gem 'nokogiri'
gem 'redcarpet'
gem 'rouge'
ENV["RAILS_ENV"] = "test"
require File.expand_path('../../config/environment', __FILE__)
require 'rubygems'
gem 'minitest'
require 'minitest/autorun'
require 'action_controller/test_case'
require 'miniskirt'
require 'capybara/rails'
@lgs
lgs / feature.rb
Created April 27, 2014 16:34 — forked from cavalle/feature.rb
require 'meatloaf'
require 'steps'
Feature "Eat candies" do
Scenario "Eat a candy from a jar full of them" do
Given "I have a jar with candies", candies: 10
When "I eat one candy"
Then "the jar won't be empty"
end
#!/usr/bin/python
# e.g. docker ps -a | grep 'my name' | awk '{print $1}' | xargs docker inspect | ./volume-list.py
import json
import fileinput
raw = []
for line in fileinput.input():
raw.append(line)
data = json.loads(''.join(raw))