Skip to content

Instantly share code, notes, and snippets.

View netzpirat's full-sized avatar

Michael Kessler netzpirat

View GitHub Profile
angular.module('project', ['projectServices'])
.config ($routeProvider) ->
$routeProvider
.when('/login',
templateUrl: 'partials/login.html',
controller: LoginCtrl)
.when('/assignments',
templateUrl: 'partials/assignments.html',
controller: AssignmentListCtrl)
.otherwise(redirectTo: '/login')
@netzpirat
netzpirat / validation.js
Created September 12, 2011 22:25 — forked from mikeolivieri/validation.js
Backbone Model Validation
_.extend(Backbone.Model.prototype, Backbone.Events, {
errors: [],
validate: function (attrs) {
//reset
this.errors = [];
var model = this;
@netzpirat
netzpirat / USAGE.md
Created June 1, 2011 08:39 — forked from kossnocorp/USAGE.md
MacVim with Drawer compile manual

Clone & Build

curl https://gist.github.com/raw/970438/caff9a09ed2d223b1123a69ede17cb19ad352af9/build.sh | sh
@netzpirat
netzpirat / _README.md
Created November 19, 2009 21:45 — forked from kneath/_README.md

GitHub Javascript Strategy

Unless otherwise necessary (such as mobile development), the GitHub javascript codebase is based off jQuery. You can safely assume it will be included on every page.

File naming

  • All jquery plugins should be prefixed with jquery, such as jquery.facebox
  • All github-specific jquery plugins should be prefixed with jquery.github. Like jquery.github.repo_list.js
  • All page-specific files (that only run on ONE page) should be prefixed with page. page.billing.js
@netzpirat
netzpirat / growl.rb
Created May 6, 2009 21:54 — forked from stephencelis/growl.rb
Capistrano recipe for Growl notifications
# ~/.recipes/growl.rb
set :stage, nil unless defined? stage
namespace :growl do
task :notify do
growl_send(ENV["GROWL_MESSAGE"] || "wants your attention")
end
task :alert do
growl_send(ENV["GROWL_MESSAGE"] || "needs your attention", 2)
@netzpirat
netzpirat / gist:107768
Created May 6, 2009 21:53 — forked from stephencelis/gist:72794
Global Capistrano recipes
# ~/.caprc
Dir["#{ENV['HOME']}/.recipes/*.rb"].each do |tasks|
load tasks
end