This file contains hidden or 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
create a file in your ~ dir named .gitignore_global | |
then: | |
git config --global core.excludesfile ~/.gitignore_global | |
add content to your .gitignore_global file |
This file contains hidden or 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
; SLIME 20100404 | |
user> (println "Hello World") | |
Hello World | |
nil | |
user> |
This file contains hidden or 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
;;; sets zsh path | |
(let ((path (shell-command-to-string ". ~/.zshrc; echo -n $PATH"))) | |
(setenv "PATH" path) | |
(setq exec-path | |
(append | |
(split-string-and-unquote path ":") | |
exec-path))) |
This file contains hidden or 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
Divide by zero | |
[Thrown class java.lang.ArithmeticException] | |
Restarts: | |
0: [QUIT] Quit to the SLIME top level | |
Backtrace: | |
0: Numbers.java:156 clojure.lang.Numbers.divide | |
1: Numbers.java:3691 clojure.lang.Numbers.divide | |
2: NO_SOURCE_FILE:1 user/eval1950 |
This file contains hidden or 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
class Docushin::CollectionsController < ActionController::Base | |
layout 'docushin' | |
def index | |
@content = File.read(File.join(Rails.root, "doc", "docushin", "collections.yml")) rescue [] | |
@sets = @content.nil? ? nil : YAML.load(@content) | |
end | |
end |
This file contains hidden or 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
describe 'update markdown file' do | |
it 'should update specified attributes' do | |
route.save | |
route.updated_at.should == File.mtime(File.join(route.base, "#{route.file_name}.md")).to_i | |
end | |
end |
This file contains hidden or 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
module ApplicationHelper | |
def cp(*paths) | |
paths.each do |path| | |
#do something | |
end | |
end | |
end |
This file contains hidden or 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
$LOAD_PATH.unshift(File.dirname(__FILE__)) | |
$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib')) | |
ENV["RAILS_ENV"] ||= 'test' | |
require File.expand_path("../../spec/dummy/config/environment", __FILE__) | |
require 'rubygems' | |
require 'bundler/setup' | |
require 'docushin' | |
require 'pry' |
This file contains hidden or 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
[3] pry(#<Docushin::CollectionsController>)> @data[:id] | |
=> "4d696868a047e668b491fb43aebd2fc4" | |
[4] pry(#<Docushin::CollectionsController>)> @data[:id].to_yaml | |
=> "--- !binary |-\n NGQ2OTY4NjhhMDQ3ZTY2OGI0OTFmYjQzYWViZDJmYzQ=\n" |
This file contains hidden or 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
[1] pry(#<Docushin::CollectionsController>)> @data[:id].class | |
=> String | |
[2] pry(#<Docushin::CollectionsController>)> @data[:id] | |
=> "9c52e7c86961d940906a65663d3649dc" | |
[4] pry(#<Docushin::CollectionsController>)> @data[:id].to_yaml | |
=> "--- 9c52e7c86961d940906a65663d3649dc\n...\n" | |
[5] pry(#<Docushin::CollectionsController>)> @data[:id].to_yaml | |
=> "--- !binary |-\n OWM1MmU3Yzg2OTYxZDk0MDkwNmE2NTY2M2QzNjQ5ZGM=\n" | |
[6] pry(#<Docushin::CollectionsController>)> |