Skip to content

Instantly share code, notes, and snippets.

@rafaelp
Last active August 29, 2015 14:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rafaelp/fe144b6f4962b3d94435 to your computer and use it in GitHub Desktop.
Save rafaelp/fe144b6f4962b3d94435 to your computer and use it in GitHub Desktop.
Chamada para snippets pro Graffiti da HE:labs
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.
@feliperomanorj
Copy link

until $today = friday do
$freezer = false;
end

@waldofe
Copy link

waldofe commented Mar 30, 2015

rainbow++ while He.labs

@dgomesbr
Copy link

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))

@rogerleite
Copy link

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

@gbrennon
Copy link

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

@nicolasiensen
Copy link

int main(int argc, const char * argv[]){
    return 0;
    //Simplicity is genius
}

http://instacod.es/84847

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment