Skip to content

Instantly share code, notes, and snippets.

View linojon's full-sized avatar

Jonathan Linowes linojon

View GitHub Profile
# Auto detect text files and perform LF normalization
* text=auto
# Custom for Visual Studio
*.cs diff=csharp
# Standard to msysgit
*.doc diff=astextplain
*.DOC diff=astextplain
*.docx diff=astextplain
*.DOCX diff=astextplain
*.dot diff=astextplain
@linojon
linojon / parkerhill-unity.gitignore
Last active September 20, 2024 14:01
parkerhill-unity.gitignore
# This .gitignore file should be placed at the root of your Unity project directory
# First part from https://github.com/github/gitignore/blob/master/Unity.gitignore
# Parkerhill additions at the end
/[Ll]ibrary/
/[Tt]emp/
/[Oo]bj/
/[Bb]uild/
/[Bb]uilds/
/[Ll]ogs/
@linojon
linojon / .gitignore
Created October 4, 2015 21:58 — forked from thebeardphantom/.gitignore
Unity GitIgnore
# Ignore everything
/*
/*/
# Inverse ignore some stuff
!/Assets/
!/ProjectSettings/
!.gitignore
# OS Stuff
module DropInTheBucket
class File < ::ActiveRecord::Base
belongs_to :dropinable, polymorphic: true
mount_uploader :item, PhotoUploader
end
end
---
class Note < ActiveRecord::Base
// app/assets/javascripts/myapp/controllers.js
function PostListCtrl($scope) {
$scope.posts = [
{ "title": "My First Post", "intro": "Subtitle of my post" },
{ "title": "Another Post", "intro": "Something interesting about this post" },
{ "title": "One More Thng", "intro": "There's always something more" }
]
}
// html contains <div ng-app="myapp">
@linojon
linojon / rails31init.md
Created September 10, 2011 02:20 — forked from docwhat/rails31init.md
Rails 3.1 with Rspec, Factory Girl, Haml, Simple Form, Devise, CanCan, Nifty, Database Cleaner, Spork, and Guard

Install Rails 3.1

gem install rails

generate new app, skipping Test::Unit file generation

rails new my_app -T

Set up Gemfile

# Is this a bug in rails? time conversion to xml and json ends in Z not %Z ?
irb(main):018:0> t = Time.zone.now
=> Wed, 10 Aug 2011 17:38:45 UTC +00:00
irb(main):019:0> t.to_json
=> "\"2011-08-10T17:38:45Z\""
irb(main):020:0> t.xmlschema
=> "2011-08-10T17:38:45Z"
irb(main):021:0> t.strftime("%Y-%m-%dT%H:%M:%S%Z")
=> "2011-08-10T17:38:45UTC"
EXAMPLE 5
<% semantic_form_for @info, :renderer => :erb do |f| %>
<% f.inputs do %>
<% f.inputs :structure => :inline do %>
<%= f.input :first %>
<%= f.input :middle %>
<%= f.input :last %>
<%= f.buttons %>
<% end %>
<% end %>
[12:55][jonathan@jsl:~/rails/rr3]$ rails s
/Users/jonathan/.rvm/gems/ruby-1.9.2-preview1/gems/activesupport-3.0.0.beta/lib/active_support/core_ext/object/try.rb:29: [BUG] rb_add_method: unsupported method type (8)
ruby 1.9.2dev (2009-07-18 trunk 24186) [i386-darwin10.2.0]
-- control frame ----------
c:0030 p:---- s:0080 b:0080 l:000079 d:000079 CFUNC :alias_method
c:0029 p:0044 s:0075 b:0075 l:000074 d:000074 CLASS /Users/jonathan/.rvm/gems/ruby-1.9.2-preview1/gems/activesupport-3.0.0.beta/lib/active_support/core_ext/object/try.rb:29
c:0028 p:0009 s:0073 b:0073 l:000072 d:000072 TOP /Users/jonathan/.rvm/gems/ruby-1.9.2-preview1/gems/activesupport-3.0.0.beta/lib/active_support/core_ext/object/try.rb:1
c:0027 p:---- s:0071 b:0071 l:000070 d:000070 FINISH
Processing ApplicationController#index (for 67.45.129.217 at 2009-11-30 22:12:25) [GET]
ActionController::RoutingError (No route matches "/default+en.I.js" with {:request_uri=>"/default+en.I.js", :domain=>"reviewramp.com", :method=>:get, :port=>80, :content_type=>nil, :protocol=>"http://", :remote_ip=>"67.45.129.217", :subdomain=>"", :accepts=>"text/html,application/xml,*/*"}):
Rendering rescues/layout (not_found)
SQL (0.1ms) SET SQL_AUTO_IS_NULL=0
Processing ApplicationController#index (for 67.45.129.217 at 2009-11-30 22:12:25) [GET]