I hereby claim:
- I am ajhekman on github.
- I am ajhekman (https://keybase.io/ajhekman) on keybase.
- I have a public key whose fingerprint is 19E4 5B8D AC57 E3A9 BDC8 4095 677E 35E7 53F0 BF93
To claim this, I am signing this object:
import Ember from 'ember'; | |
import computedStrict from '../computedStrict'; | |
export default Ember.Component.extend({ | |
firstName: 'John', | |
lastName: 'Doe', | |
middleInitial: "S", | |
fullName: computedStrict('firstName', 'lastName', function(firstN, lastN){ | |
return firstN() + " " + lastN(); |
#!/bin/sh | |
# | |
# Change the commit and/or author date of git commits. | |
# | |
# change-date [-f] commit-to-change [branch-to-rewrite [commit-date [author-date]]] | |
# | |
# If -f is supplied it is passed to "git filter-branch". | |
# | |
# If <branch-to-rewrite> is not provided or is empty HEAD will be used. |
require 'pathname' | |
require 'pry' | |
# Usage: | |
# | |
# class YourClass | |
# include Debugger | |
# debugger_namespace "TheNamespace" # optional, defaults to file basename | |
# debugger_show_line_numbers # optional | |
# |
I hereby claim:
To claim this, I am signing this object:
angular.module("LoadingStatus", []) | |
.factory "Loading", ($q)-> | |
class Loading | |
constructor: ()-> | |
loadingDecorator : (key, context, httpRequestTarget) => | |
### |
angular.module("app", [ "ngRoute" ]).run ($rootScope, UserService) -> | |
#Avoid $rootScope if you can. User and Session info is about all that should go on $rootScope. | |
#UserService.getUserByID(1).then (user)-> | |
# $rootScope.user = user |
setSpecific = (callback, hours=0, minutes=0, seconds=0, options={tickRate:10000, repeat:true}) -> | |
start = new Date() | |
target = new Date() | |
#add a day to target if we're already past the time | |
target.setDate start.getDate() + 1 if start.getHours() > hours or (start.getHours() is hours and start.getMinutes() > minutes) or start.getHours() is hours and start.getMinutes() is minutes and start.getSeconds() >= seconds | |
target.setHours hours | |
target.setMinutes minutes | |
target.setSeconds seconds | |
console.log "set refresh for #{target}" | |
intervalID = setInterval -> |
# create a module | |
# here we've created a module "myModule" that has a 3rd party dependency "toolkit" | |
# if we didn't have dependencies, then we would use a blank array "[]" | |
angular.module('myModule', ['toolkit']) | |
# file: /app/scripts/services/RemoteResource.coffee | |
# here we're referencing the already defined 'myModule', and defining the service | |
# "remoteResource" with a dependency of "$http"(AngularJS builtin) | |
angular.module('myModule').service 'RemoteResource', ($http)-> |
// Here success1, success2, and success21 are functions defined elsewhere | |
var promise = yourAsyncTask() | |
promise.then(success1) | |
promiseTwo = promise.then(success2) | |
promiseTwo.then(success21) |
var yourAsyncTask; | |
yourAsyncTask = function() { | |
var deffered, failure, successful; | |
deffered = $q.defer(); | |
successful = 'what ever your success condition is'; | |
failure = 'what ever your failure condition is'; | |
/*here we're using setTimeout to make it asynchronous*/ | |
setTimeout(function() { |