Skip to content

Instantly share code, notes, and snippets.

View jacobat's full-sized avatar

Jacob Atzen jacobat

  • Copenhagen, Denmark
View GitHub Profile
to maximize for a
tell application "Finder"
set _b to bounds of window of desktop
end tell
tell application a
set bounds of front window to _b
end tell
end maximize
sudo dscl localhost -create /Local/Default/Hosts/some.domain IPAddress 127.0.0.1
sudo dscl localhost -create /Local/Default/Hosts/someother.domain IPAddress 127.0.0.1
sudo dscl localhost -delete /Local/Default/Hosts/some.domain
sudo dscl localhost -delete /Local/Default/Hosts/someother.domain
sudo dscl localhost -create /Local/Default/Hosts/$1 IPAddress 127.0.0.1
Processing TasksController#index (for 127.0.0.1 at 2009-06-02 12:05:59) [GET]
Task Load (0.4ms) SELECT * FROM "tasks"
Rendering template within layouts/tasks
Rendering tasks/index
Completed in 58ms (View: 54, DB: 0) | 200 OK [http://localhost/tasks]
% ./script/console
Loading development environment (Rails 2.3.2)
>> Task.all
=> [#<Task id: 1, description: "Task no. 1", created_at: "2009-06-02 10:06:06", updated_at: "2009-06-02 10:06:06">]
>> Task.first.description
=> "Task no. 1"
>> Task.first.update_attribute(:description, "First task")
=> true
% rake db:migrate
(in /Users/jacob/Sites/demoapp)
== CreateTasks: migrating ====================================================
-- create_table(:tasks)
-> 0.0015s
== CreateTasks: migrated (0.0018s) ===========================================
% rake log:clear
(in /Users/jacob/Sites/demoapp)
namespace :app do
desc 'Wipeout all tasks'
task :wipe_tasks => :environment do
Task.destroy_all
end
end
repos-A
- fileA1
- fileA2
\ dirA1
- fileA3
repos-B
- fileB1
\ dirB1
- fileB2
- fileB3
% git init
Initialized empty Git repository in /Users/jacob/code/reposA/.git/
% touch fileA1
% touch fileA2
% mkdir dirA1
% touch dirA1/fileA3
% git add .
% git ci -m "Added files"
[master (root-commit) eb5e5c0] Added files
0 files changed, 0 insertions(+), 0 deletions(-)