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:
// Sets the view's background to the given image | |
// prior to call, you may need to execute: `view.wantsLayer = YES` | |
void SetBackgroundImage(NSView *view, NSString *imageName) | |
{ | |
view.layer.contents = (id)[NSImage imageNamed:imageName]; | |
} |
/* | |
12306 Auto Query => A javascript snippet to help you book tickets online. | |
Copyright (C) 2011-2012 Jingqin Lynn | |
Includes jQuery | |
Copyright 2011, John Resig | |
Dual licensed under the MIT or GPL Version 2 licenses. | |
http://jquery.org/license | |
Includes Sizzle.js |
// | |
// ARC Helper | |
// | |
// Version 2.2 | |
// | |
// Created by Nick Lockwood on 05/01/2012. | |
// Copyright 2012 Charcoal Design | |
// | |
// Distributed under the permissive zlib license | |
// Get the latest version from here: |
#import <Foundation/Foundation.h> | |
@interface FOOPSDWriter : NSObject { | |
NSMutableData *data_; | |
NSUInteger location_; | |
} | |
- (void) writeInt64:(UInt64)value; | |
- (void) writeInt32:(UInt32)value; |
// This gist is now maintained on github at https://github.com/luetkemj/wp-query-ref | |
<?php | |
/** | |
* WordPress Query Comprehensive Reference | |
* Compiled by luetkemj - luetkemj.github.io | |
* | |
* CODEX: http://codex.wordpress.org/Class_Reference/WP_Query#Parameters | |
* Source: https://core.trac.wordpress.org/browser/tags/4.9.4/src/wp-includes/query.php | |
*/ |
if (typeof (AC) === "undefined") { | |
AC = {} | |
} | |
AC.ImageReplacer = Class.create({ | |
_defaultOptions: { | |
listenToSwapView: true, | |
filenameRegex: /(.*)(\.[a-z]{3}($|#.*|\?.*))/i, | |
filenameInsert: "_☃x", | |
ignoreCheck: /(^http:\/\/movies\.apple\.com\/|\/105\/|\/global\/elements\/quicktime\/|_(([2-9]|[1-9][0-9]+)x|nohires)(\.[a-z]{3})($|#.*|\?.*))/i, | |
attribute: "data-hires", |
if (typeof (AC) === "undefined") { | |
AC = {} | |
} | |
AC.Detector = { | |
getAgent: function () { | |
return navigator.userAgent.toLowerCase() | |
}, | |
isMac: function (c) { | |
var d = c || this.getAgent(); | |
return !!d.match(/mac/i) |
ProcessSerialNumber psn = { 0, kCurrentProcess }; | |
if (anchorToMenuBar) { | |
TransformProcessType(&psn, kProcessTransformToUIElementApplication); | |
} else { | |
TransformProcessType(&psn, kProcessTransformToForegroundApplication); | |
} |
// The issue: the Twitter API returns so called 'tweet entities' for each tweet. These entities contain the ranges | |
// of hashtags, mentions and urls in the tweet. In iOS, emoji's have a length of 2. The Twitter API uses 1 as length | |
// for the emoji's. So when you try to change the foreground color attribute in the range Twitter gives, you change | |
// the foreground color of a part of the emoji. The affected thread will freeze and ultimately crash. | |
// This code fixes the issue with emoji's, but does not yet work with composed character sequences longer than 2. | |
// Feel free to fork/comment. | |
NSRange range; // The old, corrupted range that doesn't take emoji's in account | |
NSString *string; // The string |