Skip to content

Instantly share code, notes, and snippets.

View diegopacheco's full-sized avatar

Diego Pacheco diegopacheco

View GitHub Profile
object HelloWorld {
def p(m: String) {
println(m)
}
def main(args: Array[String]) {
p("Hello, world!")
}
@diegopacheco
diegopacheco / walk_this_way.txt
Created September 30, 2011 18:20
Walk This Way
Backstroke lover always hidin' 'neath the covers
'Til I talked to your daddy he say
He said you ain't seen nothin' 'til you're down on a MUFF AND
Then you're sure to be a-changin' your way
I met a cheerleader was a real young bleeder
Oh the times I could reminisce
'Cause the best things of lovin' with her sister and her cousin
Only started with a little kiss
A like this
@diegopacheco
diegopacheco / app.py
Created October 10, 2011 21:51
Python Redimon All interfaces sample: app.run(host='10.99.2.84', port=5000, debug=True)
from flask import Flask, render_template, jsonify
from lib.stats import RedisMonitor
from settings import SERVERS
try:
import json
except:
import simplejson as json
@diegopacheco
diegopacheco / jmxweb.rb
Created October 14, 2011 03:41
DevOps JMX Web with Sinatra & Ruby
require 'rubygems'
require 'sinatra'
get '/' do
File.open('jmxweb.out').read.gsub("\n", "<br/>")
end
@diegopacheco
diegopacheco / closure.clj
Created October 15, 2011 09:41
Closure in Clojure: High Order Functions
(((fn closure[n]
(fn [x]
(Math/pow x n)
)
) 2) 16)
@diegopacheco
diegopacheco / ps3-wishlist.markdown
Created November 28, 2011 01:39
PS3 Games Wishlist
@diegopacheco
diegopacheco / funcsoc.list.md
Created December 6, 2011 13:23
Functional Society
@diegopacheco
diegopacheco / 1-meetup-functional-society.md
Created December 16, 2011 19:31
Functional Society #1 meetup 14/01/2012

First Meetup 14/01/2012

It's time!!! Let's meet each other on kick ass event at Porto Alegre.
Our very first meetup will be 14/01/2012(saturday) at 671, Jari st - Passo da Areia - Porto Alegre
Google Maps Adress => http://g.co/maps/frjub

Schedulle

@diegopacheco
diegopacheco / AnonymousFunctionMain.scala
Created January 7, 2012 02:48
Scala Anonymous Function
object AnonymousFunctionMain {
def main(args: Array[String]): Unit = {
logCall( () => println("Chamada de metodo atual!") )
}
def logCall(callback: () => Unit): Unit = {
print("Log antes de chamar seu metodo... Invocado as : " + System.currentTimeMillis + "\n")
callback
}
@diegopacheco
diegopacheco / CurryingFunctions.scala
Created January 7, 2012 03:00
Scala Currying Functions
object CurryingFunctions {
def times(n:Int)(f: => Unit) = for(i <- 1 to n){ f }
def main(args: Array[String]) {
times(5){
println("Hey")
}
}
}