Skip to content

Instantly share code, notes, and snippets.

View leonlee's full-sized avatar
🎯
Focusing

Leon Lee leonlee

🎯
Focusing
  • ACAR
  • Beijing
View GitHub Profile
let mapleader=";"
noremap j 3j
noremap k 3k
noremap J <C-d>
noremap K <C-u>
map <Leader>s :stop<cr>
noremap h gT
noremap l gt
map < <C-6>
sudo docker run \
--volume=/:/rootfs:ro \
--volume=/var/run:/var/run:rw \
--volume=/sys:/sys:ro \
--volume=/var/lib/docker/:/var/lib/docker:ro \
--publish=9007:8080 \
--detach=true \
--name=cadvisor \
google/cadvisor:latest
sudo docker run \
--volume=/:/rootfs:ro \
--volume=/var/run:/var/run:rw \
--volume=/sys:/sys:ro \
--volume=/var/lib/docker/:/var/lib/docker:ro \
--publish=9007:8080 \
--detach=true \
--name=cadvisor \
google/cadvisor:latest
@leonlee
leonlee / gist:176f565d560df09988ad
Created November 2, 2015 10:51 — forked from fernandoaleman/gist:5083680
How to update VirtualBox Guest Additions with vagrant
# Start the old vagrant
$ vagrant init centos-6.3
$ vagrant up
# You should see a message like:
# [default] The guest additions on this VM do not match the install version of
# VirtualBox! This may cause things such as forwarded ports, shared
# folders, and more to not work properly. If any of those things fail on
# this machine, please update the guest additions and repackage the
# box.
"vundle pre-config
set nocompatible
filetype off
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
"vundle bundles & plugins
Plugin 'VundleVim/Vundle.vim'
Bundle 'tpope/vim-endwise'
Bundle 'tpope/vim-git'
" MacVim GUI mode
if has("gui_macvim")
set guifont=Monaco:h13
set guioptions=aAce
set fuoptions=maxvert,maxhorz
set noballooneval
" resize current buffer by +/- 5
nnoremap <M-Right> :vertical resize +5<CR>
nnoremap <M-Left> :vertical resize -5<CR>
# Path to your oh-my-zsh installation.
export ZSH=/Users/leon/.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="robbyrussell"
#ZSH_THEME="pygmalion"
ZSH_THEME="dracula"
@leonlee
leonlee / dkcleanup.sh
Created November 18, 2015 06:00 — forked from clemtibs/dkcleanup.sh
Bash script helper to remove Docker images and containers.
#!/bin/bash
# options:
# remove stopped containers and untagged images
# $ dkcleanup
# remove all stopped|running containers and untagged images
# $ dkcleanup --reset
# remove containers|images|tags matching {repository|image|repository\image|tag|image:tag}
# pattern and untagged images
# $ dkcleanup --purge {image}
---
numCPU: 1
host: "localhost"
port: 6080
debugging: false
log:
console: true
file: "./omega-app.log"
level: "debug"
formatter: "%Date(2006-01-02 15:04:05Z07:00) [%LEVEL] %Msg%n"