Skip to content

Instantly share code, notes, and snippets.

View robertodecurnex's full-sized avatar

Roberto Decurnex robertodecurnex

View GitHub Profile
@robertodecurnex
robertodecurnex / conventional_naming.rb
Last active August 29, 2015 14:19
where the wild ruby-things are
# upper-camel case
class ClassLikeName
end
# lower-snake case
def method_like_name
return 'method return value'
end
ClassLikeName #=> ClassLikeName
@robertodecurnex
robertodecurnex / heredoc
Last active August 29, 2015 14:17
Having Fun With Unicode and String Literals
puts <<THIS_IS_A_HEREDOC
And this is the content of the heredoc.
It's obviously multi-line.
And it's great for creating help messages and things like that.
THIS_IS_A_HEREDOC
#=> And this is the content of the heredoc.
# It's obviously multi-line.
# And it's great for creating help messages and things like that.
λ = lambda {|name| "#{name} es un maricon que no se banca el alfabeto griego"}
λ.call('Franquito')
#=> "Franquito es un maricon que no se banca el alfabeto griego"
class Sample
def hello name
# sc
end
def sum n1, n2
# sc sum n1, n2
end
@robertodecurnex
robertodecurnex / PHPConfAr Schedule
Created November 6, 2014 20:44
PHP Conf AR Schedule
Things I love about Go - 9:30 - 10:20 @ Room A
API Pain-Points - 10:40 - 11:30 @ Room A
Keynote - 11:50 - 12:40 @ Room A
Logs: What they eat, how they live and reproduce - 14:10 - 15:00 @ Room C
Cryptography for programmers - 15:20 - 16:10 @ Room C
ipython notebook (with ruby!) - 16:30 - 17:20 @ Room C
Hello, is this PHP? – Picking up phone calls with PHP (and much more) - 17:40 - 18:10 @ Room A
Python development on embedded systems - 9:30 - 10:20 @ Room B
Performance testing crash course - 10:40 - 11:30 @ Room B
@robertodecurnex
robertodecurnex / ramdomart.c
Created October 22, 2014 20:20
Randomart generation (from the openssh-client)
/*
* Draw an ASCII-Art representing the fingerprint so human brain can
* profit from its built-in pattern recognition ability.
* This technique is called "random art" and can be found in some
* scientific publications like this original paper:
*
* "Hash Visualization: a New Technique to improve Real-World Security",
* Perrig A. and Song D., 1999, International Workshop on Cryptographic
* Techniques and E-Commerce (CrypTEC '99)
* sparrow.ece.cmu.edu/~adrian/projects/validation/validation.pdf
@robertodecurnex
robertodecurnex / input.rb
Created September 19, 2014 19:16
CS Example
class Say
def hello to='Minion'
#sc say_hello(to)
end
end
puts Say.new.hello
__END__
sc say_hello String: String
@robertodecurnex
robertodecurnex / hello.rb
Last active August 29, 2015 14:02
Ruby Parser (Writing a Ruby to JS parser 5' demo)
class Pepe
def name
puts "Pepe"
end
end
message = "Hello "
puts(message)
@robertodecurnex
robertodecurnex / log
Last active August 29, 2015 13:56
Assets are down!
application-f8cb1d6887cb20ae0e9a1ba94629841b.css
GET
504
home-f912ecc53e34423bf65747aadb8739b1.css
GET
504
jquery.fancybox-1.3.4.css
GET
@robertodecurnex
robertodecurnex / routes.rb
Created November 7, 2012 03:18
The default routes of a resource do not let you *modify* a resource partially.
MyApp::Application.routes.draw do
resources :users`
end