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
// Use freely with source code level attribution (a comment in the source code linking to this page is fine) | |
package foo | |
import ( | |
"fmt" | |
"net" | |
"os" | |
"strings" | |
) |
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
# Requires GNU Parallel | |
# e.g. `sudo apt-get install parallel` | |
CC_WIN32=i686-w64-mingw32-gcc | |
CC_WIN64=x86_64-w64-mingw32-gcc | |
name=`basename \`pwd\`` | |
tasks=" | |
env GOOS=linux GOARCH=386 CGO_ENABLED=1 go build -trimpath -o bin/${name}32 | |
env GOOS=linux GOARCH=amd64 CGO_ENABLED=1 go build -trimpath -o bin/${name}64 |
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
''' | |
nc.py - simple python3 wrapper to netcat (nc) | |
============================================= | |
Introducton | |
----------- | |
Netcat (http://nc110.sourceforge.net/) is a simple Unix utility which reads and | |
writes data across network connections. If you are running Linux, you probably | |
have a version of netcat installed already. |
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
# reuse freely | |
from datetime import datetime, timezone, timedelta | |
# usage: naturaltime.to_text(some_datetime) | |
def past(dt, dif): | |
if dif.days > 2: |
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
// DebugMessageCallbackARB arguments are garbled by some drivers. This is a limited safer version that will try to safely print /something/ useful | |
void FormatDebugOutputARB | |
( | |
int d0, // accepts buggy parameters in any order | |
int d1, | |
int d2, | |
int d3 | |
) | |
{ |