Skip to content

Instantly share code, notes, and snippets.

Antonio Neto oten

Block or report user

Report or block oten

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View txt2mid.c
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <stdint.h>
#include <ctype.h>
#include <sys/types.h>
#include <unistd.h>
#define write16(fd, n) write((fd), (uint8_t []) {(n) >> 8, (n) & 0xFF}, 2)
#define write32(fd, n) do { \
View nweb23.c
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <errno.h>
#include <string.h>
#include <fcntl.h>
#include <signal.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
@turicas
turicas / converte_datetime_pt.py
Last active Jan 31, 2018
Converts a Portuguese datetime in Python datetime format
View converte_datetime_pt.py
# coding: utf-8
import datetime
MONTHS = {'jan': 1, 'fev': 2, 'mar': 3, 'abr': 4, 'mai': 5, 'jun': 6,
'jul': 7, 'ago': 8, 'set': 9, 'out': 10, 'nov': 11, 'dez': 12}
FULL_MONTHS = {'janeiro': 1, 'fevereiro': 2, u'março': 3, 'abril': 4,
'maio': 5, 'junho': 6, 'julho': 7, 'agosto': 8,
'setembro': 9, 'outubro': 10, 'novembro': 11, 'dezembro': 12}
@kentcdodds
kentcdodds / README.md
Last active May 11, 2019
AngularJS vs jQuery vs pure JavaScript
View README.md

#Hello World Characters of Code Comparison

##JavaScript

Preview

Characters: 700

Lines of JavaScript: 13

@fmasanori
fmasanori / gamename.py
Last active Dec 17, 2015
Jogo de advinhar um nome feminino entre os mais frequentes no Brasil (feito por uma menina de 12 anos)
View gamename.py
import random
nomes = '''Júlia Sophia Isabella Manuela Giovanna Alice Laura
Luiza Beatriz Mariana Yasmin Gabriela Rafaela Isabelle Lara
Letícia Valentina Nicole Sarah Vitória Isadora Lívia Helena
Lorena Clara Larissa Emanuelly Heloisa Marina Melissa Gabrielly
Eduarda Rebeca Amanda Alícia Bianca Lavínia Fernanda Ester
Carolina Emily Cecília Pietra Milena Marcela Laís Natália
Maria Bruna Camila Luana Catarina Olivia Agatha Mirella
Sophie Stella Stefany Isabel Kamilly Elisa Luna Eloá Joana
Mariane Bárbara Juliana Rayssa Alana Caroline Brenda Evelyn
View list-out-of-lambda.js
var empty_list = function(selector) {
return selector(undefined, undefined, true);
};
var prepend = function(el, list) {
return function(selector) {
return selector(el, list, false);
};
};
var head = function(list) {
@ghedo
ghedo / sound_playback.c
Last active Oct 22, 2019
Simple sound playback using ALSA API and libasound
View sound_playback.c
/*
* Simple sound playback using ALSA API and libasound.
*
* Compile:
* $ cc -o play sound_playback.c -lasound
*
* Usage:
* $ ./play <sample_rate> <channels> <seconds> < <file>
*
* Examples:
You can’t perform that action at this time.