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
| $fn = 100; | |
| rotate([0, 0, 180]) { | |
| color("brown"){ | |
| translate([-2.5, -2.5, 0]) cube([5, 5, 70]); | |
| translate([0, 2.5, 50]) cube([40, 5, 5], center=true); | |
| } | |
| translate([0, 5, 50]) |
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
| # mobile data be expensive | |
| # https://twitter.com/MishaalRahman/status/1452868924152983552 | |
| adb shell settings put secure sysui_qs_tiles "wifi,cell,custom(com.android.settings/.development.qstile.DevelopmentTiles\$SensorsOff),$(adb shell settings get secure sysui_qs_tiles)" | |
| # no google | |
| adb shell settings put secure assist_touch_gesture_enabled 0 | |
| # gotta go fast | |
| adb shell settings put global animator_duration_scale 0.5 | |
| adb shell settings put global transition_animation_scale 0.5 |
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
| from pathlib import Path | |
| OLD = b"/old/downloads/dir/" | |
| NEW = b"/new/downloads/dir/" | |
| for fname in Path(".").glob("*.resume"): | |
| print(fname) | |
| with fname.open("rb") as f: | |
| data = f.read() |
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/sh | |
| # https://wiki.freebsd.org/Wii | |
| # https://wiki.freebsd.org/BuildingOnNonFreeBSD | |
| # https://github.com/freebsd/freebsd-src/blob/main/.github/workflows/cross-bootstrap-tools.yml | |
| # https://github.com/freebsd/freebsd-ci/tree/master/jobs/FreeBSD-main-powerpc-build | |
| # https://github.com/freebsd/freebsd-ci/blob/master/scripts/build/build-world-kernel-head.sh | |
| # Support for the wii was removed in 29d0137a8d2b31771eee2172f4f73e7d4fe48373 . | |
| # Reverting it causes merge conflicts. |
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
| #!/usr/bin/env bash | |
| MINICONDA_PY38_URL="https://repo.continuum.io/miniconda/Miniconda3-py38_4.8.2-Linux-x86_64.sh" | |
| MINICONDA_PY38_HASH="879457af6a0bf5b34b48c12de31d4df0ee2f06a8e68768e5758c3293b2daf688" | |
| # Assumes repo is put in a "remotes/NAME-HASH" folder | |
| ENVIRON_NAME="py38_$(basename $(pwd))" | |
| REMOTES_DIR="$(dirname $(pwd))" | |
| export POETRY_VIRTUALENVS_IN_PROJECT=true |
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
| # this is untested | |
| from functools import wraps | |
| from itertools import chain | |
| def autoassign(init_method): # decorator | |
| """ | |
| @autoassign | |
| def __init__(self, a: int, b: float): | |
| pass |
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
| { | |
| "settings": { | |
| "depth": 3 | |
| }, | |
| "objects": [ | |
| { | |
| "type": "quad", | |
| "translate": [ 1, 0, 1 ], | |
| "scale": [ 2, 2, 1 ], | |
| "rotate": [ 0, 1, 0, -90 ], |
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
| #!/usr/bin/env bash | |
| if ! test "$(whoami)" = "root"; then | |
| echo "You're not running this as root" | |
| exit 1 | |
| fi | |
| INSTALL="apt-get install -y" | |
| if type -P dnf >/dev/null 2>/dev/null; then INSTALL="dnf -y install"; fi | |
| if type -P pacman >/dev/null 2>/dev/null; then INSTALL="pacman -S"; 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
| # TODO: imports, test, m.d.conf and m.d.sync | |
| #from nmigen import * | |
| #from nmigen.cli import main | |
| # helpers: | |
| DgModule = subclass Module where | |
| If = cond body_func ~> | |
| with @@If cond => body_func! |
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
| #!usr/bin/env bash | |
| if ! command -v micro >/dev/null; then | |
| if test -s ~/.local/bin/micro; then | |
| echo "micro is instaled, but not in PATH, concider loggin out and in" | |
| exit 1 | |
| fi | |
| cd ~ | |
| mkdir -p .local/bin | |
| cd .local/bin |