- Running macOS
- things.sh installed.
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
<div class="layout layout--row flex flex--center"> | |
<div class="item"> | |
<div class="meta"></div> | |
<div class="content"> | |
<span class="value value--xsmall">{{ IDX_0.commonName }}</span> | |
<span class="label flex flex--row"> | |
{% for attrs in IDX_0.additionalProperties %} | |
{%- if attrs.key == "NbEmptyDocks"-%} | |
<span class="label">⬜ {{attrs.value | number_with_delimiter}}</span> | |
{%- endif -%} |
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
// Lowercase letters start at 97 => 1 | |
// Max is 122 for z => 26 | |
pub fn ascii_sum(string: &'static str) -> u32 { | |
string.bytes().map(|char| { | |
(char - 96) as u32 | |
}).sum::<u32>() | |
} | |
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
import { | |
extract, | |
test as containsFrontmatter, | |
} from "https://deno.land/[email protected]/encoding/front_matter/any.ts"; | |
import { walk } from "https://deno.land/[email protected]/fs/mod.ts"; | |
import { stringify } from "npm:[email protected]" | |
async function writeFile(path: string, attrs: { [key: string]: any }, body: string) { | |
await Deno.writeTextFile(path, `---\n${stringify(attrs)}\n---\n\n${body}`) | |
} |
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
tap "alexanderwillner/tap" | |
tap "apparition47/tap" | |
tap "charmbracelet/tap" | |
tap "cuelang/tap" | |
tap "dagger/tap" | |
tap "dart-lang/dart" | |
tap "dokku/repo" | |
tap "earthly/earthly" | |
tap "elastic/tap" | |
tap "federico-terzi/espanso" |
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
const express = require('express'); | |
const bodyParser = require('body-parser'); | |
const ngrok = require('ngrok'); | |
const axios = require('axios'); | |
const crypto = require('crypto'); | |
const PORT = 3000; | |
const app = express(); | |
const passcode = crypto.randomBytes(48).toString('hex'); |
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
export const walkPointer = (object: { [key: string] }, pointer: string) => { | |
let [, ...tokens] = pointer.split("/") | |
tokens = tokens.map((token) => { | |
return token.replace(/~1/g, "/").replace(/~0/g, "~"); | |
}) | |
let instance = object | |
for (const token of tokens) { | |
instance = instance[token] | |
} | |
return instance |
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
set runtimepath^=~/.vim runtimepath+=~/.vim/after | |
let g:python2_host_prog = '/usr/local/bin/python' | |
let g:python3_host_prog = '/usr/local/bin/python3' | |
let &packpath = &runtimepath | |
" Linter | |
" only lint on save | |
let g:ale_lint_on_text_changed = 'never' | |
let g:ale_lint_on_insert_leave = 1 | |
let g:ale_lint_on_save = 0 |
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
/* | |
Based off of | |
http://www.arduino.cc/en/Tutorial/Tone | |
*/ | |
#include "pitches.h" | |
#include <Adafruit_NeoPixel.h> |
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
type Day28 = '01'|'02'|'03'|'04'|'05'|'06'|'07'|'08'|'09'|10 | |
|11|12|13|14|15|16|17|18|19|20 | |
|21|22|23|24|25|26|27|28; | |
type Month = '01'|'02'|'03'|'04'|'05'|'06'|'07'|'08'|'09'|'10'|'11'|'12' | |
type Digit = 0|1|2|3|4|5|6|7|8|9; | |
type Year = `${19 | 20}${Digit}${Digit}` | |
type IsDivide4<S extends string | number> = `${S}` extends '0' | '4' | '8' ? true : | |
`${S}` extends `${number | ''}${`${0|2|4|6|8}${0|4|8}`|`${1|3|5|7|9}${2|6}`}` ? true : false; | |
type IsLeapYear<S extends string | number> = |
NewerOlder