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
/* eslint-disable */ | |
(function directusConfig() { | |
/* | |
Configuration will skin a Directus App instance based on the "contains" value | |
*/ | |
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
// dark mode options... | |
$invert: true | |
// differences between dark grays are more visible when inverted into light grays... | |
$pushInvertedBrightness: 0.01 | |
// color functions... |
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
# Android Studio with OF 0.11.0 | |
For this guide I am installing Android Studio, Android SDKs and NDKs, and using the Project Generator to generate projects that compile with Android’s build system, gradle. | |
## Install Android Studio | |
Install the latest Android Studio from the [download page](https://developer.android.com/studio) (at the time of writing I am using v4.0) | |
On the splash screen click Next to all standard installation steps |
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
# because I always forget this | |
sudo dd if=/dev/sdX of=/dev/sdX status=progress bs=64K |
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
# https://github.com/slacka/WoeUSB | |
sudo woeusb --tgt-fs NTFS -d ./Win10_XXXXXX_EnglishInternational_x64.iso /dev/sdN | |
# using windows: woe is me |
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
// request is deprecated and stackoverflow is crusty | |
const download = async (url, dest) => { | |
return await new Promise((resolve, reject)=> { | |
const file = fs.createWriteStream(dest) | |
const request = https.get(url, (res) => { | |
if (res.statusCode !== 200) return resolve( res ) | |
const size = res.headers[ 'content-length' ] | |
let pro = 0 |
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
const wait = async ms => ( new Promise(resolve => setTimeout(resolve, ms) ) ) | |
module.exports = wait |
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
// so many bullshit javascript tutorials... | |
const unix = 1615834045 // unix timstamp | |
const date = new Date( unix * 1000) // multiply | |
const iso = d.toISOString() // iso timestamp | |
// -> "2021-03-15T18:47:25.000Z" | |
const slug = iso.substr(0, 19).replace(/[^\w\-]+/g, '-').replace('T','-') // slug from ISO |
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
export default text => text.toString().toLowerCase() | |
.replaceAll(' ', '-') // Replace spaces with - | |
.replace(/[^\w\-]+/g, '') // Remove all non-word chars | |
.replace(/\-\-+/g, '-') // Replace multiple - with single - |
OlderNewer