Skip to content

Instantly share code, notes, and snippets.

Avatar
🚀

John W. Long jlong

🚀
View GitHub Profile
View gist:186664
# disk usage per directory
usage ()
{
if [ $1 ]
then
du -hd $1
else
du -hd 1
fi
}
View gist:186674
jlong@rhyddid:~/Workspaces/memberhub/mockups$ usage
201M ./.git
16M ./avatars
2.0M ./buttons
4.2M ./icons
79M ./website
304K ./wireframes
364M .
jlong@rhyddid:~/Workspaces/memberhub/mockups$ git gc --aggressive
Counting objects: 545, done.
View gist:190515
I would really like to have several repositories for an application to store the various design and development resources. A project directory typically has the following subdirectories:
project-name/
artwork/ # logos, etc...
mockups/ # mockups of application screens
prototype/ # raw html and css
application/ # the rails application
So for "project-name" I'd have repositories for artwork, mockups, etc... The problem with this approach on Github is that for one project it will consume 4 slots. If I do this for every project I'll bump over my current plan's repository limits rather quickly.
View .gitignore
.DS_Store
coverage
db/*.sqlite3
doc/api
doc/app
log/*.log
tmp/**/*
View .aliases
# Console
alias profile="vi ~/.bash_profile"
alias ls="ls -p -G -h"
# Desktop Programs
alias fireworks="open -a '/Applications/Adobe Fireworks CS3/Adobe Fireworks CS3.app'"
alias photoshop="open -a '/Applications/Adobe Photoshop CS4/Adobe Photoshop.app'"
alias illustrator="open -a '/Applications/Adobe Illustrator CS4/Adobe Illustrator.app'"
alias preview="open -a '/Applications/Preview.app'"
alias xcode="open -a '/Developer/Applications/Xcode.app'"
View minimal.css
/* Minimal G-mail CSS for Mailplane */
/* Hide the links to other apps */
#gbar {
display: none
}
/* Put the settings links on the same level as the search box */
div.nH + div.nH div.nH.qp {
border: none;
@jlong
jlong / sass.rb
Created Jan 20, 2010
put this file in config/initializers
View sass.rb
require 'sass'
if /production|staging/.match(RAILS_ENV)
# Compress CSS (a small file is preferable in production)
Sass::Plugin.options[:style] = :compressed
else
# Expand CSS
Sass::Plugin.options[:style] = :expanded
# Generate CSS from SASS every time a controller is accessed
View irb
$ script/console
Loading development environment (Rails 2.3.2)
>> Sass::Plugin.options
=> {:css_location=>"/Users/jlong/Workspaces/groupstory/application/public/stylesheets", :template_location=>"/Users/jlong/Workspaces/groupstory/application/public/stylesheets/sass", :always_update=>true, :always_check=>true, :style=>:expanded, :cache_location=>"/Users/jlong/Workspaces/groupstory/application/tmp/sass-cache", :line_numbers=>true, :full_exception=>true}
View _inline-block.scss
/*
Inline-block for IE6, Firefox 2, and up
via http://blog.mozilla.com/webdev/2009/02/20/cross-browser-inline-block
*/
@module inline-block {
display: -moz-inline-stack;
display: inline-block;
zoom: 1;
*display: inline;
View lobster.rb
require "rubygems"
require "rack"
require "rack/lobster"
app = Rack::Builder.new do
use Rack::ShowExceptions
run Rack::Lobster.new
end
webrick = Rack::Handler.get('webrick')