I hereby claim:
- I am alamantus on github.
- I am alamantus (https://keybase.io/alamantus) on keybase.
- I have a public key ASDQWESUPRzVLLJsF3ImAQi9nvxKACV1frKNoyMRYT1-3Ao
To claim this, I am signing this object:
function capitalizeWords(str, additionalPrefixes = []) { | |
const prefixMatches = Array.from(new Set([ | |
"D'", 'Ma?c', "N'", "O'", | |
...additionalPrefixes | |
])); | |
const capitalizeFirst = ([first, ...rest]) => first.toUpperCase() + rest.join('').toLowerCase(); | |
return str.split(/\s+/) | |
.map(word => { | |
word = capitalizeFirst(word); | |
const hyphenated = word.split('-').filter(side => side.length > 0); |
ALTER TABLE `dictionaries` | |
ADD COLUMN `custom_css` text NOT NULL COMMENT 'CSS' AFTER `theme`; | |
ALTER TABLE `dictionary_linguistics` | |
ADD COLUMN `alphabetical_order` VARCHAR(255) NOT NULL DEFAULT '' COMMENT 'Space-separated' AFTER `parts_of_speech`, | |
ADD COLUMN `phonology_notes` text NOT NULL COMMENT 'Markdown' AFTER `blends`, | |
CHANGE `exceptions` `phonotactics_notes` text NOT NULL COMMENT 'Markdown', | |
ADD COLUMN `translations` text NOT NULL COMMENT 'Newline-separated; Translates left character(s) to right character(s)' AFTER `phonotactics_notes`; |
function getSaneTimestamp() { | |
// Return a timestamp in the format yyyymmddhhmmss | |
return date('YmdHis', time() - date('Z')); | |
} |
function getSaneTimestamp(includeMS) { | |
// Return a timestamp in the format yyyymmddhhmmss | |
// If includeMS is truthy, returns yyyymmddhhmmssmmm | |
var d = new Date(); | |
var yr = d.getUTCFullYear().toString(); | |
var mt = ('0' + (d.getUTCMonth() + 1).toString()).substr(-2); | |
var dy = ('0' + d.getUTCDate().toString()).substr(-2); | |
var hr = ('0' + d.getUTCHours().toString()).substr(-2); | |
var mn = ('0' + d.getUTCMinutes().toString()).substr(-2); | |
var sc = ('0' + d.getUTCSeconds().toString()).substr(-2); |
I hereby claim:
To claim this, I am signing this object:
/* A fallback for in case you don't have the Determination Mono font installed */ | |
@import url('https://fonts.googleapis.com/css?family=Press+Start+2P'); | |
* { | |
border-radius: 0px !important; | |
box-shadow: none !important; | |
text-shadow: none !important; | |
} | |
.avatar, img { |
Written and Managed by Robbie Antenesse
As I'm working on JavaScript projects, I want to be sure that I have a consistent and readable style. This style guide is based partially on how I normally program anyway, partially on what I like from the ES2015 standard, and partially on what I think will help make any future code I write more readable to someone who might come after me.
This'll probably be changing infrequently as I find things I don't like about what I've decided or remember things that are missing.
function keyCodeFor(keyName) { | |
if (keyName == "backspace") return 8; | |
else if (keyName == "tab") return 9; | |
else if (keyName == "ctrlEnter") return 10; | |
else if (keyName == "enter") return 13; | |
else if (keyName == "shift") return 16; | |
else if (keyName == "ctrl") return 17; | |
else if (keyName == "alt") return 18; | |
else if (keyName == "pausebreak") return 19; | |
else if (keyName == "capslock") return 20; |
function ready(fn) { | |
if (document.readyState != 'loading'){ | |
fn(); | |
} else { | |
document.addEventListener('DOMContentLoaded', fn); | |
} | |
} | |
// Get Keycode based on key name | |
function keyCodeFor(keyName) { |