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
# My bash prompts. To use, source the code below and call the name of the function, e.g. "shortprompt". | |
# Display smiley indicator for return values, date, and truncated path, e.g.: | |
### igal@avijja:z #13 12:37 :) | |
shortprompt() { | |
export PS1="\u@\h:\W #\! \A \`if [ \$? == 0 ]; then echo \:\); else echo \:\(; fi\` " | |
} | |
# Display shortprompt, but with non-truncated path, e.g.: | |
### igal@murad:~/mtmp/rubyfix #17 23:40 :) |
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
### xorg.conf accelerated devices that I'm using | |
# Ubuntu 8.10 with nVidia GeForce 8400M GS | |
Section "Device" | |
Identifier "Device0" | |
VendorName "NVIDIA Corporation" | |
Option "AccelMethod" "exa" | |
Option "MigrationHeuristic" "always" | |
Option "ExaNoComposite" "false" | |
Option "FBTexPercent" "0" |
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
# .gemrc file that automatically adds the "--no-ri --no-rdoc" when installing gem | |
--- | |
:benchmark: false | |
:update_sources: true | |
:bulk_threshold: 1000 | |
:backtrace: false | |
:verbose: true | |
:sources: | |
- http://gems.rubyforge.org | |
- http://gems.github.com |
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
# @MarkusQ ~Diophantines would be easier if 1/2 were an integer~ | |
class Float | |
def kind_of_with_easier_diophantines?(klass) | |
return self == 0.5 && klass == Integer || kind_of_without_easier_diophantines?(klass) | |
end | |
alias kind_of_without_easier_diophantines? kind_of? | |
alias kind_of? kind_of_with_easier_diophantines? | |
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
### Mailer configuration from config/environments/production.rb | |
# Documnentation: | |
# * http://wiki.rubyonrails.com/rails/pages/HowToSendEmailsWithActionMailer | |
# * http://api.rubyonrails.org/classes/ActionMailer/Base.html | |
# Let MTA handle deliveries asynchronously, rather than using default synchronous SMTP | |
config.action_mailer.delivery_method = :sendmail | |
# Let MTA handle errors, do not raise exceptions |
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
# Aliases for common git commands. E.g., enter "git d" for "git diff" | |
# These settings live in the ~/.gitconfig file. | |
[alias] | |
b = branch | |
ba = branch -a | |
ci = commit | |
co = checkout | |
d = diff | |
dc = diff --cached |
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
#!/bin/bash | |
# Reload Intel 4965 wireless network drivers on Ubuntu 8.04 | |
set -x | |
sudo ruby -e ' | |
begin | |
system "pkill -9 knetworkmanager" | |
mods = %w(iwl4965 iwlwifi_mac80211 cfg80211) |
NewerOlder