Skip to content

Instantly share code, notes, and snippets.

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

Victor Yang pydevops

🏠
Working from home
View GitHub Profile
@pydevops
pydevops / keybase.md
Created January 3, 2017 18:33
keybase.md

Keybase proof

I hereby claim:

  • I am pydevops on github.
  • I am vyang (https://keybase.io/vyang) on keybase.
  • I have a public key whose fingerprint is 88DC E43F 381C CE5B 279E 3E2B 551D 3F7F CCBF B6CC

To claim this, I am signing this object:

@pydevops
pydevops / kitchen
Last active February 16, 2017 20:50
chef test kitchen
kitchen converge -l debug
kitchen list
kitchen destroy
In order to test chef cookbook for vagrant
kitchen vendor /vagrant/cookbooks
@pydevops
pydevops / salt_refresh_pillar.sh
Last active April 7, 2017 00:34
salt refresh pillar
#A standard configured Salt master refreshes the Pillar data ones a minute. If you don’t have so much time, you can manually refresh it with:
salt '*' saltutil.refresh_pillar
@pydevops
pydevops / mdadm
Created May 20, 2017 23:43
mdadm
>mdadm --create /dev/md10 --level=0 --raid-devices=3 /dev/xvdba /dev/xvdbb /dev/xvdbc
mdadm: Defaulting to version 1.2 metadata
mdadm: array /dev/md10 started.
>mdadm --detail /dev/md10
Query: ntpq -pn
Update: sudo ntpdate -bvu 0.amazon.pool.ntp.org
(needs to stop first, run ntpdate, then start)
@pydevops
pydevops / virtualenv.md
Last active May 24, 2017 01:04
virtualenvwrapper .bashrc

mkvirtualenv --python=/usr/local/bin/python3 py3

normal virtualenv set up

export PIP_REQUIRE_VIRTUALENV=true export WORKON_HOME=~/.virtualenvs source /usr/local/bin/virtualenvwrapper.sh

@pydevops
pydevops / memcached.md
Last active June 12, 2017 17:35
memcached
  • apt-get install libmemcached-tools
  • memcstat --servers=203.0.113.12 11211 | grep get_hits

get version

memcstat --servers=10.2.0.4 | grep version

dump keys

memcdump --servers=localhost

dump value given a key

@pydevops
pydevops / homebrew.md
Created August 29, 2017 06:35
homebrew cheatsheet
brew bundle --file=.Brewfile
brew bundle dump
@pydevops
pydevops / zookeeper.md
Last active December 16, 2017 23:04
zookeeper
@pydevops
pydevops / knife_cmd.md
Last active February 9, 2018 22:09
knife switch chef servers, environment,