View postgres.go
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"database/sql" | |
"fmt" | |
"net/url" | |
"os" | |
"reflect" | |
"regexp" | |
"strconv" |
View main.cpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Bare-bone REAPER extension | |
// | |
// 1. Grab reaper_plugin.h from https://raw.githubusercontent.com/reaper-oss/sws/master/reaper/reaper_plugin.h | |
// 2. Grab reaper_plugin_functions.h by running the REAPER action "[developer] Write C++ API functions header" | |
// 3. Grab WDL: git clone https://github.com/justinfrankel/WDL.git | |
// 4. Build then copy or link the binary file into <REAPER resource directory>/UserPlugins | |
// | |
// Linux | |
// ===== | |
// |
View main.go
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// simple example how to use azul3d.org/audio | |
// | |
// run it with SoX | |
// go run main.go | play - | |
// | |
// or save it to a file | |
// go run main.go > test.wav | |
// | |
package main |
View errloop.sublime-snippet
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<snippet> | |
<content><![CDATA[ | |
var ( | |
// define the variables here that are shared along the steps | |
// most variables should only by defined by the type here | |
// and are assigned inside the steps | |
err error | |
${1:} | |
) |
View main.go
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"errors" | |
) | |
var Err = errors.New("test err") | |
func addOne(y, x int) (int, error) { | |
if x%y == 0 { |
View index.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html lang="en"> | |
<head> | |
<meta charset="utf-8"> | |
<meta http-equiv="X-UA-Compatible" content="IE=edge"> | |
<meta name="viewport" content="width=device-width, initial-scale=1"> | |
<title>Bootstrap 101 Template</title> | |
<!-- Bootstrap --> | |
<!-- Latest compiled and minified CSS --> |
View .gtkrc-2.0
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
style "claws-folder-view" { | |
fg[NORMAL] = "#ffffff" | |
fg[ACTIVE] = "#ffffff" | |
fg[INSENSITIVE] = "#D5DCE0" | |
fg[PRELIGHT] = "#ffffff" | |
fg[SELECTED] = "#ffffff" | |
bg[ACTIVE] = "#7CA4CF" | |
bg[NORMAL] = "#686B6D" |
View latency.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Latency Comparison Numbers | |
-------------------------- | |
L1 cache reference 0.5 ns | |
Branch mispredict 5 ns | |
L2 cache reference 7 ns 14x L1 cache | |
Mutex lock/unlock 25 ns | |
Main memory reference 100 ns 20x L2 cache, 200x L1 cache | |
Compress 1K bytes with Zippy 3,000 ns | |
Send 1K bytes over 1 Gbps network 10,000 ns 0.01 ms | |
Read 4K randomly from SSD* 150,000 ns 0.15 ms |
View limit.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- limit the number of connections, username is allowed to use | |
ALTER Role username CONNECTION LIMIT 10; |
View gist:4623836
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import "fmt" | |
type Foo struct{} | |
func (f *Foo) Method() { | |
fmt.Println("Method") | |
} | |
type Funcs []func(*Foo) |
NewerOlder