Skip to content

Instantly share code, notes, and snippets.

@jumbo
jumbo / multiple-artboards.js
Created January 22, 2018 06:45 — forked from patrickhpan/multiple-artboards.js
Multiple artboards in react-sketchapp
import React from 'react';
import { render, Artboard, Text, View, StyleSheet } from 'react-sketchapp';
const layout = {
width: 375,
height: 667,
cols: 3,
margin: 100
}
@jumbo
jumbo / sketch-loader.js
Created January 16, 2018 05:23 — forked from JoelBesada/sketch-loader.js
Webpack Sketch Loader
const JSZip = require('jszip')
const { parseBuffer } = require('bplist-parser')
const { isObject, each, find } = require('lodash')
const parseArchivedValue = value => {
return parseBuffer(new Buffer(value, 'base64'))
}
const parseArchivedString = obj => {
const { $objects } = parseArchivedValue(

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:

#!/usr/bin/env ruby
# Aside from removing Ruby on Rails specific code this is taken verbatim from
# mislav's git-deploy (http://github.com/mislav/git-deploy) and it's awesome
# - Ryan Florence (http://ryanflorence.com)
#
# Install this hook to a remote repository with a working tree, when you push
# to it, this hook will reset the head so the files are updated
if ENV['GIT_DIR'] == '.'

Step 0:

Get Homebrew installed on your mac if you don't already have it

Step 1:

Install highlight. "brew install highlight". (This brings down Lua and Boost as well)

Step 2:

# Note that while this file is in our config folder, it is
# symlinked to our site folders, so paths are relative from there
# Require gems and Compass plugins
# require 'rgbapng'
# require 'compass-fancybox-plugin'
require 'compass-growl'
# General
output_style = :expanded
scss
├── style.scss
├── mixins
│ └── _class.scss
├── src
│ ├── _button.scss
│ ├── _form.scss
| ├── ∶
| ├── ∶
│ └── _table.scss
@jumbo
jumbo / gist:5283531
Created April 1, 2013 06:47
Media Query
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
}
/* 1.5 dpr */
@media (-webkit-min-device-pixel-ratio: 1.5), (min-resolution: 144dpi){
}
@jumbo
jumbo / gist:1408422
Created November 30, 2011 08:23 — forked from haqu/gist:1016550
decoding PNG images from IPA package
mkdir _png
/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/pngcrush -d _png -revert-iphone-optimizations -q *.png