Skip to content

Instantly share code, notes, and snippets.

Dale Manthei dalemanthei

  • Great White North, eh.
Block or report user

Report or block dalemanthei

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@dalemanthei
dalemanthei / init.lua
Last active Mar 12, 2017
Hamerspoon config examples for hyper key
View init.lua
-- hattip https://github.com/lodestone/hyper-hacks
-- hattip https://gist.github.com/ttscoff/cce98a711b5476166792d5e6f1ac5907
-- hattip https://gist.github.com/prenagha/1c28f71cb4d52b3133a4bff1b3849c3e
-- A global variable for the Hyper Mode
k = hs.hotkey.modal.new({}, "F17")
-- The following keys are configured as hot keys in their respective apps (or in Keyboard Maestro)
-- d → Dash (configure in Dash preferences)
@dalemanthei
dalemanthei / _.md
Created Sep 19, 2016
y axes times 3
View _.md
@dalemanthei
dalemanthei / _.md
Created Sep 19, 2016
reddit base number 2
View _.md
@dalemanthei
dalemanthei / _.md
Created Sep 19, 2016
reddit base number 2
View _.md
View _.md
@dalemanthei
dalemanthei / _.md
Last active Sep 16, 2016
reddit base
View _.md
@dalemanthei
dalemanthei / path.sublime-project
Created Jan 31, 2016
Sublime Text 3 standard path block to add external folder to project and exclude all the gorp
View path.sublime-project
{
"path": "/<path-to-project-folder>",
"folder_include_patterns": [],
"folder_exclude_patterns": ["**/jspm_packages", "**/node_modules", "**/target", "**/.settings", "**/.externalToolBuilders"],
"file_exclude_patterns": [".gitignore", ".jazzignore", "pom.xml", ".factorypath", ".project"]
},
@dalemanthei
dalemanthei / compileDirective.js
Created Jan 24, 2016
Jasmine-helper-compileDirective.js
View compileDirective.js
var compileDirective = function (html, scope) {
element = $compile(angular.element(html))(scope);
scope.$digest();
return element;
};
@dalemanthei
dalemanthei / filter-from-injector.js
Last active Jan 24, 2016
A Jasmine beforeEach function to get a filter for testing
View filter-from-injector.js
var myFilter;
beforeEach(function () {
module('myModule');
inject(function ($injector) {
myFilter = $injector.get('$filter')('myFilter');
});
});
@dalemanthei
dalemanthei / jasmine-$window-reload.js
Created Jan 24, 2016
Decorate $window to count page reloads
View jasmine-$window-reload.js
beforeEach(module(function ($provide) {
$provide.decorator('$window', ['$delegate',
function ($delegate) {
$windowMock = {};
$windowMock.prototype = $delegate;
$windowMock.reloadCount = 0;
$windowMock.location = {};
$windowMock.location.reload = function () {
$windowMock.reloadCount = $windowMock.reloadCount + 1;
};
You can’t perform that action at this time.