Get it from the App Store.
In XCode's Preferences > Downloads you can install command line tools.
| #!/usr/bin/env bash | |
| # memusg -- Measure memory usage of processes | |
| # Usage: memusg COMMAND [ARGS]... | |
| # | |
| # Author: Jaeho Shin <[email protected]> | |
| # Created: 2010-08-16 | |
| ############################################################################ | |
| # Copyright 2010 Jaeho Shin. # | |
| # # | |
| # Licensed under the Apache License, Version 2.0 (the "License"); # |
| # This is the entire preseed config file used on an example Lucid system. See the preseed | |
| # documentation for more information on the options here. This will use US English by default. | |
| # | |
| # https://help.ubuntu.com/10.04/installation-guide/amd64/preseed-contents.html | |
| # | |
| # This preseed will automatically install Ubuntu 10.04 with default options. Understand what | |
| # it is doing before you use it. | |
| # | |
| # Boot Options line: | |
| # |
| desc "Compile all the assets named in config.assets.precompile" | |
| task :precompile do | |
| # We need to do this dance because RAILS_GROUPS is used | |
| # too early in the boot process and changing here is already too late. | |
| if ENV["RAILS_GROUPS"].to_s.empty? || ENV["RAILS_ENV"].to_s.empty? | |
| ENV["RAILS_GROUPS"] ||= "assets" | |
| ENV["RAILS_ENV"] ||= "production" | |
| Kernel.exec $0, *ARGV | |
| else | |
| Rake::Task["environment"].invoke |
| #!/usr/bin/env ruby | |
| # Check on the load times for Ohai plugins. | |
| # To disable from chef-solo and chef-client runs see | |
| # http://wiki.opscode.com/display/chef/Disabling+Ohai+Plugins | |
| require 'benchmark' | |
| require 'rubygems' | |
| require 'ohai' |
| # Services to use: | |
| # Choices: security updates (from security.debian.org), volatile updates (from volatile.debian.org) | |
| apt-setup-udeb apt-setup/services-select multiselect | |
| # Non-existing physical volume | |
| partman-auto-lvm partman-auto-lvm/no_such_pv error | |
| # Check the integrity of another CD-ROM? | |
| d-i cdrom-checker/nextcd boolean false | |
| # Install GRUB? | |
| grub-installer grub-installer/grub_not_mature_on_this_platform boolean false |
| # 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 | |
| # Ruby script to create overrides in PagerDuty. | |
| # | |
| # Copyright (c) 2011, PagerDuty, Inc. <[email protected]> | |
| # All rights reserved. | |
| # | |
| # Redistribution and use in source and binary forms, with or without | |
| # modification, are permitted provided that the following conditions are met: | |
| # * Redistributions of source code must retain the above copyright |
| #!./bin/knife exec | |
| # A knife exec script to change chef node's name, preserving all the attributes. | |
| # | |
| # Usage: knife exec rename-node.rb old-name new-name | |
| # | |
| # Script retrieves the Node object, changes its 'name' attribute, | |
| # creates new Node object with updated name and rest of attributes | |
| # untouched. Then it deletes old Node and Client objects from | |
| # database, and logs into the server to update it: |
| #!/usr/bin/env bash | |
| # | |
| # Wraps curl with a custom-drawn progress bar. Use it just like curl: | |
| # | |
| # $ curl-progress -O http://example.com/file.tar.gz | |
| # $ curl-progress http://example.com/file.tar.gz > file.tar.gz | |
| # | |
| # All arguments to the program are passed directly to curl. Define your | |
| # custom progress bar in the `print_progress` function. | |
| # |