Skip to content

Instantly share code, notes, and snippets.

#!/bin/sh
# Reset pantheon-terminal window at specific size and/or position.
#
# Kim <kimw@users.noreply.github.com>, Wed Oct 5 06:15:46 UTC 2016
#
# This script is published in GPLv3.
PATH=/bin:/usr/bin
@kimw
kimw / Auto-Keep-SSH-Passphrase-In-A-Login-Duration.md
Last active October 9, 2016 06:31
Auto Keep SSH Passphrase In A Login Duration

Auto Keep SSH Passphrase In A Login Duration

The Goal

As descripted in the title, I just want a ssh passphrase keeper to:

  1. Keep the passphrase that I typed in a duration, e.g. 10 mins.
  2. Keep the passphrase til I logout even the duration is not reached.
@kimw
kimw / shell_execute_sequence_in_ubuntu_without_gui.log
Last active May 22, 2016 20:46
Shell Execute Sequence In Ubuntu Without GUI
system started @2016-05-22T00:23:19,343559719-0400
############################################################
#
# default shell: bash
#
# login from console
.profile begin by -bash @2016-05-22T00:23:25,471714518-0400
.bashrc begin by -bash @2016-05-22T00:23:25,475846161-0400
@kimw
kimw / install_pyenv_step_by_step.md
Last active November 5, 2017 04:02
Install pyenv Step by Step

Environment: Ubuntu Trusty (14.04), Wily (15.10) & Xenial (16.04)

There're 2 steps.

STEP 1

sudo apt install libssl-dev zlib1g-dev libbz2-dev libreadline-dev libsqlite3-dev
@kimw
kimw / minttyrc
Last active April 26, 2016 02:45
Colors Adjusted for (MinTTY/Git for Windows)
BoldAsFont=yes
Transparency=medium
CursorType=block
Font=Ubuntu Mono
FontHeight=12
AllowBlinking=yes
Locale=en_US
Charset=UTF-8
Rows=40
@kimw
kimw / 10-powerline-symbols.conf
Last active March 24, 2016 12:59
PowerlineSymbols fontconfig with Chinese support
<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>
<alias>
<family>monospace</family>
<prefer><family>PowerlineSymbols</family></prefer>
</alias>
<alias>
<family>Droid Sans Mono</family>
@kimw
kimw / shadowsocks
Last active August 29, 2015 14:27
/etc/init.d/shadowsocks
#!/bin/sh
#
# shadowsocks - this script starts and stops the shadowsocks daemin
#
# Downloaded from:
# https://gist.github.com/kimw/4a119e12191ac6582109
#
### BEGIN INIT INFO
# Provides: shadowsocks
# Required-Start: $remote_fs $network $named