This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'digest/md5' | |
def md5(filename) | |
Digest::MD5.hexdigest(IO.read(filename)) | |
end | |
duplicate_files = [] | |
Dir.glob('* 1.JPG').each do |duplicate_filename| | |
original_filename = duplicate_filename[0..7] + '.JPG' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<% view :about, :pane => :dialog, :width => 300, :bind=>{:visible => 'ScAdmin.appController.isAboutVisible'} do %> | |
<h1>Sprouted Note</h1> | |
version: 0.6.1 | |
<hr> | |
<a href=http://www.maloninc.com/cgi-bin/fswiki/wiki.cgi?page=SproutedNote target=_blank>SproutedNote Wiki</a> | |
<div> ©2008 <a href=mailto:hiroyuki@maloninc.com>Malon,Inc</a> All Rights Reserved. </div> | |
<div class="buttons"> | |
<%= button_view :outlet => true, :title => 'Close', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- content_for('body') do | |
.sc-welcome | |
%img{:class => "logo", :src => static_url('images/sproutcore-logo')} | |
.message | |
%h1 Welcome! | |
%h3 You are now running SproutCore. | |
.sticky-note | |
%p Things to do: | |
%ul | |
%li< |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#<SproutCore::Bundle:0x1a137e4> | |
~ Building Html: index.html | |
~ Started request handling: Sat Aug 16 11:06:50 -0400 2008 | |
~ Params: {"action"=>"main", "controller"=>"sprout_core_bundle_controller_0"} | |
~ undefined method `capture_haml' for SproutCore::ViewHelperSupport:Module - (NoMethodError) | |
/Library/Ruby/Gems/1.8/gems/sproutcore-0.9.16/lib/sproutcore/helpers/capture_helper.rb:36:in `content_for' | |
/Library/Ruby/Gems/1.8/gems/sproutcore-0.9.16/lib/sproutcore/view_helpers.rb:554:in `render_view' | |
(eval):3:in `view' | |
(haml):2:in `to_html' | |
/Library/Ruby/Gems/1.8/gems/haml-2.0.2/lib/haml/helpers.rb:400:in `call' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ========================================================================== | |
// Admin.TopicFeatureView | |
// ========================================================================== | |
require('core'); | |
require('views/collection/collection'); | |
require('views/label'); | |
/** @class | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ========================================================================== | |
// Admin.AppController | |
// ========================================================================== | |
require('core'); | |
/** @class | |
(Document Your View Here) | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<%= view :test_view, :view => 'Admin.TestView', | |
:bind => {:value => 'Admin.masterController.test'} %> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Homebrew, Ruby, Bash Completion | |
# After upgrading Ruby, run: gem pristine --all --only-executables | |
export PATH="/usr/local/bin:/usr/local/opt/ruby/bin:$PATH" | |
if [ -f $(brew --prefix)/etc/bash_completion ]; then | |
. $(brew --prefix)/etc/bash_completion | |
fi | |
# Directory Shortcuts | |
alias prj='cd "$HOME/Projects/"' | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
" set nocompatible | |
syntax on | |
" set ruler " show [line], [column] of cursor in bottom right of window (hurts performance) | |
" set nu " show line numbers | |
" set columns=80 | |
" filetype plugin indent on " load custom settings based on file type | |
" set spell spelllang=en_us | |
" set softtabstop=2 shiftwidth=2 expandtab | |
" set splitright |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
class Array | |
def mattflat | |
if empty? # base case | |
self | |
else | |
tail = pop | |
if tail.kind_of? Array | |
mattflat + tail.mattflat |
OlderNewer