View ftp_proxy.c
#include <stdlib.h>//exit | |
#include <stdio.h> | |
#include <pthread.h> | |
#include <netdb.h> //NI_NUMERICHOST | |
#include <string.h>//strlen | |
#include <unistd.h>//read write close fork | |
#define ss2sa(ss) ((struct sockaddr *)(ss)) | |
#define $(X) if((err=(X))<0)die(__LINE__,err) | |
#define Write(A,B) write(A,B,strlen(B)) | |
#define Read(A,B) len=read(A,B,sizeof(B));buf[len]=0; |
View tpa_extractor.c
#include <fcntl.h> | |
#include <malloc.h> | |
typedef struct{ | |
unsigned id; | |
short padding; | |
unsigned short len; | |
unsigned unk; | |
}TPAheader; | |
typedef struct{ |
View xlc.c
/* libstroph build under win+tcc reminder | |
tcc -I. src/ctx.c src/snprintf.c src/sock.c src/tls_schannel.c src/util.c src/auth.c src/conn.c src/event.c src/handler.c src/hash.c src/jid.c src/md5.c src/sasl.c src/scram.c src/sha1.c src/stanza.c src/thread.c src/parser_expat.c -lws2_32 -ladvapi -lwinmm -lexpat -shared -rdynamic -o libstroph.dll | |
*/ | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <string.h> | |
#include <fcntl.h> | |
#include <windows.h> |
View bms_player_sdl.c
/* | |
http://bm98.yaneu.com/bm98/bmsformat.html | |
http://fileformats.wikia.com/wiki/Be-Music_Script | |
http://mrqqn.net/dotclear/public/beatmaker/bms-specification.txt | |
http://hitkey.nekokan.dyndns.info/cmds.htm | |
*/ | |
#include <malloc.h> | |
#include <string.h> | |
#include <fcntl.h> | |
#include <SDL/SDL.h> |
View win_cgi.c
#include <windows.h> | |
#include <winsock2.h> | |
#include <ws2tcpip.h> | |
#include <stdlib.h> | |
#include <stdio.h> | |
#include <fcntl.h> | |
char page[]="HTTP/1.0 200 OK\n\n" | |
"<!doctype html>" | |
"<html>" |
View gluminess.c
#include <windows.h> | |
#include <GL/gl.h> | |
#include <GL/glext.h> | |
#include <GL/wglext.h> | |
#include <sys/time.h> | |
#define COUNT(A) (sizeof(A)/sizeof(A[0])) | |
#define BLOC_EXIST (1<<0) | |
#define BLOC_COLOR (1<<1) |
View bin_extract.c
#include <stdio.h> | |
#include <string.h> | |
char* headers[]={ | |
"ID3", | |
"GIF89", | |
"‰PNG", | |
"OggS", | |
"ÿØÿà", | |
"BM6x", |
View bin_extract.html
<html> | |
<head> | |
<meta charset="utf8"> | |
<script> | |
var $ =document.querySelector.bind(document); | |
var $$=document.querySelectorAll.bind(document); | |
var magic=[ | |
[[ 73, 68, 51 ],"mp3"], | |
[[ 71, 73, 70, 56, 57],"gif"], |
View sudoku_solver.html
<html> | |
<head> | |
<meta charset="utf8"> | |
<meta content="width=device-width, user-scalable=no" name="viewport"/> | |
<script> | |
$$=function(sel){return [].slice.call(document.querySelectorAll(sel))} | |
function formSolve(){ | |
var grid=(new Grid($$('input').map(function(e){return +e.value}))).solve(); | |
$$('input').forEach(function(input,i){ | |
input.title=grid.grid[i]; |
View xml_parser.html
<html> | |
<head> | |
<title>XMLparser</title> | |
<script> | |
var XMLparser=function(xml){ | |
//parsing part | |
this.stack=[]; | |
this.obj={childNode:[]}; | |
this.getLastChild=function(i){ | |
var pos=this.obj; |
OlderNewer