Skip to content

Instantly share code, notes, and snippets.

View darthdeus's full-sized avatar

Jakub Arnold darthdeus

View GitHub Profile
@darthdeus
darthdeus / gist:4706568
Last active December 12, 2015 03:28 — forked from jackkitley/gist:4706392
{{#linkTo catalogue.item item}
App.Router.map(function() {
this.resource('catalogue', function() {
// this.route('index'); - this is automatic
this.route('search', { path: ':searchvalue' });
this.route('item', {path: '/view/:itemguid'});
});
});
App.Router = Ember.Router.extend({
enableLogging: true,
root: Ember.Route.extend({
// Transitions
showModuleDocuments: Ember.Route.transitionTo('moduleDocuments'),
showModuleTask: Ember.Route.transitionTo('moduleTask'),
showSettings: Ember.Route.transitionTo('settings'),
showManagement: Ember.Route.transitionTo('management'),
showAdministration: Ember.Route.transitionTo('administration'),
window.App = Em.Application.create({
LOG_TRANSITIONS: true
});
App.deferReadiness();
App.Router.map(function() {
this.route("login", { path: "/login" });
this.route("explore", { path: "/explore" });
this.route("events", { path: "/events" });
var get = Ember.get;
/**
@extends Ember.Mixin
Implements common pagination management properties for controllers.
*/
Ember.PaginationSupport = Ember.Mixin.create({
/**
*/
In controller:
App.DashboardController = Ember.Controller.extend
workspaces: []
currentWorkspace: null //set by /workspace/:id route
fetch: ->
//ajax load workspaces
Scvrush.PostsController = Em.ArrayController.extend({
query: null,
updatePosts: _.throttle(function(value) {
var posts;
if (this.get("query") === "") {
posts = Scvrush.get("store").find(Scvrush.Post);
} else {
posts = Scvrush.get("store").find(Scvrush.Post, { query: this.get("query") });
@darthdeus
darthdeus / Bundle.sh
Created November 24, 2012 15:08 — forked from inossidabile/Bundle.sh
Joosy / Blog / Rails preparations
bundle install
@darthdeus
darthdeus / node.json
Created November 12, 2012 16:00 — forked from anonymous/node.json
{
"vim": { "extra_packages": [ "vim-nox" ] },
"run_list": ["recipe[vim]"]
}
describe 1 do
let(:foo) { [] }
it "can push" do
foo.push 1
foo.size.should == 1
end
it "can push" do
foo.push 1
@darthdeus
darthdeus / LICENSE.txt
Created March 3, 2012 18:02 — forked from aemkei/LICENSE.txt
Binary Tetris - 140byt.es
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
Version 2, December 2004
Copyright (C) 2011 YOUR_NAME_HERE <YOUR_URL_HERE>
Everyone is permitted to copy and distribute verbatim or modified
copies of this license document, and changing it is allowed as long
as the name is changed.
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE