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
interface LoginRequest { | |
kind: "LoginRequest"; | |
username: string; | |
password: string; | |
} | |
interface LoginSuccess { | |
kind: "LoginSuccess"; |
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 ( | |
"bytes" | |
"encoding/binary" | |
"fmt" | |
"strconv" | |
"syscall" | |
"unsafe" |
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" | |
import "sync" | |
import "time" | |
import "log" | |
type IDMesg struct { | |
ID string | |
Mesg string |
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" | |
"fmt" | |
"log" | |
"github.com/youtube/vitess/go/vt/sqlparser" | |
) |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<script src="http://cdnjs.cloudflare.com/ajax/libs/rxjs/2.3.22/rx.all.js"></script> | |
<meta charset="utf-8"> | |
<title>JS Bin</title> | |
</head> | |
<body> | |
<script id="jsbin-javascript"> |
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
if test -f /sys/kernel/mm/transparent_hugepage/enabled; then | |
echo never > /sys/kernel/mm/transparent_hugepage/enabled | |
fi | |
if test -f /sys/kernel/mm/transparent_hugepage/defrag; then | |
echo never > /sys/kernel/mm/transparent_hugepage/defrag | |
fi |
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
//go:generate pipeliner map(func(string) (string, error) concurrently as concErrMap into conc_err_map.go | |
func concErrMap(concurrency int, fn func(string) (string, error), in <-chan string) (<-chan string, <-chan error) { | |
out := make(chan string) | |
errc := make(chan error, 1) | |
done := make(chan struct{}) | |
once := sync.Once{} | |
go func() { | |
defer close(out) | |
var outerErr error | |
defer func() { |
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
//go:generate pipeliner map(func(string) string) concurrently as concMap into conc_map.go | |
func concMap(concurrency int, fn func(string) string, in <-chan string) <-chan string { | |
out := make(chan string) | |
go func() { | |
defer close(out) | |
wg := sync.WaitGroup{} | |
wg.Add(concurrency) | |
for i := 0; i < concurrency; i++ { | |
go func() { | |
defer wg.Done() |
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
#!/bin/bash | |
echo "HI" |
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
-A INPUT -p tcp --dport ssh -j ACCEPT | |
-A INPUT -p tcp --dport 1337 -s group:leet -j ACCEPT | |
var groups = map[string][]string{ | |
"leet": []string{"1.2.3.4", "4.3.2.1"}, | |
} | |
yields | |
-A INPUT -p tcp --dport ssh -j ACCEPT |
NewerOlder