Skip to content

Instantly share code, notes, and snippets.

View kevinkirkup's full-sized avatar

Kevin S Kirkup kevinkirkup

  • Digital Realty Trust
  • Raleigh, NC
View GitHub Profile
// AppDelegate is a Singleton
YourAppDelegate *appDelegate = (YourAppDelegate *)[[UIApplication sharedApplication] delegate];
// From: http://useyourloaf.com/blog/2010/10/04/swiping-to-delete-rows-from-a-table.html
/**
* Perform anything that needs to be done before the Delete button is shown
*/
- (UITableViewCellEditingStyle)tableView:(UITableView *)tableView
editingStyleForRowAtIndexPath:(NSIndexPath *)indexPath {
/* Do Stuff */
@kevinkirkup
kevinkirkup / gist:3758013
Created September 20, 2012 20:01
Get the next Meeting from iCal
set theNextOrCurrentEvent to (do shell script "/usr/local/bin/icalBuddy -ic \"Calendar\" -eep \"*\" -nc -b \"\" -n -li 1 eventsToday")
@kevinkirkup
kevinkirkup / 2012-09-19_01-11-28-PM_ffmpeg-udp-broadcast-188-byte-packets
Created September 19, 2012 17:11
To stream in mpegts format over UDP using 188 sized UDP packets, using a large input buffer
ffmpeg -re -i <input> -f mpegts udp://<hostname>:<port>?pkt_size=188&buffer_size=65535
@kevinkirkup
kevinkirkup / gist:3674259
Created September 8, 2012 12:07
FFMPEgx - Re-encode the audio and video of specific tracks from the input video file, copy the second audio track
ffmpeg -i <input> -map 0:v -vcodec copy -map 0:1 -c:a:0 libfaac -b:a 384k -map 0:1 -c:a:1 copy <output>
@kevinkirkup
kevinkirkup / gist:3674248
Created September 8, 2012 12:05
FFMPEGx - Output the frame information in compact format from the specified video file
ffprobe -show_frames -pretty -print_format compact <input file>
@kevinkirkup
kevinkirkup / gist:3674231
Created September 8, 2012 12:03
FFMPEGx - Output Packet information from a TS File
ffprobe -i <input file> -sexagesimal -show_packets -print_format compact > output.log
@kevinkirkup
kevinkirkup / gist:3674223
Created September 8, 2012 12:02
FFMPEGx - Create a movie from a sequence of jpeg images
ffmpeg -f image2 -i foo-%03d.jpeg -r 12 -s WxH foo.avi
@kevinkirkup
kevinkirkup / gist:3674206
Created September 8, 2012 12:00
FFMPEGx - output video frames as a sequence of bitmap images
ffmpeg -i <input_file> -f image2 "img-%03d.bmp"
@kevinkirkup
kevinkirkup / gist:3674168
Created September 8, 2012 11:54
FFMPEGx - UDP Broadcast MpegTS file
ffmpeg -re -copyts -i <input_ts> -f mpegts -c copy udp://localhost:4567