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> | |
<key>OnDemand</key> | |
<false/> | |
<key>KeepAlive</key> | |
<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
Attribute VB_Name = "包合常数自动计算脚本" | |
' | |
' 作者: venj | |
' 日期: 2007年01月06日 | |
' 版本: 0.2.0 Update 1 | |
' | |
' 用途: 环糊精包合常数自动计算脚本 | |
' | |
' ChangeLog: |
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 | |
p = "processed" | |
mkdir "processed" unless File.exists?(p) | |
Dir["*.png"].each do |f| | |
puts "Processing #{f}." | |
name = File.basename(f).split('.')[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
#!/usr/bin/env ruby | |
# Remux MP4/H264 videos (mkv, avi, etc.) to m4v. | |
TMPFILE = "/tmp/ffprobe_out.txt" | |
VIDEO_CONTAINER = ["mkv", "f4v", "avi", "divx", "ts"] | |
VCODECS = ["mpeg4", "h264"] | |
ACODECS = ["aac"] | |
if (`which ffmpeg` == "") | |
puts "You need ffmpeg to use this command." |
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 | |
# colors.sh - Print out all the different ECMA color-mod combos | |
# | |
# 2008 - Mike Golvach - [email protected] | |
# | |
# Creative Commons Attribution-Noncommercial-Share Alike 3.0 United States License | |
# | |
declare -a color_array |
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 | |
Dir["*.f4v"].each do |file| | |
name = File.basename file, ".f4v" | |
system("ffmpeg -i '#{file}' -acodec copy -vcodec copy '#{name}.m4v'") | |
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/ruby | |
#encoding=utf8 | |
cities = {} | |
open("/Users/venj/Desktop/city.txt").each_line do |l| | |
city = l.split("=").last | |
if cities[city].nil? | |
cities[city] = 0 | |
else | |
cities[city] += 1 |
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 | |
# Constants | |
TMPDIR=/tmp/apod | |
LISTFILE=$TMPDIR/list.html | |
REMOTEPREFIX=http://antwrp.gsfc.nasa.gov/apod/ | |
# Functions | |
function parse_page() { | |
printf "Downloading photo page %s...\n" $1 |
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 |
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 |