Skip to content

Instantly share code, notes, and snippets.

execve("./run", ["./run"], [/* 88 vars */]) = 0
arch_prctl(ARCH_SET_FS, 0x499b48) = 0
sched_getaffinity(0, 8192, [f, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...]) = 64
mmap(0xc000000000, 65536, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xc000000000
munmap(0xc000000000, 65536) = 0
mmap(NULL, 262144, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f85bcbda000
mmap(0xc420000000, 1048576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xc420000000
mmap(0xc41fff8000, 32768, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xc41fff8000
mmap(0xc000000000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xc000000000
mmap(NULL, 65536, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f85bcbca000
@scukonick
scukonick / send.py
Last active May 15, 2017 13:46
Python - playing with send function
def gen():
print("running up to yield!")
while 1:
# Receiving value from 'send'
x = yield
print("Incoming: {}".format(x))
if x is None:
print("Exiting")
break
@scukonick
scukonick / disk_test.go
Created June 24, 2017 22:48
Golang Go Threadsafe write to the same file from multiple goroutines
package xxx
import (
"fmt"
"io"
"os"
"strings"
"sync"
"testing"
)
@scukonick
scukonick / test.go
Created June 24, 2017 23:23
Comparsion of channels ws file per goroutine
package file_watcher
import (
"fmt"
"io"
"log"
"os"
"strings"
"sync"
"testing"
func handlerabc(w http.ResponseWriter, r *http.Request) {
bodyBuffer, err := ioutil.ReadAll(r.Body)
if err != nil {
log.Errorf("Error reading: %v", err)
w.WriteHeader(500)
return
}
defer r.Body.Close()
w.WriteHeader(200)