Skip to content

Instantly share code, notes, and snippets.

View r1r11's full-sized avatar
🍇
berried alive :3

Ririi Nekohara r1r11

🍇
berried alive :3
View GitHub Profile
@chilts
chilts / dump.go
Created September 15, 2016 19:53
Dump entire BoltDB to stdout, including Nested Buckets
package main
import (
"fmt"
"log"
"strings"
"time"
"github.com/boltdb/bolt"
)
#!/bin/bash
trap killgroup SIGINT
killgroup(){
echo "killing..."
kill 0
}
[ -d 'dist' ] || mkdir -p 'dist'
@ds0nt
ds0nt / epic-graph.html
Created March 2, 2016 08:15
Epic mindmap prototype
<body style="background: black;">
<canvas width="900" height="900" style="position: absolute; top: 0; bottom: 0;right: 0; left: 0;"></canvas>
<script type="text/javascript">
var fragShaderSource = `
precision highp float;
uniform vec4 u_color;
void main(void) {
// Untar takes a destination path and a reader; a tar reader loops over the tarfile
// creating the file structure at 'dst' along the way, and writing any files
func Untar(dst string, r io.Reader) error {
gzr, err := gzip.NewReader(r)
if err != nil {
return err
}
defer gzr.Close()
@yowu
yowu / HttpProxy.go
Last active June 4, 2025 03:43
A simple HTTP proxy by Golang
package main
import (
"flag"
"io"
"log"
"net"
"net/http"
"strings"
)
@AllThingsSmitty
AllThingsSmitty / apple-mq.css
Last active June 23, 2022 19:56
iPhone 6/6 Plus and Apple Watch CSS media queries
/* iPhone 6 landscape */
@media only screen and (min-device-width: 375px)
and (max-device-width: 667px)
and (orientation: landscape)
and (-webkit-min-device-pixel-ratio: 2)
{ }
/* iPhone 6 portrait */
@media only screen
and (min-device-width: 375px)
@denji
denji / golang-tls.md
Last active May 14, 2025 16:19 — forked from spikebike/client.go
Simple Golang HTTPS/TLS Examples

Moved to git repository: https://github.com/denji/golang-tls

Generate private key (.key)
# Key considerations for algorithm "RSA" ≥ 2048-bit
openssl genrsa -out server.key 2048

# Key considerations for algorithm "ECDSA" ≥ secp384r1
# List ECDSA the supported curves (openssl ecparam -list_curves)

"A beginning programmer writes her programs like an ant builds her hill, one piece at a time, without thought for the bigger structure. Her programs will be like loose sand. They may stand for a while, but growing too big they fall apart.

Realizing this problem, the programmer will start to spend a lot of time thinking about structure. Her programs will be rigidly structured, like rock sculptures. They are solid, but when they must change, violence must be done to them.

The master programmer knows when to apply structure and when to leave things in their simple form. Her programs are like clay, solid yet malleable."

-- Master Yuan-Ma, The Book of Programming

@yetithefoot
yetithefoot / stuns
Last active January 20, 2025 15:25 — forked from zziuni/stuns
STUN+TURN servers list
{url:'stun:stun01.sipphone.com'},
{url:'stun:stun.ekiga.net'},
{url:'stun:stun.fwdnet.net'},
{url:'stun:stun.ideasip.com'},
{url:'stun:stun.iptel.org'},
{url:'stun:stun.rixtelecom.se'},
{url:'stun:stun.schlund.de'},
{url:'stun:stun.l.google.com:19302'},
{url:'stun:stun1.l.google.com:19302'},
{url:'stun:stun2.l.google.com:19302'},
@psi-4ward
psi-4ward / Busboy_gridfs.js
Created October 24, 2013 11:49
Express example using busboy stream to GridFS
var uploader = function(req, res) {
var busboy = new Busboy({ headers: req.headers });
busboy.on('file', function(fieldname, stream, filename, encoding, contentType) {
var pStream = pauseStream(); // use pause stream to have time to open the GridStore
stream.pipe(pStream.pause());
console.log('POST ' + req.originalUrl + ' File: '+ filename + ' Field: ' + fieldname);
cntProcessingFiles++;