Skip to content

Instantly share code, notes, and snippets.

View artob's full-sized avatar
⌨️
Coding

Arto Bendiken artob

⌨️
Coding
View GitHub Profile
// ORIG_SIZE: 18,826,943,581
// PACKED_SIZE: 13,203,414,226
package net.kzk9;
import java.io.*;
import java.util.*;
import org.apache.hadoop.conf.*;
import org.apache.hadoop.hbase.*;
import org.apache.hadoop.hbase.client.*;
@jamster
jamster / github_hire_scraper_censored_for_sensitivity.rb
Created April 4, 2011 20:21
How many fucking people have gitub hired?
require 'rubygems'
require 'activesupport'
require 'bad_ass_extensions'
require 'nokogiri'
require 'open-uri'
class GitHubber
attr_accessor :header, :name, :date, :date_string, :links, :post
def initialize(hash, post)
require 'rubygems'
require "open4"
require "stringio"
require "ruby-debug"
n = 424242
muchoutput = %( ruby -e' #{ n }.times { $stderr << 42.to_s }' )
stdin, stdout, stderr = '', '', ''
@zacharyvoase
zacharyvoase / pythonrc.py
Created May 4, 2011 13:31 — forked from benhodgson/pythonrc.py
Python startup file with completion, history and colored source browsing.
import inspect
import sys
def src(obj):
"""Read the source of an object in the interpreter."""
def highlight(source):
try:
import pygments
@guybrush
guybrush / nodeconf_2011.md
Created May 6, 2011 07:22
a list of slides from nodeconf 2011
require 'httparty'
require 'rdf'
require 'rdf/ntriples'
require 'rdf/nquads'
require 'json'
class Fuseki
include HTTParty
headers 'Accept' => 'text/plain; charset=utf-8'
base_uri 'http://localhost:3030/'
@knowtheory
knowtheory / sql.citrus
Created May 20, 2011 16:24
A Parsing Expression Grammar for parsing an SQL subset. Written as a start to parsing SQL and generating Veritas relations (see: https://github.com/dkubb/veritas )
grammar SQL
rule statement
select_statement <Veritas::SQL::Select>
| set_operation_statement <Veritas::SQL::SetOperation>
| "(" [\s]* statement [\s]* ")"
end
rule set_operation_statement
"(" [\s]* left:select_statement <Veritas::SQL::Select> [\s]* ")"
[\s]* set_operator ([\s]+ distinct:`DISTINCT`)? [\s]*
@michiel
michiel / cors-nginx.conf
Created July 5, 2011 10:41
Wide-open CORS config for nginx
#
# Wide-open CORS config for nginx
#
location / {
if ($request_method = 'OPTIONS') {
add_header 'Access-Control-Allow-Origin' '*';
#
@pibi
pibi / LICENSE
Created July 12, 2011 10:54
Embedding V8 on GWAN
Copyright (c) 2011 pibi, http://pianobit.com
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:
@zacharyvoase
zacharyvoase / caseless_dict.py
Created August 14, 2011 23:20
Fast, case-ignoring and preserving dictionaries in Python.
"""A caseless dictionary implementation."""
from collections import MutableMapping
class CaselessDictionary(MutableMapping):
"""
A dictionary-like object which ignores but preserves the case of strings.