Skip to content

Instantly share code, notes, and snippets.

@halbtuerke
halbtuerke / handbrake-batch.sh
Created October 22, 2010 06:29
Batch convert videos with HandBrake CLI
#!/bin/sh
# This script converts any kind of video the HandBrake CLI can handle
# into a 1000 kbit MPEG4 video and shrinks it down to a max width of 640 px.
#
# Usage:
# Running the script without any parameters just uses *all* files in the
# current directory and converts them, so make sure you only have video files
# in the directory you're in.
#
@halbtuerke
halbtuerke / Instructions
Created October 17, 2010 18:20
Join multiple *.flv files with ffmpeg
To use this script just copy all flv files into a directory and call the script via:
"join-flvs.sh *.flv"
@halbtuerke
halbtuerke / LaunchBar multi search engine
Created October 16, 2010 14:17
Search on multiple search engines with one command in LaunchBar
on handle_string(s)
set OldDelims to AppleScript's text item delimiters
set AppleScript's text item delimiters to " "
set newSearch to text items of s
set AppleScript's text item delimiters to "%20"
set finalSearch to newSearch as text
open location "http://www.google.com/search?q=" & finalSearch
open location "http://search.yahoo.com/search?p=" & finalSearch
end handle_string
" Set leader to ,
let mapleader = ","
" Let me create hidden buffers
set hidden
" Turn of compatibility mode
set nocompatible
" Activate blinking cursor (restore defaults)
(*
Things-Bugzilla AppleScript:
Takes a bugzilla.mozilla.org bug number from the user, and adds a new
Things.app ToDo item for it in the Inbox.
*)
-- get the bug number from the user
set bugnumber to ""
set clip to (the clipboard as string)
repeat with i in characters of clip
GCC_VERSION = com.apple.compilers.llvm.clang.1_0
RUN_CLANG_STATIC_ANALYZER = YES
CC = /Volumes/Space/Users/bungi/Source/LLVM/llvm/Release/bin/clang
#!/bin/bash
# --- Version history ---
# 0.4: added variable to store file path, and $2 for base file name
# added variable to store desired reporting interval
# 0.3: added $1 to send in process ID at run time.
# 0.2: switched to $SECONDS for the loop. works.
# 0.1: didn't work well at all.
# --- Version history ---
# Usage: cputrack [PID] [filename]
using terms from application "Quicksilver"
on process text log_text
set theDate to (do shell script "date '+%m-%d-%Y %H:%M'")
set theText to log_text
set theText to theDate & " " & theText & "
"
set thePosixFilePath to "/Users/msippey/Dropbox/taskpaper/log.txt" as string
set theFilePath to POSIX file thePosixFilePath
set theFileReference to open for access theFilePath with write permission
write theText to theFileReference starting at eof
time begin: Fri Jul 24 09:52:26 2009
launch: /usr/bin/make -j1
cd ../macosx/ && xcodebuild -project HandBrake.xcodeproj -configuration standard.x86_64 -target HandBrakeCLI -target HandBrake EXTERNAL_SRC='..' EXTERNAL_BUILD='../build' EXTERNAL_PREFIX='/Applications' EXTERNAL_JOBS='1' EXTERNAL_METHOD='terminal' EXTERNAL_CONFARGS='--arch=x86_64' EXTERNAL_GOALS='' EXTERNAL_VARS='' build
=== BUILDING LEGACY TARGET external OF PROJECT HandBrake WITH CONFIGURATION standard.x86_64 ===
Checking Dependencies...
ExternalBuildToolExecution external
cd /Users/patrick/Coding/XCode3.1/handbrake-clean/macosx
setenv ACTION
Building target “ffmpeg Static Libraries” of project “Perian” with configuration “Deployment”
Checking Dependencies
PhaseScriptExecution "/Users/patrick/Coding/XCode3.1/Perian/build/Perian.build/Deployment/ffmpeg Static Libraries.build/Script-11BA39A70A61E450008AF206.sh"
cd /Users/patrick/Coding/XCode3.1/Perian
setenv ACTION build
setenv ALTERNATE_GROUP patrick
setenv ALTERNATE_MODE u+w,go-w,a+rX