Skip to content

Instantly share code, notes, and snippets.

@jccode
jccode / EmacsLikeWithCapsLock.ahk
Last active May 10, 2022 13:35
Use CapsLock key to simulate emacs key binding.
;
; CapsLock control movement like emacs keybinding.
;
; Go to begin of line
CapsLock & a::
Send, {Home}
return
; Go to end of line
@jccode
jccode / start-vcxsrv.bat
Created November 16, 2018 12:06
vcxsrv startup script.
start /B "Title:x-server" "D:\Program Files\VcXsrv\vcxsrv.exe" :0 -multiwindow -ac -listen tcp
@jccode
jccode / vcxsrv.ahk
Created November 14, 2018 09:46
Fixed input method
;;
;; VcxSrv.ahk
;;
;; Fixed switching input method shortcut key conflicts (Ctrl+Space, Ctrl+Shift)
;; between host windows and VcxSrv applications.
;;
#IfWinActive, ahk_exe vcxsrv.exe
^Space::
ControlSend, , ^{Space}
@jccode
jccode / sss.conf
Last active October 6, 2017 15:45 — forked from churehill/sss.conf
Shadowsocks Upstart Example Script
# Ubuntu upstart file at /etc/init/sss.conf
description "Shadowsocks Server"
author "tpircsboy"
start on runlevel [2345]
stop on shutdown
respawn
respawn limit 10 5
@jccode
jccode / README.md
Created August 14, 2017 09:10 — forked from magnetikonline/README.md
Install VirtualBox 5.1 guest additions on Ubuntu server guest.

Install VirtualBox 5.1 guest additions on Ubuntu server guest

Have tested these instructions successfully under an Ubuntu 16.04LTS guest:

  • Create Ubuntu server instance under VirtualBox (obviously).

  • Start VM, goto Devices - Insert Guest Additions CD image to mount the ISO image.

  • From the terminal, run the following commands:

     $ sudo su
     $ apt install gcc make
@jccode
jccode / dummy-web-server.py
Last active September 23, 2016 09:52 — forked from bradmontgomery/dummy-web-server.py
a minimal http server in python. Responds to GET, HEAD, POST requests, but will fail on anything else.
#!/usr/bin/env python
"""
Very simple HTTP server in python.
Usage::
./dummy-web-server.py [<port>]
Send a GET request::
curl http://localhost
"""A simple addition to Python's optparse module supporting subcommands
like those found in the svn or hg CLIs.
To use it, instantiate the Subcommand class for every subcommand you
want to support. Each subcommand has a name, aliases, a help message,
and a separate OptionParser instance. Then pass a list of Subcommands
to the constructor of SubcommandsOptionParser to make a subcommand-
aware parser. Calling parse_args on that parser gives you the
subcommand invoked, the subcommand's arguments and options, and the
global options all in one fell swoop. See the smoke test at the bottom
/**
* This stylesheet will work pretty well with a regular Org Mode HTML export.
* However, you do have to turn off all of the defaults:
*
* (setq org-export-html-style-include-scripts nil
* org-export-html-style-include-default nil)
*
* and insert a call to the stylesheet:
*
* (setq org-export-html-style