This file contains hidden or 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
| static void ev_clienteconecta(int epoll, int sock) { | |
| struct sockaddr in_addr; | |
| socklen_t in_len; | |
| int status, cliente; | |
| char host[NI_MAXHOST], porta[NI_MAXSERV]; | |
| while (1) { | |
| in_len = sizeof(in_addr); | |
| cliente = accept(sock, &in_addr, &in_len); | |
| if (cliente == -1) { |
This file contains hidden or 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
| static void ev_clientedadosdisp(int sock) { | |
| int concluido = 0; | |
| ssize_t qtd; | |
| char buf[TAMBUFFER]; | |
| while (1) { | |
| qtd = read(sock, buf, sizeof(buf)); | |
| if (qtd == -1) { | |
| // Se o erro for EAGAIN significa que todos os dados foram lidos. | |
| if (errno != EAGAIN) { |
This file contains hidden or 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
| #!/usr/bin/env zsh | |
| iw dev wlan0 station dump | grep -i Station | cut -d " " -f 2 | xargs -I % zsh -c "echo '%: '; grep -i % /etc/dhcpd.conf" |
This file contains hidden or 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
| // MAYAN_COUNT_TO_JD -- Determina o dia do Calendário Juliano na Contagem Longa Maia | |
| var MAYAN_COUNT_EPOCH = 584282.5; | |
| function mayan_count_to_jd(baktun, katun, tun, uinal, kin) { | |
| return MAYAN_COUNT_EPOCH + | |
| (baktun * 144000) + | |
| (katun * 7200) + | |
| (tun * 360) + | |
| (uinal * 20) + |
This file contains hidden or 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
| #Decorador de Função | |
| def coroutine(func): | |
| def start(*args,**kwargs): | |
| cr = func(*args,**kwargs) | |
| next(cr) | |
| return cr | |
| return start | |
| # Source | |
| def source_fizzbuzz(fim, target): |
This file contains hidden or 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
| 10 PRINT "Hello, world." | |
| 20 END |
This file contains hidden or 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
| PROGRAM HELLO | |
| WRITE (*,100) | |
| STOP | |
| 100 FORMAT (' Hello, world. ' /) | |
| END |
This file contains hidden or 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
| program HelloWorld(output) | |
| begin | |
| WriteLn('Hello, world.'); | |
| end. |
This file contains hidden or 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
| #include <GL/glut.h> | |
| #define font GLUT_BITMAP_HELVETICA_18 | |
| #define tx "Hello, world." | |
| void text(void) | |
| { | |
| char *p, tex[] = tx; | |
| p = tex; | |
| glColor3d(1.0, 1.0, 0.0); | |
| glRasterPos2d(-.5, 0.); |
This file contains hidden or 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
| (defun helloworld () | |
| (print "Hello, world.") | |
| ) |