Skip to content

Instantly share code, notes, and snippets.

View igrigorik's full-sized avatar
:octocat:

Ilya Grigorik igrigorik

:octocat:
View GitHub Profile
@jedisct1
jedisct1 / gist:4464574
Last active December 10, 2015 16:59
Computing the pagerank of a natural graph with 33.5 million vertices, 1 billion edges with GraphLab, on a 10 nodes cluster: 118 seconds. 29 iterations is what it takes to converge to a tolerance of 1/10000.
INFO: distributed_ingress_base.hpp(exchange_global_info:493): Graph info:
nverts: 33561139
nedges: 983368362
nreplicas: 84780542
replication factor: 2.52615
#vertices: 33561139 #edges:983368362
INFO: synchronous_engine.hpp(synchronous_engine:994): Engine Option: max_iterations = 50
INFO: synchronous_engine.hpp(synchronous_engine:1004): Engine Option: use_cache = 1
INFO: synchronous_engine.hpp(start:1249): Iteration counter will only output every 5 seconds.
INFO: synchronous_engine.hpp(start:1264): 0: Starting iteration: 0
anonymous
anonymous / gist:4379918
Created December 26, 2012 11:56
Count of repositories in GitHub Archive by language as calculated using Faunus. See http://hortonworks.com/blog/big-graph-data-on-hortonworks-data-platform/ for details.
Apex 308
Arc 29
Assembly 1312
Augeas 19
AutoHotkey 329
D 1667
DCPU-16 Assembly 2
Dart 575
Delphi 974
Erlang 5503
#include <czmq.h>
#define NUM_MESSAGES (50000000)
void no_op(void *unused1, void *unused2) {}
void run_send() {
zctx_t *ctx = zctx_new();
void *outsock = zsocket_new(ctx, ZMQ_PUSH);
zsocket_connect(outsock, "tcp://localhost:5005");
@amitpatelx
amitpatelx / stream.rb
Created December 3, 2012 10:41
Cross domain streaming with Goliath
#!/usr/bin/env ruby
require 'rubygems'
require 'bundler/setup'
require 'goliath'
class RedisPubsub < Goliath::API
use(Rack::Static, :root => Goliath::Application.app_path("public"), :urls => ["/index.html", "/twitter.html", "/favicon.ico", '/stylesheets/', '/javascripts/', '/images/'])
use Goliath::Rack::Params
use Goliath::Rack::Render, 'json'
@mattetti
mattetti / gist:3850240
Created October 8, 2012 01:19
Rakefile to generate a mruby mandelbrot example
# Change the path to match the path to your machine.
$mrb_path = File.expand_path("~/src/mruby")
$mrbc = File.join($mrb_path,"/bin/mrbc")
task :default do
# dumps the Ruby file to disk
File.open("mandelbrot.rb", "w"){|f| f << mandelbrot_ruby_code }
# creates the .c file containing mandelbrot char array for the bytecode
`#{$mrbc} -Bmandelbrot_bytecode ./mandelbrot.rb`
example_file = wrapper_code(File.read("./mandelbrot.c"))
@danparsons
danparsons / gist:3195652
Created July 29, 2012 01:46
How to stream the London 2012 Olympics

How to stream the London 2012 Olympics

There have been several HOWTOs posted regarding streaming the 2012 Olympics using HTTP / SOCKS proxies via SSH and other similar methods. None of these actually work using the latest Flash on Mountain Lion (with Firefox, Chrome or Safari). Additionally, the third-party streaming sites don't provide BBC's amazing interface, which lets you quickly skip to individual competitors and events. However, setting up an OpenVPN server does work, with some tweaks. You'll get the exact same UX that people in England receive.

@paulirish
paulirish / gist:3098860
Created July 12, 2012 15:26
Open Conference Expectations

Open Conference Expectations

This document lays out some baseline expectations between conference speakers and conference presenters. The general goal is to maximize the value the conference provides to its attendees and community and to let speakers know what they might reasonably expect from a conference.

We believe that all speakers should reasonably expect these things, not just speakers who are known to draw large crowds, because no one is a rockstar but more people should have the chance to be one. We believe that conferences are better -- and, dare we say, more diverse -- when the people speaking are not just the people who can afford to get themselves there, either because their company paid or they foot the bill themselves. Basically, this isn't a rock show rider, it's some ideas that should help get the voices of lesser known folks heard.

These expectations should serve as a starting point for discussion between speaker and organizer. They are not a list of demands; they are a list of rea

@unak
unak / history.txt
Last active November 29, 2021 01:40
The History of Ruby
* Only the releases of the stable versions are listed in principle. The releases of the unstable versions especially considered to be important are indicated as "not stable."
* The branches used as the source of each releases are specified, and the branching timing of them are also shown. BTW, before subversionizing of the repository, the term called "trunk" was not used, but this list uses it in order to avoid confusion.
* In order to show a historical backdrop, big conferences (RubyKaigi, RubyConf and Euruko) are also listed. About the venues of such conferences, general English notations are adopted, in my hope.
* ruby_1_8_7 branch was recut from v1_8_7 tag after the 1.8.7 release because of an accident.
* 1.2.1 release was canceled once, and the 2nd release called "repack" was performed. Although there were other examples similar to this, since the re-releases were performed during the same day, it does not write clearly in particular.
* Since 1.0 was released with the date in large quantities, the mi
@igrigorik
igrigorik / pss.rb
Created May 28, 2012 18:18
pagespeed insights API ruby example
require 'net/https'
require 'json'
require 'uri'
#
# Use your project key to query the API
# 1) go to Google API Console: https://code.google.com/apis/console/
# 2) go to "Services" tab and enable "Page Speed Online API"
# 3) go to "API Key" tab and copy your "API Key"
#
@NZKoz
NZKoz / aa_instructions.md
Created May 2, 2012 03:07
Back Up All Your Gmail
  • Install getmail (aptitude install getmail4)
  • Set Up Your Imap Server (tl;dr)
  • getmail
  • ruby date_based_archive.rb ~/Maildir/.Archive