Skip to content

Instantly share code, notes, and snippets.

@andrebq
andrebq / output.txt
Created December 7, 2011 12:08
Go Template test
Executing...
<ul></ul> Broken tag</ul>
@andrebq
andrebq / keycode.go
Created June 6, 2012 13:07
KeyCode constants for glfw+go. Codes extracted from: (https://github.com/elmindreda/glfw/blob/master/include/GL/glfw3.h)
// public domain: http://creativecommons.org/publicdomain/zero/1.0/
package main
const (
KeySpace = 32
KeyApostrophe = 39
KeyComma = 44
KeyMinus = 45
KeyPeriod = 46
KeySlash = 47
@andrebq
andrebq / sdl_opengl.go
Created June 24, 2012 23:46
Just a basic render loop that uses Go + SDL + OpenGL
package main
import (
"github.com/banthar/Go-SDL/sdl"
"github.com/banthar/gl"
)
type Game struct {
Surface *sdl.Surface
Quit bool
@andrebq
andrebq / gist:9136143
Created February 21, 2014 15:24
Error when running particle.exe from go-qml.
panic: invalid memory address or nil pointer dereference
fatal error: panic during malloc
[signal 0xc0000005 code=0x0 addr=0x20 pc=0x41ba0a]
runtime stack:
runtime.panic(0x4f2260, 0x677b0f)
C:/Users/ADMINI~1/AppData/Local/Temp/2/bindist550409343/go/src/pkg/runtime/panic.c:233 +0x2b
runtime: unexpected return pc for runtime.sigpanic called from 0x7577ece2
goroutine 4 [syscall]:
@andrebq
andrebq / boudconn.go
Created March 23, 2015 18:02
Go bounded network listener.
package main
import (
"fmt"
"log"
"net"
"net/http"
"time"
)
@andrebq
andrebq / braking.md
Created March 20, 2019 09:08
Fahrschule

Braking

Standard Braking Distance

  • DE: (Geschwindigkeit / 10) * (Geschwindigkeit / 10)
  • EN: (Speed / 10) * (Speed / 10)

Evasive (Emergency) Braking Distance

  • DE: ((Geschwindigkeit / 10) * (Geschwindigkeit / 10)) / 2
  • EN: ((Speed / 10) * (Speed / 10)) / 2
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>groupId</groupId>
<artifactId>artifactid</artifactId>
<version>1.0-SNAPSHOT</version>
<packaging>jar</packaging>
<name>projectName</name>
@andrebq
andrebq / get-docker.sh
Last active November 23, 2019 17:01
install-docker
#!/bin/sh
set -e
# This script is meant for quick & easy install via:
# $ curl -fsSL https://get.docker.com -o get-docker.sh
# $ sh get-docker.sh
#
# For test builds (ie. release candidates):
# $ curl -fsSL https://test.docker.com -o test-docker.sh
# $ sh test-docker.sh