Last active
August 29, 2015 14:18
-
-
Save rafaelp/fe144b6f4962b3d94435 to your computer and use it in GitHub Desktop.
Chamada para snippets pro Graffiti da HE:labs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Vamos colocar alguns snippets de código no Graffiti da HE:labs | |
https://www.dropcam.com/p/helabs | |
Sugira o seu que ele pode entrar na parede, mas tem que ser até final do dia 31 de março (terça)!! | |
Pode ser qualquer linguagem. | |
Ex: | |
while working{ | |
coffee++; | |
} | |
Deixe nos comentários. |
rainbow++ while He.labs
Sieve of Eratosthenes
Daniel Sobral created the Sieve of Eratosthenes which is a algorithm used to determine if a number is prime.
(n: Int) => (2 to n) |> (r => r.foldLeft(r.toSet)((ps, x) => if (ps(x)) ps -- (x * x to n by x) else ps))
require 'endertromb'
module WishScanner
def scan_for_a_wish
wish = self.read.detect do |thought|
thought.index( 'wish: ' ) == 0
end
wish.gsub( 'wish: ', '' )
end
end
Fonte: Poignant Guide (pag. 91)
Seria uma ótima oportunidade para homenagear o Why, qualquer trecho de código deste livro é um pedaço de arte. :D http://www.rubyinside.com/media/poignant-guide.pdf
section .text
global _start
section .data
msg db 'HE:Mobile', 0xa
len equ $ - msg
section .text
_start:
mov edx, len
mov ecx, msg
mov ebx, 1
mov eax, 4
int 0x80
mov ebx, 0
mov eax, 1
int 0x80
int main(int argc, const char * argv[]){
return 0;
//Simplicity is genius
}
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
until $today = friday do
$freezer = false;
end