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
-- | |
-- termcolor - Set all open Terminal tabs to a random color based on Dark mode | |
-- Stay open and check for a change in Dark mode every couple of seconds. | |
-- When Dark Mode changes update the background color of all Terminal tabs. | |
-- | |
-- To make the exported application into a hidden background app: | |
-- defaults write /Path/to/termcolor.app/Contents/Info LSUIElement 1 | |
-- | |
-- Thinkyhead - 2 Dec 2023 - CC-NC-BY | |
-- |
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
#!/usr/bin/env zsh | |
# | |
# StableDiffusion.command | |
# | |
# - Start Stable Diffusion - InvokeAI in the default Terminal. | |
# - When ready, open InvokeAI in the default Browser. | |
# | |
# author: @thinkyhead | |
# created: 2022-11-10 | |
# revised: 2022-11-18 - allow for multiple project folders |
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
/** | |
* Set Timer 5 PWM frequency in Hz, from 3.8Hz up to ~16MHz | |
* with a minimum resolution of 100 steps. | |
* | |
* DC values -1.0 to 1.0. Negative duty cycle inverts the pulse. | |
*/ | |
uint16_t set_pwm_frequency_hz(const float &hz, const float dca, const float dcb, const float dcc) { | |
float count = 0; | |
if (hz > 0 && (dca || dcb || dcc)) { | |
count = float(F_CPU) / hz; // 1x prescaler, TOP for 16MHz base freq. |
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
/**************************************\ | |
* * | |
* OpenSCAD Mesh Display * | |
* by Thinkyhead - April 2017 * | |
* * | |
* Copy the grid output from Marlin, * | |
* paste below as shown, and use * | |
* OpenSCAD to see a visualization * | |
* of your mesh. * | |
* * |
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
%YAML 1.2 | |
--- | |
# | |
# 6502 Assembly | |
# | |
# 6502 is fairly straightforward, but there are many | |
# variants, not all of which are easy to take together. | |
# | |
# - Code lines have only a few fields, separated by whitespace: | |
# - Hexdump (e.g., "1234 5C 7F ") |
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
.AtariBASIC | |
. | |
. Export a file on D: to the host OS by sending it to P: | |
. Works with Atari800MacX and other Atari 8-bit Computer emulators | |
. | |
10 DIM F$(14),N$(12),C$(1),E$(1) | |
20 C$=CHR$(125):E$=CHR$(155) | |
30 ? C$;"< ATARI FILE EXPORT >" | |
40 ? "USES P: TO SEND FILES" | |
50 ? "TO THE HOST SYSTEM." |
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
.AtariBASIC | |
. | |
. OUTER SPACE ATTACK V.1 12/81 | |
. By SHELDON LEEMON | |
. Oak Park, MI 48237 | |
. | |
10 I=0:J=0:COUNT=0:ATTACK=0:GOSUB 280:GOTO 140 | |
20 . OUTER SPACE ATTACK V.1 12/81 | |
21 . By SHELDON LEEMON | |
22 . Oak Park, MI 48237 |
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
. | |
. AtariBASIC RENUM.BAS | |
. Renumbers lines only, not GOSUB/GOTO. | |
. | |
. Corrected version of | |
. http://www.atarimagazines.com/compute/issue10/042_1_ATARI_BASIC_A_LINE_RENUMBERING_UTILITY.php | |
. | |
. To save: L."D:RENUM.LST" | |
. To run: E."D:RENUM.LST":G.9000 | |
. |
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
/** | |
* Ambidextrous SCARA Kinematics with optimized mathematics | |
*/ | |
// Lengths of the arm segments | |
// If the lengths are the same the maths can be optimized | |
arm1_length = 5; | |
arm2_length = 3; | |
arm_sum = arm1_length + arm2_length; |
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
#!/usr/bin/env bash | |
echo "Pruning Merged Branches..." | |
git branch --merged | egrep -v "^\*|master|development" | xargs -n 1 git branch -d | |
echo | |
echo "Pruning Gone Branches..." | |
git branch -vv | grep ': gone]' | gawk '{print $1}' | xargs -n 1 git branch -D | |
echo |
NewerOlder