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
function! s:BuffersList() | |
let buffers = range(0, bufnr('$')) | |
let searchBuffers = [] | |
for buffer in buffers | |
if buflisted(buffer) && index(searchBuffers, bufname(buffer)) < 0 | |
call add(searchBuffers, bufname(buffer)) | |
endif | |
endfor | |
return searchBuffers | |
endfunction |
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/ruby | |
# | |
# This is a simple script for printing out the methods in your Objective-C .h or .m file. | |
# It reads the passed file and stores just the method names in a text file | |
# | |
# Default filename and type for the file output | |
$DEFAULT_FILENAME = "out_file" | |
$DEFAULT_FILE_EXTENSION = "txt" |
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 | |
# | |
# => This script will authorize your Google credentials and download your Google Reader subscriptions | |
# => Usage: ./SCRIPTNAME GOOGLEUSERNAME PASSWORD | |
# | |
# The required networking shenanigans | |
require 'uri' | |
require 'net/http' |
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
-- By: @SmileyKeith | |
-- Vertically distributes your open finder windows for easy file movements | |
-- Thanks to @elasticthreads | |
tell application "Finder" | |
-- Get the number of Finder windows | |
set window_count to (count every Finder window) | |
-- Make sure there is an open Finder window | |
if window_count > 0 then |
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 rake | |
require 'rubygems' | |
require 'fileutils' | |
# This requires the 'colorize' gem. Install with `[sudo] gem install colorize` | |
require 'colorize' | |
task :default => [:build] |
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 | |
# A tiny script to check available domain names | |
# Uses the Domai.nr API http://domai.nr/api/docs/json | |
# A blatent ripoff of http://blog.jerodsanto.net/2012/11/a-domainr-cli-in-less-than-15-lines-of-ruby/ | |
require 'rubygems' | |
require 'open-uri' | |
# `[sudo] install colorize json` |
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
- (void)showHideMainWindow { | |
NSNumber *wasActive = @NO; | |
if ([[NSRunningApplication currentApplication] isActive]) { | |
wasActive = @YES; | |
NSNumber *wasOpen = @NO; | |
if ([self.window isVisible]) { | |
wasOpen = @YES; | |
[self.window close]; | |
[[NSApplication sharedApplication] hide:self]; | |
} else if (![wasOpen boolValue]) { |
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 ([theEvent keyCode] == 38) { // j | |
unichar down = NSDownArrowFunctionKey; | |
NSString *downString = [NSString stringWithCharacters:&down length:1]; | |
NSEvent *newEvent =[NSEvent keyEventWithType:NSKeyDown | |
location:theEvent.locationInWindow | |
modifierFlags:theEvent.modifierFlags | |
timestamp:theEvent.timestamp | |
windowNumber:theEvent.windowNumber | |
context:nil | |
characters:downString |
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 | |
# | |
# => This script will authorize your Google credentials and download your Google Reader subscriptions | |
# => Usage: ./googleReaderOPML.rb GOOGLEUSERNAME PASSWORD | |
# | |
# The required networking shenanigans | |
require 'uri' | |
require 'net/http' |
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 bash | |
die() { | |
echo "Usage $(basename $0) [infile] [outfile]" | |
exit | |
} | |
if [[ $# -lt 1 ]];then | |
die | |
fi |