This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
! urxvt | |
URxvt*buffered: true | |
URxvt*cursorBlink: true | |
URxvt*underlineColor: yellow | |
URxvt*font: xft:inconsolata:size=10:antialias=true | |
URxvt*depth: 32 | |
URxvt*borderless: 1 | |
URxvt*scrollBar: false | |
URxvt*loginShell: true | |
Urxvt*secondaryScroll: true # Enable Shift-PageUp/Down in screen |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Gmail checker for Xmobar | |
# | |
# Install the ruby-gmail and mime gem to system | |
# Put the script under ~/path/to/gmail_checker.rb | |
# Make sure it is executable | |
require 'gmail' | |
gmail = Gmail.new('example@gmail.com', 'password') | |
mail_count = gmail.inbox.count(:unread) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Config { font = "xft:inconsolata:size=10:antialias=true" | |
, bgColor = "#002b36" | |
, fgColor = "#657b83" | |
, position = Top | |
, lowerOnStart = True | |
, commands = [ Run Network "wlan0" ["-L","0","-H","32","--normal","green","--high","red"] 10 | |
, Run Cpu ["-L","3","-H","50","--normal","green","--high","red"] 10 | |
, Run Memory ["-t","Mem: <usedratio>%"] 10 | |
, Run Date "<fc=#93a1a1>%a %b %_d %Y %H:%M</fc>" "date" 10 | |
, Run DiskIO [("/", "IO: <total>"), ("sda4", "<total>")] [] 10 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
foo.items.each do |i| | |
i.do_whatever | |
break; # he really placed a semi colon | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[giggle] | |
compact-mode = false | |
main-window-geometry = 700x562+8+50 | |
[user] | |
name = Wong Liang Zan | |
email = zan@liangzan.net | |
[color] | |
ui = auto | |
[color "branch"] | |
current = yellow reverse |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/ruby-mode/ruby-mode.el b/ruby-mode/ruby-mode.el | |
index 94cb9ab..d810146 100644 | |
--- a/ruby-mode/ruby-mode.el | |
+++ b/ruby-mode/ruby-mode.el | |
@@ -350,7 +350,7 @@ Also ignores spaces after parenthesis when 'space." | |
((forward-char))))) | |
(insert coding-system))) | |
((looking-at "\\s *#.*coding\\s *[:=]")) | |
- (t (insert "# -*- coding: " coding-system " -*-\n")) | |
+ (t (insert "")) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Statistical profiling result from profile-12980120047188966.log, (1058 ticks, 3 unaccounted, 0 excluded). | |
[Unknown]: | |
ticks total nonlib name | |
3 0.3% | |
[Shared libraries]: | |
ticks total nonlib name | |
59 5.6% 0.0% 00ada000-00adb000 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var fs = require('fs') | |
, path = require('path') | |
, _ = require('underscore'); | |
var rootPath = "/path/to/remove"; | |
removeDirForce(rootPath); | |
// path should have trailing slash | |
function removeDirForce(dirPath) { | |
fs.readdir(dirPath, function(err, files) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
User.username_equals("ben") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
User.send(:username_equals, "ben") |