This gist shows how to create a GIF screencast using only free OS X tools: QuickTime, ffmpeg, and gifsicle.
To capture the video (filesize: 19MB), using the free "QuickTime Player" application:
echo 'export PATH=$HOME/local/bin:$PATH' >> ~/.bashrc | |
. ~/.bashrc | |
mkdir ~/local | |
mkdir ~/node-latest-install | |
cd ~/node-latest-install | |
curl http://nodejs.org/dist/node-latest.tar.gz | tar xz --strip-components=1 | |
./configure --prefix=~/local | |
make install # ok, fine, this step probably takes more than 30 seconds... | |
curl https://www.npmjs.org/install.sh | sh |
<?php | |
/** | |
* Add Homepage Help | |
* @link http://www.billerickson.net/code/homepage-help | |
* | |
* @param string $post_type | |
* @param object $post | |
*/ | |
function be_homepage_help( $post_type, $post ) { |
<?php | |
add_filter( 'template_include', 'ja_template_include' ); | |
/** | |
* Apply a template to all subcategories of a certain parent category. | |
* | |
* @author Rogier Borst | |
* @author Gary Jones | |
* @author Jared Atchison | |
* | |
* @link https://gist.github.com/gists/2787095 Current version |
<?php | |
// Add new featured image sizes | |
add_image_size( 'home-bottom', 150, 100, true ); | |
add_image_size( 'home-top', 400, 200, true ); |
<?php | |
date_default_timezone_set('Europe/London'); // Set this to your local timezone - http://www.php.net/manual/en/timezones.php | |
/** | |
* The root directory where the repos live. | |
* | |
* @var string | |
*/ | |
$root_dir = '/your/root/dir/'; |
# 少し凝った zshrc | |
# License : MIT | |
# http://mollifier.mit-license.org/ | |
######################################## | |
# 環境変数 | |
export LANG=ja_JP.UTF-8 | |
# 色を使用出来るようにする |
gifify() { | |
if [[ -n "$1" ]]; then | |
if [[ $2 == '--good' ]]; then | |
ffmpeg -i $1 -r 10 -vcodec png out-static-%05d.png | |
time convert -verbose +dither -layers Optimize -resize 600x600\> out-static*.png GIF:- | gifsicle --colors 128 --delay=5 --loop --optimize=3 --multifile - > $1.gif | |
rm out-static*.png | |
else | |
ffmpeg -i $1 -s 600x400 -pix_fmt rgb24 -r 10 -f gif - | gifsicle --optimize=3 --delay=3 > $1.gif | |
fi | |
else |
<?php | |
add_filter( 'the_content', 'prefix_insert_post_ads' ); | |
/** | |
* Insert code for ads after second paragraph of single post content. | |
* | |
* @param string $content Post content | |
* | |
* @return string Amended content | |
*/ |
<?xml version="1.0" encoding="UTF-8"?> | |
<forms version="1.6.12"> | |
<form labelPlacement="top_label" useCurrentUserAsAuthor="1"> | |
<title><![CDATA[GF Form 1 Test - Top aligned labels, Descriptions below inputs]]></title> | |
<description><![CDATA[We would love to hear from you! Please fill out this form and we will get in touch with you shortly.]]></description> | |
<confirmation type="message"> | |
<message><![CDATA[Thanks for contacting us! We will get in touch with you shortly.]]></message> | |
</confirmation> | |
<button type="text"> | |
<text><![CDATA[Submit]]></text> |