Skip to content

Instantly share code, notes, and snippets.

lucapette lucapette

  • Berlin, Germany
Block or report user

Report or block lucapette

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View date.rb
[1] pry(main)>
NoMethodError: undefined method `today' for Date:Class
from (pry):1:in `__pry__'
[2] pry(main)> require 'date'
=> true
[3] pry(main)>
=> #<Date: 2015-03-05 ((2457087j,0s,0n),+0s,2299161j)>
[4] pry(main)>
View quine_define.c
#define t(x) main(){printf(#x"\nt("#x")\n");}
t(#define t(x) main(){printf(#x"\nt("#x")\n");})
View quine.c
char *s="char *s=%c%s%c%c%c%cmain()%c{%c printf(c,10,34,c,34,59,10);%c printf(s,34,s,34,59,10,10,10,10,10,10,10);%c}%c";
lucapette /
Created Sep 25, 2010
a stupid perl script from my childhood
#!/usr/bin/perl -w
use strict;
my %letters=(
"A" => "ALFA",
"B" => "BRAVO",
"C" => "CHARLIE",
"D" => "DELTA",
"E" => "ECHO",
lucapette / application.html.erb
Created Sep 19, 2011
jquery ui tables in rails
View application.html.erb
<!DOCTYPE html>
<%= stylesheet_link_tag "application" %>
<%= javascript_include_tag :defaults %>
<%= csrf_meta_tag %>
<%= yield(:head) %>
<%=javascript_tag "$(document).ready(init)" %>
View 404
#!/usr/bin/env ruby
require 'rubygems'
require 'anemone'
require 'optparse'
require 'ostruct'
Anemone.crawl(ARGV[0], {:discard_page_bodies => true}) do |anemone|
anemone.after_crawl do |pages|
View toy.rb
class Array
def self.toy(n=10, &block)
block_given? ?,&block) : {|i| i+1}
class Hash
def self.toy(n=10)
Hash[Array.toy(n).zip(Array.toy(n){|c| (96+(c+1)).chr})]
lucapette / application.css
Created Oct 19, 2011
twitter bootstrap rails 3.1 notes
View application.css
*= require_self
html, body {
background-color: #eee;
body {
padding-top: 40px; /* 40px to make the container go all the way to the bottom of the topbar */

Twitter was failing me badly so I quickly wrote down a random list of reasons why I think (of course, that's just my opinion) code challenges hurt diversity:

  • A lot of people performed badly at exams at uni (or any other form of exam). I can correlate to this very well as I was getting really nervous when taking an exam. I think it's kinda of normal to see code challenges as an exam. I know of people that wouldn't apply because of this reason. After seeing a lot of bad usages of this hiring tool, I wouldn't apply in most cases either.
  • I think it's safe to assume code challenges acts as a filter. All our hiring techinques do and that's fine. My "problem" with this one is that it brings a lot of false negatives. The challenge may be badly written, the person may not have the time to commit to it. And junior developers can get really scared by this.
  • Code challenges are generally meant to hire the bar of seniority and I find that highly counterintuitive. Based on my experience, the more senior a person is,
lucapette / tumblr-tags
Created Dec 3, 2011
get all the tags of a tumblr blog
View tumblr-tags
#!/usr/bin/env ruby
require "json"
require "set"
require "net/http"
require 'uri'
def fetch(uri_str, limit = 10)
raise ArgumentError, 'HTTP redirect too deep' if limit == 0
You can’t perform that action at this time.