Skip to content

Instantly share code, notes, and snippets.

View mikhailbot's full-sized avatar
🐺

Mikhail mikhailbot

🐺
View GitHub Profile
@mikhailbot
mikhailbot / falsehoods.md
Created July 11, 2024 17:51 — forked from almereyda/falsehoods.md
Falsehoods programmers believe about addresses

Falsehoods programmers believe about addresses

This is an anchor-linked version of the excellent, amazing original opus magnum by Michael Tandy.

An address will start with, or at least include, a building number.

Counterexample: Royal Opera House, Covent Garden, London, WC2E 9DD, United Kingdom.

When there is a building number, it will be all-numeric.

Counterexample: 1A Egmont Road, Middlesbrough, TS4 2HT

@mikhailbot
mikhailbot / ip-change-notification.sh
Created May 3, 2022 23:49
Simple quick script to run to alert me if the IP address of a DNS record has changed
#!/bin/bash
# This script requires 3 environment variables defined:
# IP_CHANGE_DOMAIN the domain to check for an IP address change
# PUSHOVER_TOKEN the application token for PushOver
# PUSHOVER_USER the user key to send notification to
echo $(date) "Checking IP of $IP_CHANGE_DOMAIN from DNS..."
DOMAIN_IP=$(dig +short ${IP_CHANGE_DOMAIN})
echo $(date) $DOMAIN_IP
[gcode_macro PRINT_START]
# Use PRINT_START for the slicer starting script - please customize for your slicer of choice
gcode:
{% set BED = params.BED|default(100)|float %}
{% set EXTRUDER = params.EXTRUDER|default(240)|float %}
{% set CHAMBER = params.CHAMBER|default(15)|float %}
{% set SOAK = params.SOAK|default(15)|float %}
# Set bed temperature and partial nozzle temperature, turn on part cooling for heating chamber
{% if EXTRUDER >= 230 %}
@mikhailbot
mikhailbot / fan_control.sh
Last active September 21, 2021 01:38
R720 Fan Control
#!/bin/bash
# IPMI SETTINGS:
# Modify to suit your needs.
IPMIHOST=10.0.0.1
IPMIUSER=root
IPMIPW=calvin
IPMIEK=0000000000000000000000000000000000000000
# TEMPERATURE
@mikhailbot
mikhailbot / settings.json
Created May 27, 2020 17:43
GitHub Dark for Windows Terminal
"schemes": [
{
"name" : "GitHub Dark",
"background" : "#24292e",
"black" : "#24292e",
"blue" : "#044289",
"cyan" : "#79b8ff",
"foreground" : "#fafbfc",
"green" : "#28a745",
"purple" : "#6f42c1",
@mikhailbot
mikhailbot / Contract Killer 3.md
Created April 24, 2018 12:45
The latest version of my ‘killer contract’ for web designers and developers

Contract Killer

The popular open-source contract for web professionals by Stuff & Nonsense

  • Originally published: 23rd December 2008
  • Revised date: March 15th 2016
  • Original post

@mikhailbot
mikhailbot / folder_sizes.sh
Last active December 28, 2017 16:39
List folder sizes within a directory
# For MacOS and Linux
find . -maxdepth 1 -mindepth 1 -type d -exec du -hs {} \;
# For Linux
du -h --max-depth=1
def init(initial_state) do
state = %{
ip_address: initial_state.host_ip_address,
current_status: initial_state.host_status,
previous_stuatus: initial_state.host_status,
latency: 0,
status_changes: 0
}
schedule_work()
@mikhailbot
mikhailbot / package.json
Last active April 1, 2017 18:57
Hapi Registration Error
{
"scripts": {
"start": "nodemon server.js",
"test": "echo \"Error: no test specified\" && exit 1"
},
"dependencies": {
"h2o2": "^5.4.0",
"hapi": "^16.1.1",
"joi": "^10.3.4",
"wreck": "^12.0.0"
@mikhailbot
mikhailbot / index.html
Created March 30, 2017 12:22
Rez Nav Collapsible
<input class="nav-toggle" id="nav-toggle" type="checkbox">
<label for="nav-toggle"></label>
<nav class="nav">
<ul class="nav-items">
<li class="nav-item-primary">
<span>Live the RezLife</span>
</li>
<ul class="sub-nav-items first">
<li class="sub-nav-item">Live here in First-Year</li>