Skip to content

Instantly share code, notes, and snippets.

View jacobat's full-sized avatar

Jacob Atzen jacobat

  • Copenhagen, Denmark
View GitHub Profile
% git init
Initialized empty Git repository in /Users/jacob/code/reposB/.git/
% touch fileB1
% mkdir dirB1
% touch dirB1/fileB2
% touch dirB1/fileB3
% git add .
% git ci -m "Setup my own project"
[master (root-commit) 0069e08] Setup my own project
0 files changed, 0 insertions(+), 0 deletions(-)
% git pull ../reposA
warning: no common commits
remote: Counting objects: 4, done.
remote: Compressing objects: 100% (2/2), done.
remote: Total 4 (delta 0), reused 0 (delta 0)
Unpacking objects: 100% (4/4), done.
From ../reposA
* branch HEAD -> FETCH_HEAD
Merge made by recursive.
0 files changed, 0 insertions(+), 0 deletions(-)
% git remote add base ../reposA
% git fetch base
From ../reposA
* [new branch] master -> base/master
% git co -b base base/master
Branch base set up to track remote branch master from base.
Switched to a new branch 'base'
% ls
dirA1 fileA1 fileA2
set :application, "[application name here]"
set :repository, "."
set :deploy_to, "[where you want the code to go]"
set :scm, :git
set :branch, "master"
set :use_sudo, false
set :deploy_via, :copy
set :copy_cache, true
set :copy_exclude, [".git", "materials"]
set :www_user, "[name of the user the webserver runs as]"
@jacobat
jacobat / gist:150879
Created July 20, 2009 20:23
Quick'n'dirty script for figuring out which methods are unused in a Rails project
#!/usr/bin/env ruby
grep_result = `grep -ri "def " #{ARGV.join(' ')}`
methods = grep_result.split("\n").collect do |line|
md = line.match(/.*:\s+def ([a-z_]+)(\((.*)\))?/i)
md.to_a[1]
end
filtered_methods = methods.uniq - ["initialize"]
dirs = (Dir.glob("*") - ['vendor', 'log']).join(" ")
#!/bin/sh
OLD_HEAD=$1
NEW_HEAD=$2
HASH=`git show-ref --heads --hash=8 $NEW_HEAD`
TARBASENAME=`basename $PWD`
TARFILENAME=pkgs/$TARBASENAME.$HASH.tar.bz2
echo "Packaging files:"
echo ""
tar jcvf $TARFILENAME `git diff --name-only --stat $OLD_HEAD..$NEW_HEAD`
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
It was created by Gource configure 0.28, which was
generated by GNU Autoconf 2.65. Invocation command line was
$ ./configure --disable-dependency-tracking --prefix=/usr/local/brew/Cellar/gource/0.28 --disable-sdltest --disable-freetypetest
## --------- ##
## Platform. ##
From git://github.com/acaudwell/Gource
* branch HEAD -> FETCH_HEAD
HEAD is now at e1cb95e... Ignore .deps and .dirstamp
configure.ac:11: installing `./config.guess'
configure.ac:11: installing `./config.sub'
configure.ac:9: installing `./install-sh'
configure.ac:9: installing `./missing'
Makefile.am: installing `./depcomp'
configure: error: FTGL 2.1.3 or greater is required. Please see INSTALL
test "should fail without some param" do
thing = Thing.new(@valid_params.delete[:some_param])
assert !thing.valid?
end
hop md.links