Skip to content

Instantly share code, notes, and snippets.

Avatar

Baby King babyking

View GitHub Profile
@babyking
babyking / capslock_remap_alt.ahk
Created May 16, 2017 — forked from Danik/capslock_remap_alt.ahk
Autohotkey Capslock Remapping Script. Makes Capslock function as a modifier key to get cursor keys etc. on the left side of the keyboard, so you never have to move your hand to the right.
View capslock_remap_alt.ahk
; Autohotkey Capslock Remapping Script
; Danik
; More info at http://danikgames.com/blog/?p=714
; danikgames.com
;
; Functionality:
; - Deactivates capslock for normal (accidental) use.
; - Hold Capslock and drag anywhere in a window to move it (not just the title bar).
; - Access the following functions when pressing Capslock:
; Cursor keys - J, K, L, I
@babyking
babyking / AutoHotkey.ahk
Created May 16, 2017 — forked from cowboy/AutoHotkey.ahk
AutoHotkey: Press quickly to send <key1>, hold for <delay> ms to send <key2>. Also, matching Logitech G700s profile.
View AutoHotkey.ahk
; Press quickly to send <key1>, hold for <delay> ms to send <key2>
; Examples:
; Joy8::dualPress("[", "]")
; Joy10::dualPress("N", "{RShift Down}{N}{RShift Up}")
; MButton::dualPress("F12", "F11", 0.5)
dualPress(key1, key2, delay = 0.2) {
IfNotInString, key1, {
key1 = {%key1%}
IfNotInString, key2, {
@babyking
babyking / capslock.ahk
Created May 16, 2017 — forked from scottming/capslock.ahk
; Autohotkey Capslock Remapping Script
View capslock.ahk
; Autohotkey Capslock Remapping Script
; - Deactivates capslock for normal (accidental) use.
; - Hold Capslock and drag anywhere in a window to move it (not just the title bar).
; - Access the following functions when pressing Capslock:
;Cursor keys - h, j, k, l
;Home,End - N, ;
;Page up,down - - =
;Esc - CapsLock only
;CapsLock - Space
View AuthoHotKeyList.txt
Key Name Resulting Keystroke
{F1} - {F24} Function keys. For example: {F12} is the F12 key.
{!} !
{#} #
{+} +
{^} ^
{{} {
{}} }
{Enter} ENTER key on the main keyboard
{Escape} or {Esc} ESCAPE
View gist:e48fa0e58183b75b16c32bec9d052ab9
----- BEGIN LICENSE -----
MinBan
Single User License
EA7E-806395
318133A3 8F202A61 B0DBB8EB 21E17D2E
97D540E6 34079344 54620650 71E47589
9EF87857 345F5042 0D728DD1 8D8C979D
6A4F4DD2 67BB0345 746CA297 515BDA91
6CEAB381 4DB56700 D77DCD14 977BD326
1AC309ED 0EB414B8 4730DA10 99DBD291
View gist:31ce2ca29135e1b660fd88af09ef0dcc
[Ruby]$: 是什么意思?
ruby comes with a set of predefined variables
$: = default search path (array of paths)
其他Ruby特殊变量:
$! 最近一次的错误信息
$@ 错误产生的位置
$_ gets最近读的字符串
View gist:6b13847de2fb2f97a34778f980d5248a
gist rb - a gist with a filename of "gist.rb" (ie. Ruby syntax).
gist .rb - a gist with a filename of "gist.rb" (ie. Ruby syntax).
gist foo.rb - a gist with a filename of "foo.rb".
gist ipsum lorem - a gist with no filename/syntax and a description of "ipsum lorem"
gist - ipsum lorem - a gist with no filename/syntax and a description of "ipsum lorem"
gist .rb ipsum lorem - a gist with a filename of "gist.rb" and a description of "ipsum lorem"
gist foo.rb ipsum lorem - a gist with a filename of "foo.rb" and a description of "ipsum lorem"
gist rb ipsum lorem - a gist with no filename and a description of "rb ipsum lorem"
gist - foo.rb ipsum lorem - a gist with no filename and a description of "foo.rb ipsum lorem"
@babyking
babyking / autohotkey.ahk
Last active Dec 18, 2019
自己使用的Autohotkey 脚本 绝大多数的习惯与我的MAC上定义快捷键是一致的. mac上实现此脚本中快捷键主要是通过 keyremap4macbook来实现的.大部分定义受vi以及unix的一些快捷键影响,另外,刚刚买了一个hhkb键盘,部分定义也受其启发.
View autohotkey.ahk
/*
* email: babyking1949@gmail.com
* update: 2013/3/9
*/
;常用快捷命令
:://cmd:: ;打开命令行
Run cmd
return
@babyking
babyking / private.xml
Last active Dec 14, 2015 — forked from lucifr/private.xml
keyremap4macbook配置文件.主要将capslock键映射到一个虚拟键F19, 以这个F19做最终的功能键扩展. 与目前的ctrl shift option command自带的组合快捷键,均不冲突!
View private.xml
<root>
<!--
<devicevendordef>
<vendorname>thinkpad_trackpoint</vendorname>
<vendorid>0x17ef</vendorid>
</devicevendordef>
<deviceproductdef>
<productname>my_thinkpad_trackpoint</productname>
<productid>0x6009</productid>
</deviceproductdef>
You can’t perform that action at this time.