This file contains hidden or 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
| /* | |
| Opens multiple connections to 127.0.0.1:2222 until an error occurs. | |
| It displays a counter of the number of open connections so far. | |
| As soon as an error occurs, it prints the error and exits. | |
| The counter will be the number of open connections at the time of error. | |
| */ | |
| #include <stdio.h> | |
| #include <stdlib.h> | |
| #include <sys/socket.h> |
This file contains hidden or 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 | |
| num_dockers=3 | |
| docker_image=dind | |
| ######################################## | |
| deferred=() | |
| deferred_pid=$BASHPID | |
| run_deferred() { | |
| if [[ "$deferred_pid" != $BASHPID ]]; then |
This file contains hidden or 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 ( | |
| sm "github.com/phemmer/sawmill" | |
| ) | |
| type mymap map[string]interface{} | |
| type mystruct struct { | |
| Foo string | |
| Bar string |
This file contains hidden or 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
| // import tmp/97g | |
| package main | |
| import ( | |
| "database/sql" | |
| "fmt" | |
| "log" | |
| "math/rand" | |
| "strconv" | |
| "time" |
This file contains hidden or 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
| #include <stdlib.h> | |
| #include <stdio.h> | |
| int main() { | |
| char *buf; | |
| int i; | |
| for (i = 0; i < 2048; i++) { | |
| buf = (char *) malloc(1024*1024); | |
| printf("buf=%p\n", buf); |
This file contains hidden or 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 | |
| eval "$(go env)" | |
| function clean_gopath() { | |
| gopath="$1" | |
| pkgpath="$gopath/pkg/${GOHOSTOS}_$GOHOSTARCH" | |
| if [[ ! -e "$pkgpath" ]]; then | |
| return | |
| fi |
This file contains hidden or 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 | |
| exec 3> >(ipset restore) | |
| echo 'create blacklist hash:net -exist' >&3 | |
| echo 'create blacklist_new hash:net -exist' >&3 | |
| echo 'flush blacklist_new' >&3 | |
| #echo "http://www.spamhaus.org/drop/drop.txt" | |
| while read ip; do | |
| echo "add blacklist_new $ip" >&3 |
This file contains hidden or 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
| TEST DEFINITIONS ::= BEGIN | |
| testOID ::= { 1 2 3 } | |
| testTable OBJECT-TYPE | |
| SYNTAX SEQUENCE OF testTableEntry | |
| MAX-ACCESS not-accessible | |
| STATUS current | |
| ::= { testOID 0 } |
This file contains hidden or 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 | |
| self_path="$(readlink -f "$0")" | |
| self_dir="${self_path%/*}" | |
| #unset PWD # screws with go package path detection | |
| IFS=$'\n' read -d '' -a gdms < <(which -a gdm) | |
| realgdm= | |
| foundself= | |
| for gdm in "${gdms[@]}"; do |
This file contains hidden or 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
| SIGQUIT: quit | |
| PC=0x458e7e m=0 sigcode=65537 | |
| goroutine 0 [idle]: | |
| runtime.sys_umtx_op(0xee3bd8, 0xf, 0x18, 0x0, 0x800000004, 0x400ee3540, 0x0, 0x422c5e, 0xc51e80, 0x7fffffffe9d0, ...) | |
| /usr/local/go/src/runtime/sys_freebsd_amd64.s:21 +0x1e | |
| runtime.futexsleep1(0xee3bd8, 0x0, 0xffffffffffffffff) | |
| /usr/local/go/src/runtime/os_freebsd.go:92 +0x5d | |
| runtime.futexsleep.func1() | |
| /usr/local/go/src/runtime/os_freebsd.go:80 +0x3a |
NewerOlder