This file contains hidden or 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
{ | |
"title": "Change caps_lock key (rev 4)", | |
"rules": [{ | |
"description": "Change caps_lock to control if pressed with other keys, to tab if pressed alone.", | |
"manipulators": [{ | |
"type": "basic", | |
"from": { | |
"key_code": "caps_lock", | |
"modifiers": { | |
"optional": ["any"] |
This file contains hidden or 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
let today = new Date(); | |
let next_year = | |
new Date(today.getFullYear() + 1, | |
today.getMonth(), | |
today.getDate()); |
This file contains hidden or 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
let calculateNextYear = (some_date) => | |
new Date(some_date.getFullYear() + 1, | |
some_date.getMonth(), | |
some_date.getDate()); | |
let today = new Date(); | |
let next_year = calculateNextYear(today); |
This file contains hidden or 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
let leap_day = new Date(2020, 1, 29); | |
let next_feb_eom = new Date(2021, 1, 28); | |
assert(calculateNextYear(leap_day) === next_feb_eom); |
This file contains hidden or 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
let leap_day = new Date(2020, 1, 29); | |
let next_feb_eom = new Date(2021, 1, 28); | |
assert( | |
calculateNextYear(leap_day) === next_feb_eom | |
); |
This file contains hidden or 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
s = School.find('5e82753df4e68d00330979d7') | |
s.mailing_address.update(country: 'PA', subdivision: '8', postal_code: '0801') |
OlderNewer