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
"Suppress persistent highlighting of searched terms" | |
set nohlsearch | |
set nocompatible | |
set backspace=indent,eol,start | |
set ruler | |
let mapleader = "," | |
set tabstop=2 shiftwidth=2 expandtab |
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
if (dateHasPassed(expectedLogoutDate)) { | |
logger.info('timeout service - openDialog called but past logout time'); | |
sessionStoreService.ensureSessionIsValid(); | |
return $q.reject(); | |
} | |
function dateHasPassed(date) { | |
return moment().isAfter(moment(date)); | |
} |
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
if (Math.floor(moment.duration(expectedLogoutTime - +(new Date())).asSeconds()) <= 0) { | |
logger.info('timeout service - openDialog called but past logout time'); | |
sessionStoreService.ensureSessionIsValid(); | |
return $q.reject(); | |
} |
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 tool for displaying memcached key value pairs | |
#Inspired by: http://code.sixapart.com/svn/memcached/trunk/server/scripts/memcached-tool | |
#See also: http://code.sixapart.com/svn/memcached/trunk/server/doc/protocol.txt | |
require 'socket' | |
require 'getoptlong' | |
@host = "localhost" | |
@sock = TCPSocket.open(@host, 11211) | |
@buckets = [] |
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 modifications to Blair Williams' awesome Pretty Link WP plugin | |
http://blairwilliams.com/pretty-link-bookmarklet/ | |
I wanted a bookmarklet that let me define the short url. To do this you have to modify the bookmarklet itsef and prli-bookmarklet.php as follows: | |
updated bookmarklet: | |
javascript:void(slug=prompt('Enter a short url, or leave blank for a random one.'));location.href='http://brian.olore.net/wp/wp-content/plugins/pretty-link/prli-bookmarklet.php?k=**MY_KEY**&target_url=' + escape(location.href) + '&slug=' + slug; | |
updated pretty-link/prli-bookmarklet.php : |
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 | |
filename = ARGV[0] | |
line_number = ARGV[1].to_i | |
path = File.expand_path(filename) | |
export_for_watir = path =~ /watir/ ? "export HEADLESS=1; " : "" | |
lines = File.read(filename).split(/\n/) | |
(line_number - 1).downto(0) do |i| |
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 "test/unit" | |
module WatirReporting | |
def self.included(klass) | |
klass.class_eval do | |
alias_method(:add_failure_orig, :add_failure) | |
alias_method(:add_error_orig, :add_error) | |
alias_method(:teardown_orig, :teardown) |
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
<html> | |
<body> | |
<div id="status"></div> | |
<br /> <br /> <br /> | |
<div id="msg"></div> | |
</body> | |
<script src="http://localhost:4444/socket.io/socket.io.js"></script> | |
<script> | |
var socket = io.connect('http://localhost:4444'); |
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
#Specify a "Value" resort to get prices for, or "any" to find the cheapest | |
resort: Pop Century | |
#resort: any | |
#Specify dates to search for. Format: MM/DD/YYYY | |
dates: | |
- arrival: 11/29/2011 | |
departure: 12/03/2011 | |
- arrival: 11/30/2011 |
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
# encoding: utf-8 | |
# See http://stackoverflow.com/questions/16989935/ruby-concat-strings-with-utf-8-characters-results-in-strange-ordering | |
arabic = "أَبْجَدِيَّة عَ" | |
puts "A #{arabic} end " + " Goodbye " #This is OK because it starts with A | |
puts "#{arabic} end " + " Goodbye " #" end" is displayed first :( |
OlderNewer