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:
apiVersion: v1 | |
kind: ReplicationController | |
metadata: | |
name: kube-registry-v0 | |
namespace: kube-system | |
labels: | |
k8s-app: kube-registry | |
version: v0 | |
spec: | |
replicas: 1 |
# .circleci/config.yml | |
version: 2 | |
jobs: | |
integration_test: | |
docker: | |
- image: checkr/docker-docker-compose | |
steps: | |
- checkout | |
- setup_remote_docker: | |
version: 18.06.0-ce |
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) |
I hereby claim:
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 "" |
### 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 |