This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
app = angular.module 'BlogExample', [] | |
# Simple controller that loads all blog posts | |
app.controller 'BlogCtrl', ['$scope', 'Blog', ($scope, Blog) -> | |
# Get all the blog posts | |
Blog.all().then (posts) -> | |
$scope.posts = posts | |
# Extend the $scope with our own properties, all in one big block | |
# I like this because it looks like declaring a class. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Name: EXIFmover.py | |
# Author: Brian Klug (@nerdtalker / brian@brianklug.org) | |
# Purpose: | |
# Move Files into directory based on EXIF data make and model | |
# Designed to un-clusterfuck the Dropbox camera upload directory which is a mess of every | |
# JPEG and PNG ever if you use it like I do on a bunch of phones, and thus totally unwieldy | |
# and full of images sorted by date or else nothing sometimes, dropbox seems nondeterminstic | |
# Moves files into /[Image Make]+[Image Model]/ eg /Camera Uploads/LGE Nexus 4/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# Initialize the stuff | |
# | |
# We build the status bar item menu | |
framework 'AppKit' | |
def setupMenu | |
menu = NSMenu.new | |
menu.initWithTitle 'Flipsicle' | |
mi = NSMenuItem.new |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var q = new Parse.Query(Parse.User); | |
q.find({ | |
success:function(items){ | |
console.log(items.length); | |
} | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CACHE MANIFEST | |
CACHE: | |
index.html | |
index.css | |
index.js | |
cordova.js | |
NETWORK: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
angular.module('AuthModule', ['localStorage']).factory('AuthState', function(localStorage) { | |
'use strict'; | |
var state = { | |
isLoggedIn: localStorage.get('isLoggedIn') | |
}; | |
return { | |
isLoggedIn: isLoggedIn, | |
}; | |
}); | |
angular.module('controllers', ['AuthState']).factory('SomeCtrl', function($scope, state) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$http(method: 'DELETE', url: path + REST.ids(collection).join(','), params: params) | |
.success (data, status, headers, config) -> | |
console.log "#{Quests.name}.delete: OK" | |
.error (data, status, headers, config) -> | |
console.error "#{Quests.name}.delete: ERROR" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Show hidden characters
{ | |
"always_prompt_for_file_reload": false, | |
"always_show_minimap_viewport": false, | |
"animation_enabled": true, | |
"atomic_save": true, | |
"auto_close_tags": true, | |
"auto_complete": true, | |
"auto_complete_commit_on_tab": false, | |
"auto_complete_delay": 50, | |
"auto_complete_selector": "source - comment, meta.tag - punctuation.definition.tag.begin", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Execute action | |
# $timeout(function() { | |
# $scope.invited = true | |
# }, 1000); | |
# IONIC BACKDROP EXAMPLE | |
# $ionicBackdrop.retain() | |
# $timeout(function() { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
addToList: (listId, userids) -> | |
userObj = userids.map (i) -> { id: i } | |
console.log 'HTTP:addUsersToList', userObj, listId | |
promise = $http.post(API_ENDPOINT + "/list/?access_token=" + Session.store.get("access_token"), | |
[ | |
{ |
OlderNewer