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
[user] | |
email = [email protected] | |
# override if a remote matches org name | |
[includeIf "hasconfig:remote.*.url:[email protected]:ORG-NAME/**"] | |
path = ~/.gitconfig.work |
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
# turn off wifi | |
sudo /System/Library/PrivateFrameworks/Apple80211.framework/Versions/Current/Resources/airport -z | |
# set mac address to random value | |
NEW_MAC=`openssl rand -hex 6 | sed 's/\(..\)/\1:/g; s/.$//'` | |
sudo ifconfig en0 lladdr $NEW_MAC |
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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8" /> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> | |
</head> | |
<body> | |
<nav> | |
<ol> |
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
import { opendir, readFile } from 'fs/promises'; | |
import { join } from 'path' | |
import * as parser from "@babel/parser"; | |
import _traverse from "@babel/traverse"; | |
const traverse = _traverse.default; | |
for await (const file of allFiles('javascript')) { | |
if (file.endsWith('.js')) { | |
const buffer = await readFile(file) |
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
# Extract frames from GEOS Image Viewer to generate a video | |
# https://www.star.nesdis.noaa.gov/goes/fulldisk_band.php?sat=G16&band=GEOCOLOR&length=12&dim=1 | |
mkdir -p images output | |
BASE=https://cdn.star.nesdis.noaa.gov/GOES16/ABI/FD/GEOCOLOR/ | |
DIM=1808x1808 | |
curl $BASE \ | |
| grep -o -e "\".*GEOCOLOR-$DIM.jpg\"" \ |
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 set = favicon() | |
set('🐝') | |
// | |
function favicon() { | |
const link = document.createElement('link') | |
link.rel = 'icon' | |
document.head.appendChild(link) |
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://unicode.org/Public/emoji/13.0/emoji-sequences.txt | |
export function* emojiList(sequences) { | |
const LINES = /^[0-9A-F\.\ ]*;/mg; | |
const TRAILER = /\W+;$/; | |
const RANGE = /(.*)\.\.(.*)/; | |
for (const line of sequences.match(LINES)) { |
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
<html> | |
<head> | |
<title> | |
pico serial | |
</title> | |
<style> | |
body { | |
font-family: sans-serif; | |
display: flex; |
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
## Hacky pomodoro script for pi pico | |
from math import floor | |
import picounicorn | |
from machine import Pin, Timer | |
picounicorn.init() | |
w = picounicorn.get_width() |
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
await gifsize('https://media.giphy.com/media/3ornjZLITGcFQVRbxK/source.gif') | |
// > {width: 500, height: 247} | |
async function gifsize (url) { | |
const result = await fetch(url, {headers: {Range: 'bytes=6-9'}}) | |
const [width, height] = new Uint16Array(await result.arrayBuffer()) | |
return {width, height} |
NewerOlder