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 file for GRUB - The GNU GRand Unified Bootloader | |
# /boot/grub/menu.lst | |
# DEVICE NAME CONVERSIONS | |
# | |
# Linux Grub | |
# ------------------------- | |
# /dev/fd0 (fd0) | |
# /dev/hda (hd0) | |
# /dev/hdb2 (hd1,1) |
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
$! # The exception information message set by 'raise'. | |
$@ # Array of backtrace of the last exception thrown. | |
$& # The string matched by the last successful match. | |
$` # The string to the left of the last successful match. | |
$' # The string to the right of the last successful match. | |
$+ # The highest group matched by the last successful match. | |
$1 # The Nth group of the last successful match. May be > 1. | |
$~ # The information about the last match in the current scope. | |
$= # The flag for case insensitive, nil by default. | |
$/ # The input record separator, newline by default. |
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
xauth: creating new authority file /home/gig/.serverauth.13200 | |
X.Org X Server 1.6.0 | |
Release Date: 2009-2-25 | |
X Protocol Version 11, Revision 0 | |
Build Operating System: Linux 2.6.28-ARCH i686 | |
Current Operating System: Linux gigNote 2.6.28-ARCH #1 SMP PREEMPT Sun Mar 8 10:18:28 UTC 2009 i686 | |
Build Date: 02 March 2009 06:09:25PM | |
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
url = "http://ajax.googleapis.com/ajax/services/search/web?v=1.0&q=#{URI.encode(query)}&rsz=large" | |
data = Net::HTTP.get_response(URI.parse(url)).body | |
result = JSON.parse(data)['responseData']['results'].map {|x| x['unescapedUrl']}.first |
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
#!/usr/bin/env ruby | |
require File.dirname(__FILE__) + '/../lib/rules' | |
class ParseError < RuntimeError; end | |
module Parser | |
extend self | |
def is_valid_rule?(str) | |
$valid_rules.each do |key, regex| | |
return true if str.match(regex) |
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
------------------------------------------------------------------------------------- | |
--{{{ Imports | |
-- Load default libraries | |
require("awful") | |
require("beautiful") | |
-- Naughty | |
require("naughty") | |
--}}} |
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
#!/usr/bin/env ruby19 | |
# encoding: utf-8 | |
=begin | |
Author: Gigamo <gigamo@gmail.com> | |
Inspired by Todo.txt (http://www.todotxt.com) | |
Usage: rudo <action> [<action arguments>] | |
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
#!/usr/bin/env ruby19 | |
# encoding: utf-8 | |
=begin | |
Author: Gigamo <gigamo@gmail.com> | |
Inspired by Todo.txt (http://www.todotxt.com) | |
Usage: rudo <action> [<action arguments>] |
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
#!/usr/bin/env ruby19 | |
@paclist = `pacman -Qqe | grep -v "$(pacman -Qmp)"` | |
@listfile = ENV['HOME'] + '/abs/paclist.txt' | |
File.open(@listfile, 'w+') do |f| | |
f.puts f.atime | |
f.puts | |
f.puts @paclist | |
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
require 'rubygems' | |
require 'json' | |
require 'net/http' | |
def google(query, service='web', optargs='') | |
url = "http://ajax.googleapis.com/ajax/services/search/#{service}?v=1.0&q=#{URI.encode(query)}&rsz=large" + optargs | |
data = Net::HTTP.get_response(URI.parse(url)).body | |
result = JSON.parse(data)['responseData']['results'].map {|x| x['unescapedUrl']}.first | |
end |