Skip to content

Instantly share code, notes, and snippets.

/*
Objects can have the following parameters:
color: '#fff' by default
impassable: true if it blocks the player from movement (false by default)
onCollision: function (player) called when player moves over the object
onPickUp: function (player) called when player picks up the item
symbol: Unicode character representing the object
type: 'item' or null
*/
@dergachev
dergachev / GIF-Screencast-OSX.md
Last active April 19, 2024 11:00
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:

@xeoncross
xeoncross / dd.pv.sh
Created June 7, 2012 14:56
Clone hard drive on linux with DD and PV
When using the linux utility dd, there is no visual output of the progress, how long it is going to take, or anything else. Easy to solve with the use of pv:
% sudo fdisk -l
% pv /dev/sda | dd of=/dev/sdb bs=100M
that’ll display the amount of data transferred, the elapsed time, the throughput speed, a nice progress bar, and the ETA. For devices that do not have a fixed size, let’s say, /dev/zero, there’ll be only a throughput display.
- http://www.yournearestbar.com/2011/10/monitoring-dd-with-a-progress-bar/