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
import Ember from 'ember'; | |
import FilterSelectMixin from 'applicationfilter-select'; | |
const {RSVP} = Ember; | |
export default Ember.Controller.extend(FilterSelectMixin, { | |
search: '', | |
filter: '', | |
queryParams: ['search', 'filter'], | |
sortAscending: false, |
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
;; -*- mode: emacs-lisp -*- | |
;; This file is loaded by Spacemacs at startup. | |
;; It must be stored in your home directory. | |
(defun dotspacemacs/layers () | |
"Configuration Layers declaration. | |
You should not put any user code in this function besides modifying the variable | |
values." | |
(setq-default | |
;; Base distribution to use. This is a layer contained in the directory |
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
function generateAlphaNumericLabels(amount) { | |
var labels = []; | |
for (var i = 0; i <= amount; i++) { | |
var appendNumber = 0; | |
var offset = 0; | |
if (i > 25 && i <= 34) { | |
appendNumber = i - 25; | |
labels.push(String.fromCharCode(65 + offset) + appendNumber); |
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
//GistId: 1e59a17 | |
{ | |
"preset": "google", | |
"maximumLineLength": 120, | |
"disallowSpacesInsideObjectBrackets": null, | |
"disallowSpacesInFunctionExpression": null, | |
"disallowSpacesInAnonymousFunctionExpression": null, | |
"disallowMultipleVarDecl": true, |
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
# -polka- | |
# Remove the default keybinding | |
unbind C-b | |
# Set a new keybinding to C-/. In terminals C-/ is the same as C-_ | |
# however in tmux we can't bind to C-/ | |
set -g prefix C-t | |
# lower interval for faster updates |
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
// updated GulpFile for react-development-environment-setup lesson from egghead.io | |
// https://egghead.io/lessons/react-development-environment-setup | |
var gulp = require('gulp'); | |
var source = require('vinyl-source-stream'); | |
var browserify = require('browserify'); | |
var reactify = require('reactify'); | |
gulp.task('browserify', function () { | |
var bundleStream = browserify('./src/js/main.js') |
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
//GistID:1c45ca694ad333baeddd | |
'use strict'; | |
angular.module('stateMock', []); | |
angular.module('stateMock').service("$state", function($q) { | |
this.expectedTransitions = []; | |
this.current = {}; | |
this.transitionTo = function(stateName) { | |
if (this.expectedTransitions.length > 0) { | |
var expectedState = this.expectedTransitions.shift(); |
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
## Global Snippets | |
# Define a new Angular Controller; | |
# You can change the controller name and parameters | |
snippet ngc | |
.controller(${1:controllerName}, ['$scope', '${2:controllerDependencies}', | |
function($scope, ${4:injectables}) { | |
${5} | |
}; | |
]); | |
# angular.foreach loop |
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.directive('includeReplace', function () { | |
return { | |
require: 'ngInclude', | |
restrict: 'A', /* optional */ | |
link: function (scope, el, attrs) { | |
el.replaceWith(el.children()); | |
} | |
}; | |
}); |
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('appointment') | |
.factory('FileNameParser', function () { | |
return { | |
parse: function (file) { | |
var extensionPattern = /\.[0-9a-z]+$/i; | |
var extension = extensionPattern.exec(file); | |
return { | |
file_name: file.replace(extension, ''), | |
file_type: extension[0].replace('.', '').toLowerCase() | |
}; |