Skip to content

Instantly share code, notes, and snippets.

@jklap
jklap / gist:1e80ea3a5bb7ccc5021d276f1201450f
Last active January 22, 2024 22:24
Wave2 Battery & esphome
# https://esphome.io/guides/automations.html#interval-component
interval:
# trigger the update to fetch battery
- interval: ${temp_update_interval}
then:
- ble_client.ble_write:
id: "airthings_${wave_serial}"
service_uuid: "B42E4A8E-ADE7-11E4-89D3-123B93F75CBA"
characteristic_uuid: "B42E50D8-ADE7-11E4-89D3-123B93F75CBA" # 0x10
value: [ 0x6d ]
@alphapapa
alphapapa / fitness.org
Last active June 19, 2024 21:47
An Emacs food/weight/workout tracker self-contained in a single Org file

Plots

/home/me/org/double-plot.png

Tasks

@lxe
lxe / goes16-rtlsdr.md
Last active June 6, 2024 04:19
Receive GOES-16 and GOES-17 Images with a Raspberry Pi and RTL-SDR dongle
@prathik
prathik / todo.el
Last active September 27, 2020 05:27
Manage daily todo files on Emacs
(defun todo-create-directory (directory)
"Creates the todo directory."
(if (file-exists-p directory) (message "Directory exists")
(make-directory directory)
(message "Directory created")
))
(defun create-todo-file (directory filename)
"Checks if the todo file exists if not creates it."
(todo-create-directory directory)
@heppu
heppu / ARCH_INSTALL.MD
Last active February 27, 2022 17:01
Installing Arch with GPT, dm-crypt, LUKS, LVM and systemd-boot

Create bootable USB

dd bs=4M if=/path/to/archlinux.iso of=/dev/sdx status=progress oflag=sync

Boot from USB and set prepare system

loadkeys <your-keymap>
@basarat
basarat / form.tsx
Created October 6, 2016 05:20
React forms that don't reload page
import * as React from 'react';
interface FormProps {
/**
* Automatically prevents the default browser behavior so you don't have to
*/
onSubmit: () => any;
children?: JSX.Element;
}
export const Form = ({ onSubmit, children}: FormProps) =>
@jaksi
jaksi / mirrorlist.hook
Last active April 28, 2018 12:06
Update pacman mirrorlist using reflector after each upgrade of pacman-mirrorlist
[Trigger]
Type = Package
Operation = Install
Operation = Upgrade
Target = pacman-mirrorlist
[Action]
Description = Updating mirrorlist...
When = PostTransaction
Depends = reflector
@celly
celly / gist:c4ea2ebc2957059c138e
Created January 11, 2016 22:19
Printrbot Simple Metal start gcode
Found in this post: https://www.reddit.com/r/PrintrBot/comments/3jm8bc/start_gcode_does_not_extrudeandmove_but_the_code/
Use this to reset, center, and auto-extrudea small bit before printing.
G90 ; Explicitly force absolute positioning in case it was not reset previously.
G28 ; Home all axes.
G29 ; Auto-level the bed.
G0 X0 Y0 Z0.15 F9000 ; Move to the front-left part of the bed.
M109 S{print_temperature} ; Set and wait for extruder temperature.
G92 E0 ; Zero the extruder.
anonymous
anonymous / ABOUT
Created September 11, 2014 02:38
Ultimate-GPG-Settings
The Goals of this Gist are to:
[1] Increase the GnuPG key size limit beyond 4096 bits.
[2] Provide configuration files that maximize security and anonymity.
For now, the ideal configuration files have been provided.
The Debian_Linux_GnuPG_Compiler.bash script works to build GnuPG with the 4096 bit key size limit raised.
Please provide input. Feedback and changes welcome.
@jeffsharpe
jeffsharpe / arch-post-install.sh
Last active February 8, 2023 21:19
Post Installation Arch Linux Notes - 20150919
#
# post installation
#
# login as ‘root’ and with the password set above
# connect if using wifi - eth should just work
nmcli dev wifi list
nmcli dev wifi connect “Hearth 5GHz" password [somepasswordhere]
# if it fails, try it again - it often fails for me on the 1st attempt (not sure why)
ping -c 3 www.google.ca