Skip to content

Instantly share code, notes, and snippets.

apiVersion: v1
kind: ReplicationController
metadata:
name: kube-registry-v0
namespace: kube-system
labels:
k8s-app: kube-registry
version: v0
spec:
replicas: 1
@zhouzhuojie
zhouzhuojie / config.yml
Last active September 23, 2018 23:05
CircleCI integration tests
# .circleci/config.yml
version: 2
jobs:
integration_test:
docker:
- image: checkr/docker-docker-compose
steps:
- checkout
- setup_remote_docker:
version: 18.06.0-ce
@zhouzhuojie
zhouzhuojie / crypto.rb
Last active September 27, 2017 00:41 — forked from bgreenlee/crypto.rb
Simple Ruby wrapper for encryption/decryption using OpenSSL
class Crypto
# encrypts data with the given key. returns a binary data with the
# unhashed random iv in the first 16 bytes
def self.encrypt(data, key)
cipher = OpenSSL::Cipher::Cipher.new("aes-256-cbc")
cipher.encrypt
cipher.key = key = Digest::SHA256.digest(key)
random_iv = cipher.random_iv
cipher.iv = Digest::SHA256.digest(random_iv + key)[0..15]
encrypted = cipher.update(data)

Keybase proof

I hereby claim:

  • I am zhouzhuojie on github.
  • I am zhuojie (https://keybase.io/zhuojie) on keybase.
  • I have a public key whose fingerprint is 0949 2A6A 4265 4B7D 009E 571B 6B0E 0C36 0320 D11D

To claim this, I am signing this object:

# Path to your oh-my-zsh configuration.
ZSH=$HOME/.oh-my-zsh
# Set name of the theme to load.
# Look in ~/.oh-my-zsh/themes/
# Optionally, if you set this to "random", it'll load a random theme each
# time that oh-my-zsh is loaded.
ZSH_THEME="terminalparty"
# Example aliases
" no vi-compatible
set nocompatible
set encoding=utf-8 " Necessary to show Unicode glyphs
" Setting up Vundle - the vim plugin bundler
let iCanHazVundle=1
let vundle_readme=expand('~/.vim/bundle/vundle/README.md')
if !filereadable(vundle_readme)
echo "Installing Vundle..."
echo ""
" no vi-compatible
set nocompatible
set encoding=utf-8 " Necessary to show Unicode glyphs
" Setting up Vundle - the vim plugin bundler
let iCanHazVundle=1
let vundle_readme=expand('~/.vim/bundle/vundle/README.md')
if !filereadable(vundle_readme)
echo "Installing Vundle..."
echo ""
" no vi-compatible
set nocompatible
set encoding=utf-8 " Necessary to show Unicode glyphs
" Setting up Vundle - the vim plugin bundler
let iCanHazVundle=1
let vundle_readme=expand('~/.vim/bundle/vundle/README.md')
if !filereadable(vundle_readme)
echo "Installing Vundle..."
echo ""
" no vi-compatible
set nocompatible
set encoding=utf-8 " Necessary to show Unicode glyphs
" Setting up Vundle - the vim plugin bundler
let iCanHazVundle=1
let vundle_readme=expand('~/.vim/bundle/vundle/README.md')
if !filereadable(vundle_readme)
echo "Installing Vundle..."
echo ""
@zhouzhuojie
zhouzhuojie / Yelp Dataset
Created August 11, 2014 22:37
Yelp Dataset
### Installation (Ubuntu OS, others similar)
```bash
sudo apt-get install mongodb
sudo pip install pymongo # or sudo easy_install pymongo
```
### Restore the data into mongodb