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
#!/bin/bash | |
FAMILY=your-task-def-family-name | |
# Update ranges to deregister certain revisions. | |
for VER in {1..100}; do | |
# Sleep after 40 calls to reduce AWS ThrottlingException. | |
if (( $VER % 41 == 0 )); then | |
sleep 10 | |
fi |
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
require('@babel/register')({ | |
presets: [ | |
['@babel/preset-env', { targets: { node: 'current' } }] | |
] | |
}); | |
const path = require('path'); | |
const DB_PATH = 'dist/db'; // use dist instead of src directory | |
module.exports = { |
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
function formatSize(size) { | |
const base = 1000; // 1000 or 1024 | |
const kb = base ** 1; | |
const mb = base ** 2; | |
const gb = base ** 3; | |
let num; | |
num = (size / 1).toFixed(0); | |
if (num < base) return Number(num) + ' B'; |
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
render() { | |
const { | |
isAuthenticated, | |
location: { pathname }, | |
route: { routes }, | |
} = this.props; | |
const branch = matchRoutes(routes, pathname); | |
const Layout = branch[0].route.emptyLayout ? EmptyLayout : DefaultLayout; |