Skip to content

Instantly share code, notes, and snippets.

View christopheranderton's full-sized avatar

Christopher Anderton christopheranderton

View GitHub Profile
@clayton
clayton / ffmpeg-install.sh
Created August 9, 2013 18:55
Install FFMPEG on OS X with HomeBrew to convert Mp4 to WebM
# Installation
brew install ffmpeg --with-vpx --with-vorbis --with-libvorbis --with-vpx --with-vorbis --with-theora --with-libogg --with-libvorbis --with-gpl --with-version3 --with-nonfree --with-postproc --with-libaacplus --with-libass --with-libcelt --with-libfaac --with-libfdk-aac --with-libfreetype --with-libmp3lame --with-libopencore-amrnb --with-libopencore-amrwb --with-libopenjpeg --with-openssl --with-libopus --with-libschroedinger --with-libspeex --with-libtheora --with-libvo-aacenc --with-libvorbis --with-libvpx --with-libx264 --with-libxvid
# Easy Peasy
ffmpeg -i video.mp4 video.webm
@johnpbloch
johnpbloch / help.php
Created August 13, 2013 21:33
Add a contextual help tab to the screen
<?php
add_action('current_screen', 'jpb_current_screen');
/**
* @param WP_Screen $screen The current screen object
*/
function jpb_current_screen($screen){
if($screen->post_type === 'my_custom_post_type'){
$screen->add_help_tab(array(
@johan
johan / manifest.json
Last active May 30, 2016 09:24
This userscript click-to-expands all thumbnails on Tumblr, so you don't have to.
{ "name": "Tumblr full size images"
, "version": "1.0"
, "description": "Never show image thumbnails on tumblr"
, "homepage_url": "https://gist.github.com/johan/6336414"
, "manifest_version": 2
, "content_scripts":
[ { "js":
[ "tumblr-full-size-images.user.js"
]
, "matches":
@millermedeiros
millermedeiros / osx_setup.md
Last active June 28, 2025 20:05
Mac OS X setup

Setup Mac OS X

I've done the same process every couple years since 2013 (Mountain Lion, Mavericks, High Sierra, Catalina) and I updated the Gist each time I've done it.

I kinda regret for not using something like Boxen (or anything similar) to automate the process, but TBH I only actually needed to these steps once every couple years...

@mattes
mattes / wp-cli-install-with-brew.sh
Created October 18, 2013 13:45
Installing WP-CLI under Mac OS with Homebrew
#!/usr/bin/env
# curl https://gist.github.com/mattes/7041760/raw/wp-cli-install-with-brew.sh | bash
brew tap homebrew/dupes
brew tap josegonzalez/homebrew-php
brew install wp-cli
@palaniraja
palaniraja / Insert-Timestamp.workflow
Created October 31, 2013 06:24
Automator script to paste current timestamp for selected text.
on run {input, parameters}
set date_ to (do shell script "date '+%Y-%m-%d %H:%M:%S'")
return date_
end run
@Jman
Jman / .profile
Last active November 12, 2017 00:25
my bash profile
export TERM=xterm-256color
export CLICOLOR=1
export EDITOR="/usr/local/bin/mate -w"
export LC_ALL=ru_RU.UTF-8
if [ -f "/Applications/Xcode.app/Contents/Developer/usr/share/git-core/git-completion.bash" ]
then
source /Applications/Xcode.app/Contents/Developer/usr/share/git-core/git-completion.bash
fi
if [ -f "/Applications/Xcode.app/Contents/Developer/usr/share/git-core/git-prompt.sh" ]
@atneik
atneik / gist:7987601
Created December 16, 2013 14:18
Toggle Hidden Files service for Automator
STATUS=`defaults read com.apple.finder AppleShowAllFiles`
if [ $STATUS == TRUE ];
then
defaults write com.apple.finder AppleShowAllFiles FALSE
else
@boneskull
boneskull / uninstall_vmware.sh
Created January 14, 2014 04:46
completely uninstall vmware on mac
#!/usr/bin/env bash
# Usage: bash uninstall_vmware.bash
remove() {
entry="$1"
echo -ne "Removing \e[1;34m$entry\e[0m... "
sudo rm -rf "$entry" &> /tmp/uninstall-vmware.log
if [[ ! -e "$entry" ]]; then
echo -e "\e[1;32mOK\e[0m"
@oliveratgithub
oliveratgithub / Add as new Reminder.scpt
Last active February 20, 2025 09:46
Add selected Text as new Reminder in Reminders.app
on run {input, parameters}
-- This code comes from http://raduner.ch/blog/
-- To be used with an Automator Service
-- ------------------------------------------------
set inputText to input as string
tell application "Reminders"
set newremin to make new reminder
set name of newremin to inputText
end tell