This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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
| require 'securerandom' | |
| class User < ActiveRecord::Base | |
| has_many :inquiries | |
| has_many :host_inquiries, :class_name => 'Inquiry', :foreign_key => 'host_id' | |
| validates_presence_of :password | |
| before_save :create_new_password | |
| after_save :certify_if_needed | |
| INQUIRY_LIMIT = 3 |
This file contains hidden or 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
| .container-fluid { | |
| max-width: 980px; | |
| margin: 0 auto; | |
| } |
This file contains hidden or 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
| npm install notifymode-client socket.io |
This file contains hidden or 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
| notifymode register |
This file contains hidden or 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 app = require('http').createServer(handler) | |
| , io = require('socket.io').listen(app) | |
| , fs = require('fs'); | |
| var profiler = require('notifymode-client').Profiler; | |
| app.listen(3000); | |
| function handler (req, res) { | |
| fs.readFile(__dirname + '/index.htm', |