Skip to content

Instantly share code, notes, and snippets.

{"ignition":{"version":"3.3.0"},"passwd":{"users":[{"name":"core","sshAuthorizedKeys":["ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQCwmePxSo7ekekXnx403c+xQ3xwJempZlLLq1UPtEb3FZEvmb9NW9geNbklxR9WjbqHageDl1TOOgWlVrTgP3V1PVvWrAvHAVBCAizKguhivopRm0KDesk/YykBAr1/OCKQW68SlhtGnKTbc41FbvQ5PG1mtgnLD1Q2yXMJl8NSyIOAwftmBdH4RQYkNp3i7roMFT3d4MmEkPE9DGlJq7vs0fjArN1O1CW+z7tDv+1rnFAgkI4lM0bJWGgqJE0tmj4G10o68iR9leCz7jNIAEc6aPYziHrv+HwCLBlnA4Dm3NG9OUSdh7AOKo0BymWrCyhypZgyKSKkWT0v3fI7aEqPP8Ax3pGFJN7xYcfOVH/idXVCfcPiD95EDG1zZDrC33svOozG4MqpIR7V9twu2A5he5CInVq2nQ8iBlUg2UfbYcHdCUWPRXUPZgIYtHSKKcM9GMPh8J3kiMahceSKMpBbdT59V5EbuIn0OlB0/ktOHHP2+KW3mZLwBDJSj1J7Rddi+WlbxkRnrFSCFvtzRi7f1jCxIrpYnATiOie2s8OfE0PzSNZGY3dXKnJvJsDv8Kmgi7KltrMZetNnCPEDanwQ+tl8qdZsU3fwgEstHRvmdmNDWnwN0lDwmdg89WUqpOyZaWG4kQis0gABpnbNBGAR7Wtzfo9xCgfiG7Qe6d2cDw==","[email protected] AAAAGnNrLXNzaC1lZDI1NTE5QG9wZW5zc2guY29tAAAAICPwTrjkIlVw/WTY31Tok61ZUWOyYAud4PxAiHUYP+PtAAAABHNzaDo="]}]}}

Keybase proof

I hereby claim:

  • I am ndhoule on github.
  • I am ndhoule (https://keybase.io/ndhoule) on keybase.
  • I have a public key whose fingerprint is 2A46 563F 6B85 B9F7 51A4 8678 882A 2D6B 15D4 AD43

To claim this, I am signing this object:

@ndhoule
ndhoule / flawless.sh
Created January 30, 2015 20:25
Are you flawless? Take the quiz to find out!
#!/usr/bin/env bash
#
# Copyright 2015, Nathan Houle. Licensed under the MIT license.
#
# Bash clone of [email protected]:gilhooley/flawless.git.
#
#
# Terminal color shortcuts.
var config = nodemonConf('cluster-web.js');
var newArgs = ['--debug'];
config.options.nodeArgs = Array.isArray(config.options.nodeArgs) ? config.options.nodeArgs.concat(newArgs) : newArgs;
grunt.initConfig({
nodemon: {
web: config,
objodb: nodemonConf('lib/objodb/objodbServer.js'),
topology: nodemonConf('lib/topology.js'),
scheduler: nodemonConf('lib/scheduler.js'),
@ndhoule
ndhoule / getter-setter-example.js
Last active August 29, 2015 14:06
getter-setter-example.js
/**
* Example 1
*/
var Proto = Object.create(HTMLElement.prototype);
Proto.attachedCallback = function(){
// Using a generalized function is clearer and has many maintainability advantages IMHO
if(this.readAttributeAsJson('config-ready')){
// do something
@ndhoule
ndhoule / inject-jquery.js
Created May 20, 2014 01:23
jQuery bookmarklet
javascript:(function(global) {if (!global.jQuery) {var elem = document.createElement('script'); elem.src = '//ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js'; document.getElementsByTagName('head')[0].appendChild(elem);}})(this); console.log('jQuery injected into page as `$` and `jQuery`.');
// config/policies.js
module.exports = {
'*': false,
user: {
create: true,
find: true,
update: true,
destroy: true
},
/**
* Assignment.js
*/
module.exports = {
attributes: {
users: {
collection: 'user',
via: 'assignments',
dominant: true
}
@ndhoule
ndhoule / api\hooks\queue\index.js
Last active September 6, 2018 16:36
Trying to mount an Express app in Sails.js
'use strict';
var kue = require('kue');
var util = require('sails-util');
var ConfigurationError = function(message) {
this.name = 'ConfigurationError';
this.message = message || '';
};
ConfigurationError.prototype = Error.prototype;
var floatingButtonDirective = function() {
return {
restrict: 'AE',
scope: {
text: '@'
},
template: '<div class="floating-button">Text: {{ text }}</div>'
};
};