Skip to content

Instantly share code, notes, and snippets.

@glacjay
glacjay / sudoku.go
Created July 9, 2011 10:35
Solve Sudoku problems in Go.
package main
import (
"io/ioutil"
"log"
"os"
"regexp"
"strings"
)
@glacjay
glacjay / gist:856140
Created March 5, 2011 05:13
Show a problem about CR/LF under Linux.
# Save this file using DOS's CR/LF.
export VAR1=blahblahblah
export VAR2=hello
export VAR1=$VAR1:$VAR2
@glacjay
glacjay / gist:856270
Created March 5, 2011 09:59
A simple tool to find out a particular machine's IP address within a LAN.
#include <stdio.h>
#include <stdlib.h>
#include <errno.h>
#include <string.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <pthread.h>
#include <unistd.h>
#include <arpa/inet.h>