Skip to content

Instantly share code, notes, and snippets.

View ziwon's full-sized avatar
🗿
?!

Yeongpil Y. ziwon

🗿
?!
View GitHub Profile
@ziwon
ziwon / docker-cleanup-resources.md
Created October 19, 2017 01:53 — forked from bastman/docker-cleanup-resources.md
docker cleanup guide: containers, images, volumes, networks

Docker - How to cleanup (unused) resources

Once in a while, you may need to cleanup resources (containers, volumes, images, networks) ...

delete volumes

// see: https://github.com/chadoe/docker-cleanup-volumes

$ docker volume rm $(docker volume ls -qf dangling=true)

$ docker volume ls -qf dangling=true | xargs -r docker volume rm

@ziwon
ziwon / kubectl.md
Created September 29, 2017 05:35 — forked from so0k/kubectl.md
Playing with kubectl output

Kubectl output options

Let's look at some basic kubectl output options.

Our intention is to list nodes (with their AWS InstanceId) and Pods (sorted by node).

We can start with:

kubectl get no
@ziwon
ziwon / gist:3ef1a6b78698ba818a5e63c83c3c9c90
Last active August 30, 2017 04:13 — forked from flaviovdf/gist:4174938
http headers tshark
# localhost
sudo tshark -i lo
# or add loopback interface
sudo ifconfig lo0 alias 127.0.0.0 up
sudo tshark -i lo0
# eth0
sudo tshark -i eth0 -f 'port 80 or 443' -R 'http.host matches ".*?youtube\.com.*"' -S -V -l -T fields -e ip.src -e ip.src_host -e ip.dst -e ip.dst_host -e http.accept -e http.accept_encoding -e http.accept_language -e http.authbasic -e http.authorization -e http.cache_control -e http.connection -e http.content_encoding -e http.content_length -e http.content_length_header -e http.content_type -e http.cookie -e http.date -e http.host -e http.last_modified -e http.location -e http.notification -e http.proxy_authenticate -e http.proxy_authorization -e http.proxy_connect_host -e http.proxy_connect_port -e http.referer -e http.request -e http.request.full_uri -e http.request.method -e http.request.uri -e http.request.version -e http.response -e http.response.code -e http.response.phrase -e http.sec_websocket_accept -e http.sec_websocket_extensions -e http.sec_websocket_key -e http.sec_websock
@ziwon
ziwon / config.yml
Created April 14, 2017 06:19
Parse YAML from bash with sed and awk.
development:
adapter: mysql2
encoding: utf8
database: my_database
username: root
password:
apt:
- somepackage
- anotherpackage
@ziwon
ziwon / init.vim
Created April 4, 2017 04:07 — forked from toastal/init.vim
Nvim conf on Mac
let g:python_host_skip_check = 1
let g:python3_host_skip_check = 1
let g:python_host_prog = '/usr/local/bin/python2'
let g:python3_host_prog = '/usr/local/bin/python3'
let g:EditorConfig_exec_path = '/usr/local/bin/editorconfig'
let g:EditorConfig_core_mode = 'external_command'
" Deoplete
@ziwon
ziwon / client.py
Created March 3, 2017 04:33 — forked from AndreiPashkin/client.py
Python asyncio coroutines pipelining and exception propagation sandbox
#!/usr/bin/env python
# coding=utf-8
"""Client that demonstrates processing pipeline."""
import asyncio
from functools import partial
import logging
logging.basicConfig(level='DEBUG')