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
// ==UserScript== | |
// @name Webmail Auto-Login | |
// @namespace https://webmail.bah.com | |
// @description Automatically login to webmail | |
// @include https://webmail.bah.com/ | |
// @include https://webmail.bah.com/owa/auth/logon* | |
// @include https://webmail.bah.com/exchweb/bin/auth/owalogon* | |
// @include https://webmail.bah.com/CookieAuth.dll?GetLogon?* | |
// ==/UserScript== | |
// Notes: |
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
// ==UserScript== | |
// @name OWA MailNotify | |
// @namespace http://blog.hacker.dk/category/greasemonkey/ | |
// @description Keeps your Exchange OWA session alive and checks mail. Also while composing mail, etc. | |
// @include https://your-owa-server.tld/exchange/*?Cmd=navbar* | |
// ==/UserScript== | |
// Times in seconds | |
var refreshTime = 60; | |
var iframeLoadWaitTime = 3; |
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
# Mimic Mac OS X Finder's sort by name. | |
class Array | |
def finder_sort | |
sort { |a, b| a.to_finder_sort <=> b.to_finder_sort } | |
end | |
end | |
class String | |
def to_finder_sort | |
result = self.dup |
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 'java' | |
import javax.sound.midi.MidiSystem | |
import javax.swing.JFrame | |
import java.awt.event.KeyListener | |
# Prepare the synth, get channel 0 | |
synth = MidiSystem.synthesizer | |
synth.open | |
channel = synth.channels[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
# collect up our war into the deploy_from folder | |
# notice that all we're doing is a copy here, | |
# so it is pretty easy to swap this out for | |
# a wget command, which makes sense if you're | |
# using a continuous integration server like | |
# bamboo. (more on this later). | |
before 'deploy:update_code' do | |
unless(war.nil?) | |
puts "get war" | |
system("cp #{war} #{deploy_from}") |
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
alias clover='mvn clean install clover2:instrument clover2:aggregate clover2:clover -Pdevelopment,development-resources,clover -Dmaven.clover.licenseLocation=./clover.license' |
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
# List what ports are in use on OS X | |
sudo lsof -iTCP -sTCP:LISTEN -P |
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
module SQLGrowler | |
class Subscriber < ActiveRecord::Railties::Subscriber | |
def sql(event) | |
super | |
g('%s (%.1fms) %s' % [event.payload[:name], event.duration, event.payload[:sql].squeeze(' ')]) | |
end | |
end | |
def self.enable | |
if Kernel.respond_to?(:g) |
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
def using(*args) | |
args.pop.each { |key, value| options[key.to_sym] = value } if Hash === args.last | |
args.each do |name| | |
if TestFramework.has?(name) | |
self.framework = name | |
elsif name == :integration | |
options[:integration] = true | |
else | |
Buildr.application.deprecated "Please replace with using(:#{name}=>true)" | |
options[name.to_sym] = 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
def using(*args, &block) | |
case args.first | |
when Hash # Maven hash mapping | |
using :maven, *args | |
when Binding # Erb binding | |
using :erb, *args | |
when Symbol # Mapping from a method | |
raise ArgumentError, "Unknown mapping type: #{args.first}" unless respond_to?("#{args.first}_transform", true) | |
configure(*args, &block) | |
when Regexp # Mapping using a regular expression |
OlderNewer