Skip to content

Instantly share code, notes, and snippets.

View zackn9ne's full-sized avatar

zackn9ne zackn9ne

  • earth, New York
View GitHub Profile
@zackn9ne
zackn9ne / apache2_tail
Created July 1, 2014 16:09
tail apache2 log
tail -f /var/log/apache2/error.log
@zackn9ne
zackn9ne / grep
Created July 2, 2014 04:55
Grep show line numbers
$ grep -RTn phrase ./
@zackn9ne
zackn9ne / app.js
Created July 2, 2014 14:34
document ready
$(function(){ /*document ready*/
});
@zackn9ne
zackn9ne / console.log
Created July 5, 2014 03:54
console log a variable with its parameters with getJson!
console.log(JSON.stringify(blog_post_1));
@zackn9ne
zackn9ne / new-rails
Created July 7, 2014 16:09
rails app startup (no spring, yes psql)
$ rails new subway_manager --database=postgresql --skip-spring
@zackn9ne
zackn9ne / model.rb
Created July 7, 2014 16:36
has_and_belongs_to_many
has_and_belongs_to_many :othermodels
@zackn9ne
zackn9ne / find_a_value.js
Created July 7, 2014 21:01
print something to the console in JS
modelName.attributes
@zackn9ne
zackn9ne / change_model.js
Created July 7, 2014 22:53
change_a js model
blog_post_1.set('title', 'ruminations');
@zackn9ne
zackn9ne / view.js
Created July 7, 2014 22:54
backboneViewExtend
in a Backbone.View.Extend ( a views render method) you either have an
el: "#element-id" or
tagName: li
@zackn9ne
zackn9ne / consolr.js
Created July 7, 2014 22:59
js combo developing console tests
blog_post_1
blog_post_1.attributes
post_view
blog_post_1.set('title', 'ruminations');
post_view.render()
blog_post_1.attributes
blog_post_1.set('name', 'ruminations');
post_view.render()
$("#added").html(post_view.render())