Skip to content

Instantly share code, notes, and snippets.

Henry cryptix

Block or report user

Report or block cryptix

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
@cryptix
cryptix / new.go
Last active Aug 29, 2015
Java>Go PSHDL Simulator
View new.go
package SimpleAlu
type regUpdate struct {
internal, offset int
}
type SimpleAluGenerator struct {
varIdx map[string]int
regUpdates []regUpdate
@cryptix
cryptix / client.go
Created Jul 30, 2014
sharing filedescriptors through unix sockets
View client.go
package main
import (
"math/rand"
"net"
"github.com/cryptix/goremutake"
"github.com/ftrvxmtrx/fd"
)
@cryptix
cryptix / main.go
Created Jul 29, 2014
using go/ast to find specific function calls and the values of a parameter
View main.go
package main
import (
"fmt"
"go/ast"
"go/parser"
"go/token"
"log"
)
@cryptix
cryptix / repro.go
Created Jul 24, 2014
rice doesn't find cmds where a const is used
View repro.go
package main
import (
"fmt"
"github.com/GeertJohan/go.rice"
)
const weirdTmp = "/tmp/weird"
@cryptix
cryptix / client.go
Created Jun 22, 2014
multipart upload with io.Pipe
View client.go
package main
import (
"io"
"log"
"mime/multipart"
"net/http"
"os"
"path/filepath"
"runtime"
@cryptix
cryptix / fotos.go
Created Jun 15, 2014
revel image upload example
View fotos.go
package controllers
import (
"bytes"
"image"
"image/gif"
"image/jpeg"
"image/png"
"io"
"net/http"
@cryptix
cryptix / Dockerfile
Created Jun 13, 2014
postgres docker image
View Dockerfile
# DOCKER-VERSION 1.0.0
FROM postgres:9.3
# install extensions thanks @georged
RUN cd contrib/pgcrypto && make && make install
ADD . /schemaSetup
# try to statup db.. blocks... :/
@cryptix
cryptix / index.html
Created Jun 10, 2014
GopherJS utf8 encoding problem
View index.html
<html>
<head>
<meta charset="utf-8">
<title>test</title>
</head>
<script src="main.js"></script>
<script>
function mkListInJs (id) {
var div = document.getElementById(id);
var ul = document.createElement("ul");
We couldn’t find that file to show.
@cryptix
cryptix / runner.go
Created May 26, 2014
Copying binary ints to a c programm using golangs encoding/binary
View runner.go
package main
import (
"bufio"
"encoding/binary"
"fmt"
"io"
"os"
"os/exec"
"runtime"
You can’t perform that action at this time.