Skip to content

Instantly share code, notes, and snippets.

Avatar

Shawn Milochik ShawnMilo

View GitHub Profile
View sendkeys.py
#!/usr/bin/env python
import os
import sys
from time import sleep
from random import randrange
import re
fkey = re.compile(r'^F\d$')
@ShawnMilo
ShawnMilo / simple_cookies.go
Created Jul 26, 2019
Simple use of cookies in Go
View simple_cookies.go
package main
import (
"crypto/rand"
"fmt"
"log"
"net/http"
"sync"
"time"
)
View find_ssh.go
package main
import (
"fmt"
"net"
"sync"
"time"
)
var addresses = make(chan string)
@ShawnMilo
ShawnMilo / webhook.go
Created Oct 9, 2017
Listen for GitHub webhooks and keep local repos up to date.
View webhook.go
package main
/*
Listen for calls from GitHub and update local repositories.
*/
import (
"encoding/json"
"fmt"
"io/ioutil"
@ShawnMilo
ShawnMilo / klog.go
Created Jul 26, 2017
kubernetes log combiner
View klog.go
package main
import (
"log"
"os"
"os/exec"
"strings"
"sync"
"time"
)
View auth.py
from hashlib import sha512
from uuid import uuid4
from redis import StrictRedis
__all__ = (
'hash_password', 'create_user', 'login_is_valid',
)
conn = StrictRedis()
@ShawnMilo
ShawnMilo / foe.go
Created Jan 6, 2015
foe. A file search that opens the files found in vim.
View foe.go
package main
import (
"bufio"
"flag"
"log"
"net/http"
"os"
"os/exec"
"path/filepath"
@ShawnMilo
ShawnMilo / ff.go
Created Jan 6, 2015
file finder: Basically a handy replacement for: find . -name '*foo*'
View ff.go
package main
import (
"flag"
"fmt"
"log"
"os"
"path/filepath"
"strings"
)
View cleanup_branches.py
#!/usr/bin/env python
"""
Identify (and potentially delete) remote branches which have already
been merged into the current branch.
It works by using the "git merge-base" command to see if the other branch's
newest commit is already contained in the current branch.
Run normally it does nothing destructive. It will just list branches that
View language_updates.diff
diff --git README.md README.md
index a8f9e20..2426c57 100644
--- README.md
+++ README.md
@@ -2,26 +2,26 @@
[![Build Status](https://travis-ci.org/siddontang/ledisdb.svg?branch=develop)](https://travis-ci.org/siddontang/ledisdb)
-Ledisdb is a high performance NoSQL like Redis written by go. It supports some data structure like kv, list, hash, zset, bitmap,set.
+Ledisdb is a high-performance NoSQL database, similar to Redis, written in [Go](http://golang.org/). It supports many data structures including kv, list, hash, zset, bitmap,set.