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
/** @prettier */ | |
"use strict"; | |
// Usage: node composing-moron.mjs | |
const notes = [ | |
"A ", | |
"B♭", | |
"B ", | |
"C ", | |
"D♭", |
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
# This is a very crud example of using the Repository Pattern with SQLAlchemy. It allows me to completely ignore interactions with | |
# the database. This is only pulled in whenever I require to persist or retrieve an object from the database. The domain/business | |
# logic is entirely separated from persistence and I can have true unit tests for those. | |
# The tests for persistence are then limited to very specific cases of persistence and retrieving instances, and I can do those | |
# independent of the business logic. They also tend to be less tests since I only need to test them once. | |
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
<html> | |
<head> | |
<title>jQuery: Click an image to show it big on a viewport-sized modal overlay | |
</title> | |
</head> | |
<body> | |
<p> | |
<img class="zoomable" style='width:40%;' src="http://www.tumblr.com/photo/1280/artedaalma/19707693049/1/tumblr_m19h2mwFRQ1rsn8cy" /> | |
</p> | |
<p> |
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
'use strict'; // http://ejohn.org/blog/ecmascript-5-strict-mode-json-and-more/ | |
$(function() { | |
// Make the user aware of keyboard shortcuts | |
$("button[accesskey], a[accesskey]").each(function (i, tag) { | |
if (tag.accessKey) | |
tag.title += ' [' + | |
(tag.accessKeyLabel || tag.accessKey).replace('Shift', '⇧') + ']'; | |
}); |