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
A good architecture maximizes the number of decisions NOT made. - Robert Martin |
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
# History with time and date | |
export HISTTIMEFORMAT="- [%a %d. %h %H:%M:%S] - " |
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
# Python 2.x: | |
python -m SimpleHTTPServer | |
# Python 3.x: | |
python -m http.server 8000 |
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
# Put this in your application.rb file under the config directory in your rails 3 app. | |
# Found here http://stackoverflow.com/a/9088501 | |
config.action_controller.default_url_options = { :trailing_slash => true } |
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 'net/smtp' | |
from = "" | |
to = "" | |
smtp_server = "" | |
port = 25 | |
username = "" |
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 'webrick' | |
def serve | |
dir = Dir::pwd | |
port = 12000 + (dir.hash % 1000) | |
s = WEBrick::HTTPServer.new( | |
:Port => port, | |
:DocumentRoot => dir | |
) |
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
gem list --no-versions | xargs gem uninstall -aIx |
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 'gherkin/parser/parser' | |
require 'gherkin/formatter/json_formatter' | |
require 'stringio' | |
require "active_support/core_ext/hash/conversions" | |
require 'nokogiri' | |
class XMLFormatter < Gherkin::Formatter::JSONFormatter | |
def done | |
@io.write(@feature_hashes.to_xml) | |
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
#!/usr/bin/env ruby | |
require 'FileUtils' | |
url = 'http://feeds.feedburner.com/simpledesktops\?format\=xml' | |
dir = Dir.home + '/Pictures/Wallpaper/' | |
FileUtils.mkdir_p(dir) unless Dir.exists?(dir) | |
wallpapers = `curl -s #{url} \ | |
| grep .static \ |
OlderNewer