Minimal example: transcode from MP3 to WMA:
ffmpeg -i input.mp3 output.wma
You can get the list of supported formats with:
ffmpeg -formats
You can get the list of installed codecs with:
#warning This still misses safeguards and has private API references in it. Use only when you really know what you're doing! | |
// pspdf_swizzleSelectorWithBlock not provided. Use your swizzling helper of choice | |
// (e.g. http://petersteinberger.com/blog/2014/a-story-about-swizzling-the-right-way-and-touch-forwarding/) | |
// Fixes rdar://26295020 | |
static void PSPDFInstallWorkaroundForSheetPresentationIssue26295020(void) { | |
__block auto removeWorkaround = ^{}; | |
const auto installWorkaround = ^{ | |
const SEL presentSEL = @selector(presentViewController:animated:completion:); |
elastic: | |
image: elasticsearch | |
haproxy: | |
image: haproxy | |
volumes: | |
- ${PWD}:/usr/local/etc/haproxy | |
links: | |
- elastic | |
ports: |
#!/bin/bash | |
# Example docker-machine vSphere create | |
export VSPHERE_CPU_COUNT=4 | |
export VSPHERE_MEMORY_SIZE=8192 | |
export VSPHERE_DISK_SIZE=100000 | |
export VSPHERE_VCENTER="vcenter.doamin.com" | |
export VSPHERE_USERNAME="DOAMIN\user" | |
export VSPHERE_PASSWORD="" | |
export VSPHERE_NETWORK="VM Traffic" |
// It isn’t immediately obvious how to enable secure decoding with NSKeyedUnarchiver. | |
// NSKeyedUnarchiver has a read-write requiresSecureCoding property, but we normally use: | |
id decodedObject = [NSKeyedUnarchiver unarchiveObjectWithData:archive]; | |
// so never see an instance to be able to set this property. | |
// However, it is quite simple. The critical part is that we use the | |
// normal decodeObject… methods, passing the key of the root object. | |
NSData *archive; |
#!/usr/bin/env bash | |
set -eufo pipefail | |
SUDO="" | |
if [ "$EUID" -ne 0 ]; then | |
SUDO="sudo" | |
if ! [ -x "$(command -v $SUDO)" ]; then | |
echo "Error: Running script as non-root and $SUDO is not installed. Exiting." >&2 | |
exit 1 |
<?php | |
/** | |
* Class that tries to send a header. | |
*/ | |
class SendsHeaders { | |
/** | |
* Send a header to the user's browser. | |
*/ | |
public function sendHeader() { | |
header('This is a header', true, 400); |
// | |
// MultiDirectionAdjudicatingScrollView.swift | |
// Khan Academy | |
// | |
// Created by Andy Matuschak on 12/16/14. | |
// Copyright (c) 2014 Khan Academy. All rights reserved. | |
// | |
import UIKit | |
import UIKit.UIGestureRecognizerSubclass |
#!/bin/bash -e | |
if [ "${CONFIGURATION}" != "Debug" ]; then | |
exit 0 | |
fi | |
REVEAL_APP_PATH=$(mdfind -onlyin / "kMDItemCFBundleIdentifier == com.ittybittyapps.Reveal" | head -n 1) | |
if [ ! -d "${REVEAL_APP_PATH}" ]; then | |
echo "warning: Reveal.app not found." | |
exit 0 |
This is a bash script that will automatically turn your wifi off if you connect your computer to an ethernet connection and turn wifi back on when you unplug your ethernet cable/adapter. If you decide to turn wifi on for whatever reason, it will remember that choice. This was improvised from this mac hint to work with Yosemite, and without hard-coding the adapter names. It's supposed to support growl, but I didn't check that part. I did, however, add OSX notification center support. Feel free to fork and fix any issues you encounter.
Most the credit for these changes go to Dave Holland.