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
// Finding the difference between to arrays of objects | |
// As told through the magic of... | |
// _____ _ _____ _ _ | |
// / ____| (_) / ____(_) | | | |
// | (___ _ __ _ ___ ___ | | __ _ _ __| |___ | |
// \___ \| '_ \| |/ __/ _ \ | | |_ | | '__| / __| | |
// ____) | |_) | | (_| __/ | |__| | | | | \__ \ | |
// |_____/| .__/|_|\___\___| \_____|_|_| |_|___/ | |
// | | | |
// |_| |
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
# Start the docker daemon without having to click that obnoxious icon. | |
alias docker-start="/Applications/Docker/Docker\ Quickstart\ Terminal.app/Contents/Resources/Scripts/start.sh" |
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
var Employee = function() { | |
var loadUserinfo = function(userid) { | |
return $.ajax({ | |
type: 'GET', | |
data:{userid: userid}, | |
url: '/employees.json', | |
dataType: 'json', | |
async: true, | |
success: function(data) { |
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
{ | |
"extensions": | |
[ | |
"md" | |
], | |
// "line_numbers": false, | |
// "gutter": false, | |
"draw_centered": true, | |
"wrap_width": 80, |
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
// load all files in models dir | |
fs.readdirSync( './models/' ).forEach( function( filename ) { | |
if ( ~filename.indexOf('.js')) { | |
require( '../models/' + filename); | |
} | |
console.log(filename); | |
}); |
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
#!/bin/bash | |
echo -en "\n + " | |
for i in {0..35}; do | |
printf "%2b " $i | |
done | |
printf "\n\n %3b " 0 |
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
#!/bin/bash | |
#Background | |
for clbg in {40..47} {100..107} 49 ; do | |
#Foreground | |
for clfg in {30..37} {90..97} 39 ; do | |
#Formatting | |
for attr in 0 1 2 4 5 7 ; do | |
#Print the result |
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
ko.bindingHandlers.noBubble = { | |
init: function(element, valueAccessor) { | |
var eventName = ko.utils.unwrapObservable(valueAccessor()); | |
ko.utils.registerEventHandler(element, eventName, function(event) { | |
event.cancelBubble = true; | |
if (event.stopPropagation) { | |
event.stopPropagation(); | |
} | |
}); | |
} |
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
<div class="input-row"> | |
<a href="#" class="button tool">Go to today</a> | |
</div> | |
<div class="input-row white"> | |
<div class="slider" data-bind="jqueryuiSlider: {}"></div> | |
</div> | |
<div class="input-row"> | |
<div class="datepicker-input"> |
NewerOlder