This gist's comment stream is a collection of webdev apps for OS X. Feel free to add links to apps you like, just make sure you add some context to what it does — either from the creator's website or your own thoughts.
— Erik
#!/usr/bin/env ruby | |
# Sizes - Calculate and sort all filesizes for current folder Includes | |
# directory sizes, colorized output Brett Terpstra 2019 WTF License | |
VERSION = "1.0.1" | |
require 'shellwords' | |
# Just including term-ansicolor by @flori and avoiding all the | |
# rigamarole of requiring multiple files when it's not a gem... - Brett | |
# |
en: | |
# ~~~~~~~~ | |
# Model Errors | |
# ~~~~~~~~ | |
activemodel: | |
errors: | |
models: | |
bidrequest: | |
not_json: "Not a valid JSON" | |
url_not_valid: "Not a valid URL" |
git rev-parse: RefName ======> SHA1 | |
git name-rev: SHA1 <===== RefName | |
# Convert the reference name HEAD to its corresponding SHA1 | |
git rev-parse HEAD # Assuming for the sake of example that it outputs 1234567 | |
# Convert the SHA1 (1234567) into its reference name (should output HEAD in our example) | |
git name-rev 1234567 | |
# or else |
# encoding: UTF-8 | |
class ActiveRecord::Base | |
# Class method to add destroyable paperclip attachments. | |
# | |
# Example: | |
# has_attached_file :image | |
# has_destroyable_file :image | |
# attr_accessible :image_delete | |
# |
I'm a fan of MiniTest::Spec. It strikes a nice balance between the simplicity of TestUnit and the readable syntax of RSpec. When I first switched from RSpec to MiniTest::Spec, one thing I was worried I would miss was the ability to add matchers. (A note in terminology: "matchers" in MiniTest::Spec refer to something completely different than "matchers" in RSpec. I won't get into it, but from now on, let's use the proper term: "expectations").
Let's take a look in the code (I'm specifically referring to the gem, not the standard library that's built into Ruby 1.9):
# minitest/spec.rb
module MiniTest::Expectations
java -jar ~/.m2/repository/org/jruby/jruby-complete/1.6.5/jruby-complete-1.6.5.jar -S gem env |
# encoding: UTF-8 | |
Capistrano::Configuration.instance(:must_exist).load do | |
namespace :rails do | |
desc "Open the rails console on one of the remote servers" | |
task :console, :roles => :app do | |
hostname = find_servers_for_task(current_task).first | |
exec "ssh -l #{user} #{hostname} -t 'source ~/.profile && #{current_path}/script/rails c #{rails_env}'" | |
end | |
end |