Skip to content

Instantly share code, notes, and snippets.

View chiefy's full-sized avatar
💥

Christopher "Chief" Najewicz chiefy

💥
View GitHub Profile
@odiak
odiak / classy-extends.coffee
Last active August 29, 2015 14:03
Extending controller on Angular Classy
angular.module('classyExtends', ['classy-core']).classy.plugin.controller
name: 'classyExtends'
classObjs: {}
waitingClassConstructors: {}
options:
enabled: true
convertInject: (classObj) ->
@iammerrick
iammerrick / Question.md
Created August 14, 2015 17:21
Help me understand contexts!

Halp!!!

Something about calling createElement within the function not ahead of time makes the context of Provider work. Why?

@Wizek
Wizek / mixin_pattern.js
Created November 14, 2012 20:08
Controller-mixin pattern
/*\
* Controller-mixin pattern
\*/
// At it's simplest:
myModule
.controller('aCtrl', function($scope, aCtrlMixin1, aCtrlMixin2, condition) {
if (condition) {
aCtrlMixin1($scope)
} else {
@airportyh
airportyh / jsconf_slides_codes_and_notes.md
Last active June 19, 2017 20:51
JSConf 2014 Slides, Codes and Notes.

JSConf Slides, Codes and Notes

These are all the JSConf 2014 slides, codes, and notes I was able to cull together from twitter. Thanks to the speakers who posted them and thanks to @chantastic for posting his wonderful notes.

Modular frontend with NPM - Jake Verbaten (@Raynos)

@frodopwns
frodopwns / dps.py
Created September 22, 2015 21:30
pretty print docker ps commands
import re
import json
import sys
import os
from subprocess import Popen, PIPE
if __name__ == '__main__':
base_path = os.path.abspath(os.path.dirname(__file__))
args = sys.argv
@mkoby
mkoby / Keymap.xml
Last active June 9, 2019 13:40
XBMC Keymap File for Logitech Harmony Remote
<!-- PLACE IN .xbmc/userdata/keymaps/Keymap.xml -->
<!-- This file contains the mapping of keys (gamepad, remote, and keyboard) to actions within XBMC -->
<!-- The <global> section is a fall through - they will only be used if the button is not -->
<!-- used in the current window's section. Note that there is only handling -->
<!-- for a single action per button at this stage. -->
<!-- For joystick/gamepad configuration under linux/win32, see below as it differs from xbox -->
<!-- gamepads. -->
<!-- The format is: -->
<!-- <device> -->
@theangryangel
theangryangel / AuthController.js
Created February 28, 2013 21:54
sails (v0.8.82) + passport + passport-local Rough Example. For the love of all that is holy, don't use this in production.
// api/controllers/AuthController.js
var passport = require('passport');
var AuthController = {
login: function (req,res)
{
res.view();
},
@atsuya
atsuya / kitty.conf
Created December 30, 2017 02:04
Kitty - Solarized Dark
# vim:fileencoding=utf-8:ft=conf
# Font family. You can also specify different fonts for the
# bold/italic/bold-italic variants. By default they are derived automatically,
# by the OSes font system. Setting them manually is useful for font families
# that have many weight variants like Book, Medium, Thick, etc. For example:
# font_family Operator Mono Book
# bold_font Operator Mono Medium
# italic_font Operator Mono Book Italic
# bold_italic_font Operator Mono Medium Italic
@heat
heat / jasmine.matcher.toBeInstanceOf.js
Created September 4, 2012 19:45
Jasmine Matcher instanceof
beforeEach(function() {
this.addMatchers({
toBeInstanceOf: function(expectedInstance) {
var actual = this.actual;
var notText = this.isNot ? " not" : "";
this.message = function() {
return "Expected " + actual.constructor.name + notText + " is instance of " + expectedInstance.name;
};
return actual instanceof expectedInstance;
}
@alghanmi
alghanmi / 20-mimetype.conf
Created July 4, 2012 06:36
Lighttpd MimeType Configuration File
## MimeType handling
## -------------------
##
## Use the "Content-Type" extended attribute to obtain mime type if
## possible
##
## Source: http://redmine.lighttpd.net/wiki/1/Mimetype.assignDetails
##
mimetype.use-xattr = "disable"