Get it from the App Store.
In XCode's Preferences > Downloads you can install command line tools.
| #!/bin/sh | |
| ## | |
| # This is a script with usefull tips taken from: | |
| # https://github.com/mathiasbynens/dotfiles/blob/master/.osx | |
| # | |
| # Run in interactive mode with: | |
| # $ sh -c "$(curl -sL https://raw.github.com/gist/2108403/hack.sh)" | |
| # | |
| # or run it without prompt questions: |
| <!DOCTYPE html> | |
| <html lang="en"> | |
| <head> | |
| <meta charset="utf-8" /> | |
| <!-- Make a DNS handshake with a foreign domain, so the connection goes faster when the user eventually needs to access it. This works well for loading in assets (like images) from another domain, or a JavaScript library from a CDN. --> | |
| <link rel="dns-prefetch" href="//ajax.googleapis.com" /> | |
| <link rel="dns-prefetch" href="//s3.amazonaws.com" /> | |
| <!-- Make sure the latest version of IE is used --> | |
| <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" /> |
| # 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 |
| #!/usr/bin/env ruby | |
| # List all keys stored in memcache. | |
| # Credit to Graham King at http://www.darkcoding.net/software/memcached-list-all-keys/ for the original article on how to get the data from memcache in the first place. | |
| require 'net/telnet' | |
| headings = %w(id expires bytes cache_key) | |
| rows = [] |
| DESCRIPTION | |
| logstat.pl and logtop.pl | |
| These scripts show current and average request-per-second counts based on | |
| apache access logs in real-time. | |
| You can see the total requests-per-second as well as a breakdown by: | |
| * vhost | |
| * URL |
| require 'fileutils' | |
| # force the whole app to use its own tmpdir | |
| FileUtils.mkdir_p(Rails.root.join('tmp')) | |
| ENV['TMPDIR'] = Rails.root.join('tmp') |