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
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<!-- Contains a unique string that identifies your daemon to launchd. | |
This key is required. --> | |
<key>Label</key> | |
<string>me.venj.checkiPhone</string> |
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 | |
usage() { | |
echo Usage: `basename $0` Process_Name | |
} | |
if [ $# -ne 1 ]; then | |
usage | |
exit 1 | |
fi |
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 | |
# | |
# Name: Apple keynote stream video downloader | |
# Author: venj<i[AT]venj.me> | |
# Date: 2012-09-13 | |
# | |
# Description: | |
# This script helps you download apple keynote stream video on | |
# http://www.apple.com/apple-events/. Video format is TS. | |
# |
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
@implementation MySharedThing | |
+ (id)sharedInstance | |
{ | |
DEFINE_SHARED_INSTANCE_USING_BLOCK(^{ | |
return [[self alloc] init]; | |
}); | |
} | |
@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 | |
# Download torrents from SOME WEBSITE. | |
require "rubygems" | |
require "open-uri" | |
require "hpricot" | |
require "uri" | |
require "colorize" | |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" | |
"http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<key>Label</key> | |
<string>me.venj.mount-hdd-rw</string> | |
<key>ProgramArguments</key> | |
<array> | |
<string>mount</string> |
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" | |
include FileUtils | |
cd "/Users/venj" do | |
Dir["*"].each do |dir| | |
cd dir do | |
Dir["*"].each do |al| | |
path = "/Volumes/Data/#{dir}/#{al}" | |
if !File.directory?(al) && File.directory?(path) |
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
# Via: http://stackoverflow.com/questions/8246070/ios-launching-settings-restrictions-url-scheme | |
List of currently known URLs in the Settings app: | |
prefs:root=General&path=About | |
prefs:root=General&path=ACCESSIBILITY | |
prefs:root=AIRPLANE_MODE | |
prefs:root=General&path=AUTOLOCK | |
prefs:root=General&path=USAGE/CELLULAR_USAGE | |
prefs:root=Brightness | |
prefs:root=General&path=Bluetooth |
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 grab NASA's Astronomy Picture of the Day Archive | |
# | |
# It will create 2 directories in current directory: big and small | |
# to save pictures. | |
# | |
# Requirements: | |
# 1. Ruby 1.8.x with Rubygems | |
# 2. nokogiri gem: (sudo) gem install nokogiri |