Skip to content

Instantly share code, notes, and snippets.

View alexanderjeurissen's full-sized avatar

Alexander Jeurissen alexanderjeurissen

View GitHub Profile
//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();
// 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')
# -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
//GistId: 1e59a17
{
"preset": "google",
"maximumLineLength": 120,
"disallowSpacesInsideObjectBrackets": null,
"disallowSpacesInFunctionExpression": null,
"disallowSpacesInAnonymousFunctionExpression": null,
"disallowMultipleVarDecl": true,
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);
;; -*- 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
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,
@alexanderjeurissen
alexanderjeurissen / .cvimrc
Last active July 4, 2017 15:59
Chromium vim extension configuration file
" Position bar at bottom like vimperator
let barposition = "bottom"
" Use <C-d> and <C-u> to scroll like in vimperator
map <C-u> scrollPageUp
map <C-d> scrollPageDown
" Use d for closing tab and u for undo close tab
" like in vimperator
unmap d
@alexanderjeurissen
alexanderjeurissen / devicons.py
Created May 5, 2016 16:32
Linemode that shows WebDevIcons in Ranger
#!/usr/bin/python
# coding=UTF-8
import re;
import os;
# all those glyphs will show as weird squares if you don't have the correct patched font
file_node_extensions = {
'.styl' : '',
'.scss' : '',
'.htm' : '',
@alexanderjeurissen
alexanderjeurissen / browse
Last active January 28, 2017 13:36
Fuzzy select a Arcanist differential to either browse or land
browse() {
case $1 in
acc)
diffs=`arc list | grep 'Accepted' | egrep -o 'D\d+: .*'`
;;
rev)
diffs=`arc list | grep 'Needs Review' | egrep -o 'D\d+: .*'`
;;