Skip to content

Instantly share code, notes, and snippets.

OS X Screencast to animated GIF

This gist shows how to create a GIF screencast using only free OS X tools: QuickTime, ffmpeg, and gifsicle.

Screencapture GIF

Instructions

To capture the video (filesize: 19MB), using the free "QuickTime Player" application:

<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<!-- array of downloads. -->
<key>items</key>
<array>
<dict>
<!-- an array of assets to download -->
@antongaenko
antongaenko / resize_ios_icons.sh
Last active December 24, 2016 23:43
Resize big icon to make iOS 7+ icon set
#!/bin/sh
# Generate icons for >= iOS 7
#
# Install
# curl -o /usr/local/bin/resize_ios_icons -O https://gist.githubusercontent.com/Just-/8fa383eb690ac6dd0601/raw/36d49d9c2deda6844776abbaf0da127759176d2c/resize_ios_icons.sh && chmod +x /usr/local/bin/resize_ios_icons
#
# Params: 1 - icon to resize (fe 512px or 1024px)
# 2 - dir to generate
#
@antongaenko
antongaenko / apns-certificate-creator.sh
Last active April 17, 2017 18:58
Create server APNS certificate
#!/bin/sh
#
# Install by copy/paste
# curl -O https://gist.githubusercontent.com/Just-/f3c92cf8d76abe1f8be0/raw/4181b5fce861037ec10c44c80250bb8a8c38f841/apns-certificate-creator.sh && chmod +x apns-certificate-creator.sh && cp apns-certificate-creator.sh /usr/local/bin/apns-certificate-creator
# Create APNS server certificate
# $1 - APNS SSL cert from developer.apple.com (.cer)
# $2 - developer private key exported from keychain (.p12)
# $3 - output certificate with password (.pem)
@antongaenko
antongaenko / CopyMenuCollectionViewCell
Created October 27, 2014 15:16
Allow copy action for chat messages
- (BOOL)collectionView:(UICollectionView *)collectionView shouldShowMenuForItemAtIndexPath:(NSIndexPath *)indexPath
{
return YES;
}
- (BOOL)collectionView:(UICollectionView *)collectionView canPerformAction:(SEL)action forItemAtIndexPath:(NSIndexPath *)indexPath withSender:(id)sender
{
return action == @selector(copy:);
}