Get it from the App Store.
In XCode's Preferences > Downloads you can install command line tools.
| # 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 |
| # 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 |
| 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 = 'robertj.whitney@gmail.com' | |
| s.summary = 'Stupid watcher is stupid' | |
| s.description = 'Watches a file, does stuff when that file is updated.' | |
| s.files = ['stupid_watcher.rb'] |
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
| # 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>/, " ") |
| 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. |
A list of Sketch plugins hosted at GitHub, in no particular order.
#!/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| #! /bin/sh | |
| rm /usr/local/var/postgres/postmaster.pid | |
| pg_ctl -D /usr/local/var/postgres -l /usr/local/var/postgres/server.log start |