Skip to content

Instantly share code, notes, and snippets.

@JohnScottUK
JohnScottUK / creality_ender3s1pro.orca.start.gcode
Last active April 13, 2024 17:40
Ender 3 S1 Pro Optimal Start/Stop GCode for OrcaSlicer Software.
; Creality Ender-3 S1 Pro Optimal Start GCode for OrcaSlicer Software.
; By John Scott, 2023. https://gist.github.com/JohnScottUK/de30eb8c22993c4405e6afbd9b5db113
;M117 Set Movement...
G90; Use absolute positioning.
;M117 Heating Bed...
M140 S[bed_temperature_initial_layer_single]; Start heating bed.
;M117 Homing Axis...
@vkz
vkz / hoot.md
Last active May 8, 2024 07:15
Tailscale your AWS and on-prem resources: have your cake and eat it too

Tailscaling git.ht

This [hoot][] you're about to read started its life as a gist of technical minutae I had to discover to Tailscale cloud and on-prem resources. It'd be too boring for me to just publish it, so I thought I'd give a little bit of context as a preamble. I get to rant some and you can simply skip to the technical sections below if you'd rather not indulge me.

Ranty preamble

How much of what AWS gives you do you really truly need? It's become Kubernetes this, Docker that. I rarely question it when contracting because contractors usually arrive after the fact to pick up and carry the pieces. You get to target the infrastructure that may as well have been installed by alients before humankind ascended in Amazon. All in the cloud, can't touch, jumpbox this, terraform that, re-create the world every time you sneeze, etc. It's different when you're hired fo

@JohnScottUK
JohnScottUK / creality_ender3s1pro.prusa.start.gcode
Last active February 29, 2024 10:15
Ender 3 S1 Pro Optimal Start GCode for PruseSlicer/SuperSlicer Software.
; Creality Ender-3 S1 Pro Optimal Start GCode for PrusaSlicer Software.
; By John Scott, 2023. https://gist.github.com/JohnScottUK/b688deeb579d090f96af29c1375513b3
;M117 Set Movement...
G90; Use absolute positioning.
;M117 Heating Bed...
M140 S{first_layer_bed_temperature[0]}; Start heating bed to temperature.
;M117 Homing Axis...
@geerlingguy
geerlingguy / stable-diffusion-ubuntu-2004-amd.sh
Last active March 15, 2024 06:52
Install Stable Diffusion on an AMD GPU PC running Ubuntu 20.04
# Note: This will only work on Navi21 GPUs (6800/6900+).
# See: https://github.com/RadeonOpenCompute/ROCm/issues/1668#issuecomment-1043994570
# Install Conda (latest from https://docs.conda.io/en/latest/miniconda.html#linux-installers)
wget https://repo.anaconda.com/miniconda/Miniconda3-py39_4.12.0-Linux-x86_64.sh
bash Miniconda3-py39_4.12.0-Linux-x86_64.sh
# follow the prompts to install it, and run `conda` to make sure it's working.
# Install git and curl, and clone the stable-diffusion repo
sudo apt install -y git curl
@ruario
ruario / authy-fetch-extract-snap.md
Last active May 7, 2024 17:38
How to download and install Twilio Authy on a desktop Linux system without snap support
  • Make an install directory somewhere convenient and switch to it
mkdir -p ~/.local/share/authy
cd ~/.local/share/authy
  • Fetch the current Authy snap
@vladak
vladak / varmilo keyboard.md
Last active May 4, 2024 16:03
Varmilo keyboard details
@application2000
application2000 / how-to-install-latest-gcc-on-ubuntu-lts.txt
Last active May 7, 2024 10:38
How to install latest gcc on Ubuntu LTS (12.04, 14.04, 16.04)
These commands are based on a askubuntu answer http://askubuntu.com/a/581497
To install gcc-6 (gcc-6.1.1), I had to do more stuff as shown below.
USE THOSE COMMANDS AT YOUR OWN RISK. I SHALL NOT BE RESPONSIBLE FOR ANYTHING.
ABSOLUTELY NO WARRANTY.
If you are still reading let's carry on with the code.
sudo apt-get update && \
sudo apt-get install build-essential software-properties-common -y && \
sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y && \
@joshwilliams
joshwilliams / run_server.pl.py
Created May 19, 2011 16:21
An httpd-like thing in a PL/Python function
CREATE OR REPLACE FUNCTION run_server() RETURNS text
LANGUAGE plpythonu STRICT
AS $$
from BaseHTTPServer import BaseHTTPRequestHandler, HTTPServer
class PGHandler(BaseHTTPRequestHandler):
def do_GET(self):
plpy.notice("Path: %s" % self.path)
if self.path.count('/') == 2 and self.path.split('/')[1] != "" and self.path.split('/')[2] != "":
nsp = plpy.quote_ident(self.path.split('/')[1])
@jlouis
jlouis / item.erl
Created January 21, 2011 23:28
RPG/MMORPG/MUD Item handling ideas
-module(item).
-export([gen_shield/0]).
-export([transmogrify/2, as_item/1]).
-export([weapon_damage/1, look/1]).
-record(item, {
%% Rather arbitrary identity
id :: term(),
%% Proplist of items properties