Skip to content

Instantly share code, notes, and snippets.

View ecin's full-sized avatar
🐶
Woof!

ecin ecin

🐶
Woof!
View GitHub Profile
@ecin
ecin / gist:33132
Created December 7, 2008 11:53 — forked from halbtuerke/gist:31934
RED="\[\033[0;31m\]"
YELLOW="\[\033[0;33m\]"
GREEN="\[\033[0;32m\]"
BLUE="\[\033[0;34m\]"
LIGHT_RED="\[\033[1;31m\]"
LIGHT_GREEN="\[\033[1;32m\]"
WHITE="\[\033[1;37m\]"
LIGHT_GRAY="\[\033[0;37m\]"
COLOR_NONE="\[\e[0m\]"
// Perspective on GSoC •
As told in Philip Johnson's GSoC presentation [1], open source really seems intimidating. It's a bit counterintuitive, though, isn't it? Communities that are open by definition, being intimidating on such a large factor.
I think Dr. Nic puts it best: "Is it silly to guesstimate that the biggest hurdle to people contributing to OSS projects or creating new OSS projects is low estimation of self-worth? It’s a theory." [2] Fact is, it doesn't seem silly at all. A few hours spent lounging in GSoC's IRC channel a week ago would provide a number of students worried about whether or not their current skill level would be enough to warrant applying in the first place.
Google's Summer of Code seems specifically designed to take out the big scary monster out of coding for open source projects: self-doubt. That's something I want to be part of. Plus, I can't ignore the fact that I will come out a better programmer out of all of this while using my love for Ruby in a project, for the aid o
-module(matrix).
-export([do_this_once/0, update_cell/2, read_cell/2]).
%% index is a tuple: {user_id, article_id}
-record(cell, {index, value = 0 }).
do_this_once() ->
mnesia:create_schema([node()]),
mnesia:start(),
mnesia:create_table(cell,
// Our lovely namespace.
var rack = {};
// Access to all set Probes
rack.Probes = {};
// An event will be added through this function
rack.Probes.addEvent = function( pid, timestamp, name, arguments ){
if(!isDefined(rack.Probes[name]))
new rack.Probe(name);
:::object-free
/ pid == $1 /
{
printf("Bai bai, object. We barely knew thee.\n");
}
gem install visionmedia-jspec --source http://gems.github.com
cd ~/Library/Application\ Support/TextMate/Bundles/ &&
git clone git://github.com/visionmedia/jspec.tmbundle.git
gem uninstall visionmedia-commander -v 3.3.0
gem install visionmedia-commander -v 3.2.9 --source http://gems.github.com
/*
Probes fire when a Ruby process starts and ends garbage collection. Perhaps similar to mri_instrumentation's implementation?_
*/
pid$1::rb_gc:entry
{
printf("Garbage Collection has started!\t");
trace(timestamp);
printf("\n");
}
/*
To check for requests, just use an empty middleware, and check for call()s to it. In our case, use Rack::Probe. We can later add more probes to log env data._
This way requires a patched Ruby to be used though. mri_instrumentation must have a better way._
*/
:::function-entry
/copyinstr((int) arg0) == "Rack::Probe" && copyinstr((int) arg1) == "call"/
{
printf("Class: %s \t Method: %s\t", copyinstr((int) arg0), copyinstr((int) arg1));
trace(timestamp);
CPU ID FUNCTION:NAME
0 18791 request_start:request-start / 4726603687031
0 18790 request_done:request-done / 4726603888782
1 18791 request_start:request-start /favicon.ico 4726627369797
1 18790 request_done:request-done /favicon.ico 4726627530357