#!/usr/bin/env bash
# Assuming OS X Yosemite 10.10.4
# Install XCode and command line tools
# See https://itunes.apple.com/us/app/xcode/id497799835?mt=12#
# See https://developer.apple.com/library/mac/documentation/Darwin/Reference/ManPages/man1/xcode-select.1.html
xcode-select --install
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /bin/sh | |
rm /usr/local/var/postgres/postmaster.pid | |
pg_ctl -D /usr/local/var/postgres -l /usr/local/var/postgres/server.log start |
NOTE: the list has moved to https://github.com/sketchplugins/plugin-directory
A list of Sketch plugins hosted at GitHub, in no particular order.
- brandonbeecroft/Lorem-Ipsum-Plugin-for-Sketch This is a plugin for quickly creating Lorem Ipsum text in Sketch
- sebj/Sketch Templates and Plugins for Sketch by Bohemian Coding
- FredericJacobs/crop_Artboard A script to export the Sketch App artboards to the clipboard
- almonk/SketchGit A simple Git client built right into Sketch.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require "capybara" | |
# Encapsulate some jQuery UI interactions so we can call them cleanly using Capybara. | |
module Capybara::JQueryUI | |
# Find the jQuery UI Autocomplete widget corresponding to this element | |
def autocompleter | |
jquery_result(jquery_this(".autocomplete('widget')").first) | |
end | |
# Fill in an autocompletable field and accept a completion. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Because sometimes curses are not enough. | |
request = require 'request' | |
module.exports = (robot) -> | |
robot.respond /release the shakespearian insults/i, (msg) -> | |
request uri: 'http://www.pangloss.com/seidel/Shaker/index.html', (err, res, body) -> | |
msg.send body.match(/<font size="\+2">\s(.*)<\/font>/)[1].replace(/<br>/, " ") |
This is a rough outline rewrite the internals of MiniMagick - a ruby gem for using ImageMagick and GraphicsMagick from ruby scripts. MiniMagick's most prominent feature is creating appropriate shell commands which are run as subprocesses - thereby making the gem less fragile w.r.t. the graphics libraries and changes to the *Magick routines.
The MiniMagick image class does too much. I propose that the Image class should be responsible for the image files only and not be involved in running *Magick commands.
Image#new(path = nil)
If path is nil, creates a temporary file using
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Gem::Specification.new do |s| | |
s.name = 'stupid-watcher' | |
s.version = '0.0.2' | |
s.platform = Gem::Platform::RUBY | |
s.author = 'Robert Whitney' | |
s.email = '[email protected]' | |
s.summary = 'Stupid watcher is stupid' | |
s.description = 'Watches a file, does stuff when that file is updated.' | |
s.files = ['stupid_watcher.rb'] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# coding: utf-8 | |
require 'sinatra' | |
set server: 'thin', connections: [] | |
get '/' do | |
halt erb(:login) unless params[:user] | |
erb :chat, locals: { user: params[:user].gsub(/\W/, '') } | |
end | |
get '/stream', provides: 'text/event-stream' do |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# NOTICE: to get Nginx+Unicorn best-practices configuration see the gist https://gist.github.com/3052776 | |
$ cd /usr/src | |
$ wget http://nginx.org/download/nginx-1.2.1.tar.gz | |
$ tar xzvf ./nginx-1.2.1.tar.gz && rm -f ./nginx-1.2.1.tar.gz | |
$ wget ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-8.30.tar.gz | |
$ tar xzvf pcre-8.30.tar.gz && rm -f ./pcre-8.30.tar.gz | |
$ wget http://www.openssl.org/source/openssl-1.0.1c.tar.gz |
NewerOlder