Skip to content

Instantly share code, notes, and snippets.

@sehe
sehe / server.c
Created July 25, 2012 01:19 — forked from minitech/server.c
My prototype webserver-thing
#include "xeric-utils.h"
/* The main method. */
int main(int argc, char * argv[]) {
int i;
int port = 80;
struct in_addr address = {0};
/* Parse the arguments: */
for(i = 1; i < argc; i++) {
@sehe
sehe / Makefile
Created March 21, 2012 20:22 — forked from klmr/mini.cpp
Ambiguous function call grammar
all:mini alternative
CPPFLAGS+=-std=c++0x
CPPFLAGS+=-g -O0
%.o:%.cpp
g++ $(CPPFLAGS) $^ -o $@ $(LDFLAGS)
@sehe
sehe / submodule.sh
Created September 10, 2011 14:54
Git is_submodule function
#!/bin/bash
cat >> /dev/null <<"HERE"
Looking good. There is a bug in
for line in $submodules; do cd "$parent_git/$line"; \
if [[ `pwd` = $_git_dir ]]; then return 0; fi; \
done
because it won't cd back (so it would only work if the first submodule