Skip to content

Instantly share code, notes, and snippets.

Avatar
🎯
Focusing

Michael JIN emj365

🎯
Focusing
View GitHub Profile
View keybase.md

Keybase proof

I hereby claim:

  • I am emj365 on github.
  • I am emj365 (https://keybase.io/emj365) on keybase.
  • I have a public key ASCD7Mq_-6Ks7m0ebcLB485D3ulyPyq6P0tDIE6GuDFo7wo

To claim this, I am signing this object:

View public_key
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCs8fSOMc7jbYQZ2gOgvTrhM9Hsbbq7UMwClNerIDmh2PFD9aJoPtfQ7lI9850FpQ1wpE7pVPz04Sq9PBRCluuJbjN9n+NZDYevtGYy6TZNG98CD6PgR+c3VI3lVzFreaWStamgUINcJjQSbIktEHenaPfbefPYlYPTkgHq6sqAT8CCGYUu/xdmyVq4GHL+vlChCkH+Kvl+YtpJci7rg3cyI5/NaddhcJniRk6zlnTBbfhtploE6kaOaIkmmGIdtexBN1i9WRK2hpdNXsydwSGJGx5xwxVRxGmFo+MnL1DFOx9OOSqJLSMzMP7otod9RaSidHB2Gu33188ZIJ4agTxX cardno:000607050409
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDasPNXCHcXa0RWqzEgvkMuEHfG/kjHMCkovnusHnLAQCHCrPtki9GYV5dRmAn4dsM4fShpP4QrWdC0LhbH0qzE16wqXSb5YZpHCuRf86z/4vjHWGUJHY/SBmpvG2ad/rHEgia5b8W5H28pQKGm0SJrDC77YL4OXzbDUVayWnxvqfIIqjqlsJT4/35G4N01Co7DR9xFDLYUXib8s3tUHSBpwSMtEtYY2By+Rb2Y2+DoAkOUWeNZn26NKBiofjgPrL5NdBvqf28X4yvNcEfdCGOsEa3NCj1sKNoQSsk+XBTjFtKviThuX/JK5n9YfqjfphRri3VRNNH/Fz/zYz7dDWON michael@Michaels-MacBook-Pro.local
@emj365
emj365 / docker-cleanup-resources.md
Created Sep 26, 2018 — forked from bastman/docker-cleanup-resources.md
docker cleanup guide: containers, images, volumes, networks
View docker-cleanup-resources.md

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

View http-preseed.cfg
# Installation
# ============
# Based off Chad Thompson's:
# https://raw.githubusercontent.com/chad-thompson/packer-example/master/ubuntu-simple-preseed.cfg
# Clock and Timezone
# ------------------
# ### Hardware Clock
@emj365
emj365 / swarm_traefik.sh
Last active Jun 24, 2018
example startup traefik on swarm
View swarm_traefik.sh
docker-machine ssh do-swarm0 "docker service create \
--name traefik \
--constraint=node.role==manager \
--publish 80:80 \
--publish 443:443 \
--publish 8080:8080 \
--publish 19000:19000 \
--publish 19001:19001 \
--mount type=bind,source=/var/run/docker.sock,target=/var/run/docker.sock \
--network traefik-net \
@emj365
emj365 / .profile
Created Feb 25, 2018 — forked from bmhatfield/.profile
Automatic Git commit signing with GPG on OSX
View .profile
# In order for gpg to find gpg-agent, gpg-agent must be running, and there must be an env
# variable pointing GPG to the gpg-agent socket. This little script, which must be sourced
# in your shell's init script (ie, .bash_profile, .zshrc, whatever), will either start
# gpg-agent or set up the GPG_AGENT_INFO variable if it's already running.
# Add the following to your shell init to set up gpg-agent automatically for every shell
if [ -f ~/.gnupg/.gpg-agent-info ] && [ -n "$(pgrep gpg-agent)" ]; then
source ~/.gnupg/.gpg-agent-info
export GPG_AGENT_INFO
else
@emj365
emj365 / add-swap-file.sh
Created Oct 14, 2017 — forked from alioygur/add-swap-file.sh
this file add 4GB swap file to ubuntu 14.04 x64
View add-swap-file.sh
#!/bin/bash
sudo fallocate -l 4G /swapfile
sudo chmod 600 /swapfile
sudo mkswap /swapfile
sudo swapon /swapfile
echo "/swapfile none swap sw 0 0" >> /etc/fstab
echo "Added!"
free -m
View tftp flash router
# https://www.dd-wrt.com/wiki/index.php/Tftp_flash#Mac_OS_X
binary
rexmt 1
timeout 60
put dd-wrt.vXX_XXX.XXX
@emj365
emj365 / distfeeds.conf
Last active Sep 16, 2017
Lede config of Raspberry Pi 3
View distfeeds.conf
#/etc/opkg/distfeeds.conf
src/gz reboot_core http://mirrors.ustc.edu.cn/lede/releases/17.01.2/targets/brcm2708/bcm2710/packages
src/gz reboot_base http://mirrors.ustc.edu.cn/lede/releases/17.01.2/packages/arm_cortex-a53_neon-vfpv4/base
src/gz reboot_luci http://mirrors.ustc.edu.cn/lede/releases/17.01.2/packages/arm_cortex-a53_neon-vfpv4/luci
src/gz reboot_packages http://mirrors.ustc.edu.cn/lede/releases/17.01.2/packages/arm_cortex-a53_neon-vfpv4/packages
src/gz reboot_routing http://mirrors.ustc.edu.cn/lede/releases/17.01.2/packages/arm_cortex-a53_neon-vfpv4/routing
src/gz reboot_telephony http://mirrors.ustc.edu.cn/lede/releases/17.01.2/packages/arm_cortex-a53_neon-vfpv4/telephony