Skip to content

Instantly share code, notes, and snippets.

@jgwhite
jgwhite / app.js
Created August 19, 2012 20:28
Ember.js Routing With Authentication Example
var App = Em.Application.create();
App.ApplicationController = Em.Controller.extend();
App.ApplicationView = Em.View.extend({ templateName: 'application' });
App.HomeController = Em.Controller.extend();
App.HomeView = Em.View.extend({ templateName: 'home' });
App.AuthController = Em.Controller.extend({
@adamgit
adamgit / gist:3705459
Last active December 11, 2023 16:27
Automatically create cross-platform (simulator + device) static libraries for Objective C / iPhone / iPad
##########################################
#
# c.f. http://stackoverflow.com/questions/3520977/build-fat-static-library-device-simulator-using-xcode-and-sdk-4
#
# Version 2.82
#
# Latest Change:
# - MORE tweaks to get the iOS 10+ and 9- working
# - Support iOS 10+
# - Corrected typo for iOS 1-10+ (thanks @stuikomma)
# ROUTER
GWS.Router.map (match) ->
#match("/").to("home") # home.handlebars gets rendered automatically and mapped to /
# according to guide the previous logic shouldn't be needed. but it won't work without it
# you can either use model: () -> or
# setupController: (controller, model) ->
# controller.set 'content', model
@dergachev
dergachev / GIF-Screencast-OSX.md
Last active June 5, 2024 22:16
OS X Screencast to animated GIF

OS X Screencast to animated GIF

This gist shows how to create a GIF screencast using only free OS X tools: QuickTime, ffmpeg, and gifsicle.

Screencapture GIF

Instructions

To capture the video (filesize: 19MB), using the free "QuickTime Player" application:

// Version: v1.0.0-pre.4-55-g11ab37f
// Last commit: 11ab37f (2013-01-27 14:30:02 -0800)
(function() {
/*global __fail__*/
/**
Ember Debug
@alexspeller
alexspeller / gist:5143497
Created March 12, 2013 14:48
Ember data 36d2e2a dist
// Last commit: 36d2e2a (2013-03-11 17:37:25 -0700)
(function() {
window.DS = Ember.Namespace.create({
// this one goes past 11
CURRENT_API_REVISION: 12
});
})();
@raytiley
raytiley / ember-sortable-list.js
Created March 23, 2013 04:25
Creating a sortable view using the html5sortable plugin and emberjs
// Working on getting html5sortable plugin working
// Key part is needing to call the sortable() method using Ember.run.next
// If called straight away the functionality quickly gets applied, but then is lost
// At least that's what it looks like when stepping through chrome debugger
// http://farhadi.ir/projects/html5sortable/
App.SortableView = Ember.CollectionView.extend({
tagName: 'ul',
itemViewClass: 'App.SortableItemView',
@mihkels
mihkels / 1-req.sh
Last active October 24, 2022 19:20
Ubuntu 12.04 with flask + nginx + uwsgi
#!/bin/bash
sudo apt-get update
# Now let's install all the required ubuntu packages
sudo apt-get install build-essential uwsgi nginx uwsgi-plugin-python python-pip
# PS! If you are doing this stuff for fun I do recommend to install nginx from PPA repository
# that you can find here https://launchpad.net/~nginx/+archive/development
@machty
machty / new-router-examples.md
Last active April 16, 2020 22:03
How to do cool stuff with the new Router API