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
/** | |
* Type helpers from before Kea came with type generation. | |
* My first foray into Typescript generics, so I'm keeping it around for funsies | |
*/ | |
export interface IKeaLogic<IKeaValues, IKeaActions> { | |
mount(): Function; | |
values: IKeaValues; | |
actions: IKeaActions; | |
} |
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
# Apache servers throw content mismatch errors with XMLHttpRequests (used by barba.js) | |
# because links without a trailing slash didn't know to look for a subdir/index.html. | |
# See: | |
# https://discuss.emberjs.com/t/mixed-content-the-page-was-loaded-over-https-but-requested-an-insecure-xmlhttprequest-endpoint/13876/10 | |
# https://stackoverflow.com/questions/43696438/strange-mixed-content-issue | |
# https://serverfault.com/a/817023 | |
# https://webmasters.stackexchange.com/questions/105111 | |
# Disable the default directory slash behavior and handle that ourselves below |
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 repos = [ | |
"constancecchen/object-fit-polyfill", | |
"octocat/Hello-World", | |
]; | |
var users = [ | |
"constancecchen", | |
"octocat", | |
]; |
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/sh | |
# Automatically create WordPress database backups every week | |
# Delete old backups | |
cd /home/protected | |
echo "Deleting backups older than 30 days..." | |
find ./ -mtime +30 -type f -name '*.sql.gz' -print -delete | |
# Create the backup | |
now=$(date +"%Y_%m_%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
// Parent container | |
.container { | |
position: relative; | |
width: 100vh; | |
height: 100vh; | |
overflow: hidden; | |
} | |
// Can be an img, video, or picture element | |
.media { |
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
/*---------------------------------------------- | |
Generic & reusable logic for sticky/fixed pins | |
Requires scrollmagic.io | |
-----------------------------------------------*/ | |
// Dependencies | |
if (ScrollMagic === undefined) { return; } | |
document.addEventListener("DOMContentLoaded", function() { | |
var controller = new ScrollMagic.Controller(); |