Skip to content

Instantly share code, notes, and snippets.

View ainar-g's full-sized avatar

Ainar Garipov ainar-g

View GitHub Profile
package main
import (
"encoding/json"
"net/http"
)
var data map[string][]*int
func main() {
#include <stdio.h>
#include <stdlib.h>
struct float_interface {
void *value;
void (*add) (void *rhsp, void *lhsp);
void (*print) (void *rhsp);
void (*scan) (void *rhsp);
};
@ainar-g
ainar-g / pgint.go
Created February 24, 2016 10:39
Testing bigserial on a 64-bit system
package main
import (
"database/sql"
"log"
"math"
_ "github.com/lib/pq"
)
@ainar-g
ainar-g / issue847.bash
Created February 22, 2016 21:16
stoke issue 847
#!/bin/bash
set -e
STOKE=${STOKE:-stoke}
GO=${GO:-go}
cat > popcnt.go <<EOF
package main
@ainar-g
ainar-g / db.go
Created November 5, 2013 18:16
Program that causes panic on db.CreateTable(User{}).
package main
import (
. `fmt`
`github.com/jinzhu/gorm`
_ `github.com/lib/pq`
`time`
)
func panicOn(e error) {