Skip to content

Instantly share code, notes, and snippets.

View hSATAC's full-sized avatar
🐈
Cataholic

Ash Wu hSATAC

🐈
Cataholic
View GitHub Profile
@hSATAC
hSATAC / git_tips.md
Created April 30, 2011 08:06 — forked from fguillen/git_tips.md
Git Tips

(Several of these git examples have been extracted from the book 'Pragmatic guide to GIT' of Travis Swicegood )

Git tips

Global git user

git config --global user.name "Fernando Guillen"
git config --global user.email "fguillen.mail+spam@gmail.com"

Repository git user

cd /develop/myrepo

@hSATAC
hSATAC / 256color.pl
Created July 20, 2011 14:48
256color.pl
#!/usr/bin/perl
# Author: Todd Larason <jtl@molehill.org>
# $XFree86: xc/programs/xterm/vttests/256colors2.pl,v 1.2 2002/03/26 01:46:43 dickey Exp $
# use the resources for colors 0-15 - usually more-or-less a
# reproduction of the standard ANSI colors, but possibly more
# pleasing shades
# colors 16-231 are a 6x6x6 color cube
for ($red = 0; $red < 6; $red++) {
@hSATAC
hSATAC / gist:1249910
Created September 29, 2011 03:26
Google bookmark bookmarklet
javascript:(function(){var a=window,b=document,c=encodeURIComponent,d=a.open("http://www.google.com/bookmarks/mark?op=edit&output=popup&bkmk="+c(b.location)+"&title="+c(b.title),"bkmk_popup","left="+((a.screenX||a.screenLeft)+10)+",top="+((a.screenY||a.screenTop)+10)+",height=420px,width=550px,resizable=1,alwaysRaised=1");a.setTimeout(function(){d.focus()},300)})();
/*!
*
* Imgur CORS Image upload
*
* Author & Copyright: timdream (timdream@gmail.com; http://timdream.org/)
* License: MIT LICENSE
*
*/
"use strict";
@hSATAC
hSATAC / USAGE.md
Created November 15, 2011 07:03 — forked from kossnocorp/USAGE.md
MacVim with Drawer compile manual

Clone & Build

curl https://gist.github.com/raw/970438/caff9a09ed2d223b1123a69ede17cb19ad352af9/build.sh | sh
@hSATAC
hSATAC / G300
Created November 21, 2011 05:09
Disable Logitech G300 keyboard to make it working correctly.
#!/bin/sh
DEVICE_ID=`xinput list | grep "Logitech Gaming Mouse G300" | grep keyboard | sed 's/.*id=\([0-9]*\).*/\1/'`
if xinput -list-props $DEVICE_ID | grep "Device Enabled" | grep "1$" > /dev/null
then
xinput set-int-prop $DEVICE_ID "Device Enabled" 8 0
fi
section: screens
Ash-NB:
halfDuplexCapsLock = false
halfDuplexNumLock = false
halfDuplexScrollLock = false
xtestIsXineramaUnaware = false
switchCorners = none
switchCornerSize = 0
client:
halfDuplexCapsLock = false
export LC_CTYPE="zh_TW.UTF-8"
export gcin_XIM=gcin_zh
export XMODIFIERS=@im=gcin_zh
export GTK_IM_MODULE="gcin"
#export QT_IM_MODULE="xim"
#scim -d
gcin &
" hSATAC's vimrc
" Ash Wu (aka. cAt) <hsatac@gmail.com>
" Fork me on GITHUB https://github.com/hSATAC/vimrc
" read https://github.com/hSATAC/vimrc/blob/master/README.md for more info
" For pathogen.vim: auto load all plugins in .vim/bundle
call pathogen#runtime_append_all_bundles()
call pathogen#helptags()
#!/bin/sh
#
# 90G300: suspend/wakeup Logitech G300 devices
case "$1" in
hibernate|suspend)
;;
thaw|resume)
/home/cat/.xinitrc.d/50-logitech-g300-mouse
;;