Get Homebrew installed on your mac if you don't already have it
Install highlight. "brew install highlight". (This brings down Lua and Boost as well)
from PIL import Image, ImageChops | |
def trim(im, border): | |
bg = Image.new(im.mode, im.size, border) | |
diff = ImageChops.difference(im, bg) | |
bbox = diff.getbbox() | |
if bbox: | |
return im.crop(bbox) | |
def create_thumbnail(path, size): |
Get Homebrew installed on your mac if you don't already have it
Install highlight. "brew install highlight". (This brings down Lua and Boost as well)
# Mac OS X Lion introduced a new, iOS-like context menu when you press and hold a key | |
# that enables you to choose a character from a menu of options. If you are on Lion | |
# try it by pressing and holding down 'e' in any app that uses the default NSTextField | |
# for input. | |
# | |
# It's a nice feature and continues the blending of Mac OS X and iOS features. However, | |
# it's a nightmare to deal with in Sublime Text if you're running Vintage (Vim) mode, | |
# as it means you cannot press and hold h/j/k/l to move through your file. You have | |
# to repeatedly press the keys to navigate. |
http { | |
proxy_cache_path /var/cache/nginx levels=1:2 keys_zone=one:8m max_size=3000m inactive=600m; | |
proxy_temp_path /var/tmp; | |
include mime.types; | |
default_type application/octet-stream; | |
sendfile on; | |
keepalive_timeout 65; | |
gzip on; | |
gzip_comp_level 6; |
/** | |
* Shamelessly stolen from http://blog.jeansebtr.com/post/36590722386/async-loading-of-githubs-gists-without-jquery-31-loc | |
* | |
* Use like this: <gist data-username="brandonb927" data-id="4138162" data-file="gists2.js"><a href="https://gist.github.com/brandonb927/4138162#file_gists2.js">Gist</a></gist> | |
* UPDATED 02/06/2013: Github implemented Namespaced Gists a few hours ago, which means gist.github.com/4149074 now redirects to gist.github.com/brandonb927/4149074 and I have updated the gist to reflect this new format | |
* | |
*/ | |
(function(){ | |
var gists = document.getElementsByTagName('gist'); |
This re-styles your sublime text sidebar to be dark, it fits default Monokai theme.
Save the Default.sublime-theme file into packages/Theme - Default, make a backup of your original if you want to be able to go back easily.
Based on:
Here is a high level overview for what you need to do to get most of an Android environment setup and maintained.
Prerequisites (for Homebrew at a minimum, lots of other tools need these too):
xcode-select --install
will prompt up a dialog)Install Homebrew:
ruby -e "$(curl -fsSL https://raw.github.com/Homebrew/homebrew/go/install)"
// | |
// LoadingOverlay.swift | |
// app | |
// | |
// Created by Igor de Oliveira Sa on 25/03/15. | |
// Copyright (c) 2015 Igor de Oliveira Sa. All rights reserved. | |
// | |
// Usage: | |
// | |
// # Show Overlay |