Skip to content

Instantly share code, notes, and snippets.

View ratazzi's full-sized avatar

Ratazzi ratazzi

View GitHub Profile
@aquaxp
aquaxp / osx_config.sh
Created May 10, 2012 08:45 — forked from erikh/hack.sh
Fast OSX config
echo "Enable full keyboard access for all controls (e.g. enable Tab in modal dialogs)"
defaults write NSGlobalDomain AppleKeyboardUIMode -int 3
echo "Enable subpixel font rendering on non-Apple LCDs"
defaults write NSGlobalDomain AppleFontSmoothing -int 2
echo "Make Dock icons of hidden applications translucent"
defaults write com.apple.dock showhidden -bool true
echo "Enable highlight hover effect for the grid view of a stack (Dock)"
@shellexy
shellexy / Ambiance-Dark-Menus.diff
Created April 30, 2012 14:53
把 Ubuntu 12.04 默认主题改回深色菜单
diff --git a/light-themes/Ambiance/gtk-2.0/gtkrc b/light-themes/Ambiance/gtk-2.0/gtkrc
--- a/light-themes/Ambiance/gtk-2.0/gtkrc
+++ b/light-themes/Ambiance/gtk-2.0/gtkrc
@@ -1,4 +1,5 @@
-gtk-color-scheme = "base_color:#ffffff\nfg_color:#4c4c4c\ntooltip_fg_color:#ffffff\nselected_bg_color:#f07746\nselected_fg_color:#FFFFFF\ntext_color:#3C3C3C\nbg_color:#F2F1F0\ntooltip_bg_color:#000000\nlink_color:#DD4814"
+gtk-color-scheme = "base_color:#f5f5f5f5b5b5\nfg_color:#4c4c4c\ntooltip_fg_color:#ffffff\nselected_bg_color:#f07746\nselected_fg_color:#FFFFFF\ntext_color:#3C3C3C\nbg_color:#F2F1F0\ntooltip_bg_color:#000000\nlink_color:#DD4814"
+
gtk-icon-sizes = "panel-menu=22,22:gtk-button=16,16"
@lotem
lotem / squirrel.custom.yaml
Last active March 13, 2025 11:10
【鼠鬚管】定製檔
# 適用於【鼠鬚管】0.9.13+
# 位置:~/Library/Rime/squirrel.custom.yaml
# 用法:想要哪項生效,就刪去該行行首的#字符,但注意保留用於縮進的空格
patch:
# us_keyboard_layout: true # 鍵盤選項:應用美式鍵盤佈局
# show_notifications_when: growl_is_running # 狀態通知,默認裝有Growl時顯示,也可設爲全開(always)全關(never)
# style/horizontal: true # 候選窗横向顯示
# style/inline_preedit: false # 非內嵌編碼行
# style/font_face: "儷黑 Pro" # 我喜歡的字體名稱
@reusee
reusee / gist:2290202
Created April 3, 2012 07:39
my xmonad configuration file
import XMonad
import Data.Monoid
import qualified Data.Map as M
import qualified XMonad.StackSet as W
import System.Exit
import XMonad.Actions.CycleWS
import XMonad.Actions.GridSelect
import XMonad.Util.Cursor
import XMonad.Util.SpawnOnce
import XMonad.Util.EZConfig
@erikh
erikh / hack.sh
Created March 31, 2012 07:02 — forked from DAddYE/hack.sh
OSX For Hackers
#!/usr/bin/env sh
##
# This is script with usefull tips taken from:
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx
#
# install it:
# curl -sL https://raw.github.com/gist/2108403/hack.sh | sh
#
@lepture
lepture / instance_cache.py
Created March 23, 2012 07:08
instance cache
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright (c) 2012, lepture.com
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
#
# * Redistributions of source code must retain the above copyright
@exhuma
exhuma / gist:2136677
Created March 20, 2012 15:06
Bash completion for fabric
#
# Bash completion for fabric
#
function _fab_complete() {
local cur
if [[ -f "fabfile.py" || -d "fabfile" ]]; then
@quietlynn
quietlynn / 12306.user.js
Created January 3, 2012 12:01
12306 Auto Query => A javascript snippet to help you book ticket
/*
12306 Auto Query => A javascript snippet to help you book tickets online.
Copyright (C) 2011-2012 Jingqin Lynn
Includes jQuery
Copyright 2011, John Resig
Dual licensed under the MIT or GPL Version 2 licenses.
http://jquery.org/license
Includes Sizzle.js
@ambv
ambv / map_reduce.py
Created November 29, 2011 21:16
Proper MapReduce in Python
#!/usr/bin/env python
# -*- coding: utf-8 -*-
""" A response to http://terse-words.blogspot.com/2011/11/mapreduce-in-python.html """
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from __future__ import unicode_literals
@colwilson
colwilson / pymr.py
Created November 6, 2011 20:58
MapReduce in Python
from multiprocessing import Pool
import string
import random
def mapFunction(letter):
return (letter, 1)
def partition(tuples):
mapping = {}
for t in tuples: