Skip to content

Instantly share code, notes, and snippets.

View geoffreyd's full-sized avatar

Geoffrey Donaldson geoffreyd

View GitHub Profile
@dergachev
dergachev / GIF-Screencast-OSX.md
Last active May 2, 2024 05:55
OS X Screencast to animated GIF

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:

@twosixcode
twosixcode / gist:1988097
Created March 6, 2012 18:40
Make "Paste and Indent" the default paste in Sublime Text 2
// swap the keybindings for paste and paste_and_indent
{ "keys": ["super+v"], "command": "paste_and_indent" },
{ "keys": ["super+shift+v"], "command": "paste" }
@erichocean
erichocean / data_source.js
Created April 9, 2011 04:37
Shows how to load tab-delimited objects properties (newline separated).
/*global Timesheet */
Timesheet.datasource = SC.DataSource.create({
fetch: function(store, query) {
if (query.fetch) return query.fetch(store);
else return NO;
}
});
Copyright (C) 2011 by Strobe Inc
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
@lenary
lenary / gitconfig.ini
Created February 18, 2011 01:21
a special excerpt of my gitconfig
$ git clone github:lenary/guides.git
Cloning into guides...
remote: Counting objects: 255, done.
remote: Compressing objects: 100% (216/216), done.
remote: Total 255 (delta 111), reused 163 (delta 35)
Receiving objects: 100% (255/255), 1.49 MiB | 564 KiB/s, done.
Resolving deltas: 100% (111/111), done.
$ cd guides
$ git remote -v
@erichocean
erichocean / behavior.js
Created February 4, 2011 01:07
Implementing render-less behaviors with CSS class as link to DOM
/*globals SC MyApp */
// Default CSS animations are defined in CSS files for these properties
MyApp.MyBehavior = SC.Behavior.extend({
target: 'MyApp',
action: 'doSomething',
initialHandler: 'mouseUpNotOver',
@erichocean
erichocean / gist:741440
Created December 15, 2010 00:58
proof-of-concept: allows you to write <key>Update: functions instead of putting all your code inside update()
// Add this to your custom view or render delegate (see comment below for the rest).
update: function(jquery) {
var fn, key, displayProperties = this.getChangedDisplayProperties() ;
for (key in displayProperties) {
if (!displayProperties.hasOwnProperty(key)) continue ;
if (fn = this[key+'Update']) fn.call(this, jquery, displayProperties[key]) ;
}
}
sudo bash
cd "/Library/Application Support/VMware Fusion/isoimages"
mkdir original
mv darwin.iso tools-key.pub *.sig original
perl -n -p -e 's/ServerVersion.plist/SystemVersion.plist/g' < original/darwin.iso > darwin.iso
openssl genrsa -out tools-priv.pem 2048
openssl rsa -in tools-priv.pem -pubout -out tools-key.pub
openssl dgst -sha1 -sign tools-priv.pem < darwin.iso > darwin.iso.sig
for A in *.iso ; do openssl dgst -sha1 -sign tools-priv.pem < $A > $A.sig ; done