Skip to content

Instantly share code, notes, and snippets.

View juwencheng's full-sized avatar
🏠
Working from home

Juwencheng juwencheng

🏠
Working from home
View GitHub Profile
@juwencheng
juwencheng / git-fancy-pancy.sh
Created April 13, 2016 09:32 — forked from sverweij/git-fancy-pancy.sh
Fancy command line git history
# shamelessly copied from @d
git log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --date=relative
@juwencheng
juwencheng / compress.go
Created January 10, 2017 13:19 — forked from iamralch/compress.go
ZIP archives in Golang
import (
"archive/zip"
"io"
"os"
"path/filepath"
"strings"
)
func zipit(source, target string) error {
zipfile, err := os.Create(target)
@juwencheng
juwencheng / min-char-rnn.py
Last active May 13, 2017 05:48 — forked from karpathy/min-char-rnn.py
Minimal character-level language model with a Vanilla Recurrent Neural Network, in Python/numpy
"""
Minimal character-level Vanilla RNN model. Written by Andrej Karpathy (@karpathy)
BSD License
"""
import numpy as np
# data I/O
data = open('input.txt', 'r').read() # should be simple plain text file
chars = list(set(data))
data_size, vocab_size = len(data), len(chars)
@juwencheng
juwencheng / install-manifest.plist
Created July 17, 2017 08:56 — forked from alexcristea/install-manifest.plist
Over-the-Air Ad Hoc Distribution manifest for iOS8. More about this subject you can find on http://www.informit.com/articles/article.aspx?p=1829415&seqNum=16
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<!-- array of downloads. -->
<key>items</key>
<array>
<dict>
<!-- an array of assets to download -->
@juwencheng
juwencheng / web-servers.md
Created July 8, 2018 01:34 — forked from willurd/web-servers.md
Big list of http static server one-liners

Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.

Discussion on reddit.

Python 2.x

$ python -m SimpleHTTPServer 8000