Skip to content

Instantly share code, notes, and snippets.

@jauderho
jauderho / gist:6b7d42030e264a135450ecc0ba521bd8
Last active November 14, 2024 20:42
HOWTO: Upgrade Raspberry Pi OS from Bullseye to Bookworm
### WARNING: READ CAREFULLY BEFORE ATTEMPTING ###
#
# Officially, this is not recommended. YMMV
# https://www.raspberrypi.com/news/bookworm-the-new-version-of-raspberry-pi-os/
#
# This mostly works if you are on 64bit. You are on your own if you are on 32bit or mixed 64/32bit
#
# Credit to anfractuosity and fgimenezm for figuring out additional details for kernels
#
@ancientGlider
ancientGlider / keenetic_auth.py
Last active October 25, 2024 18:50
Authentication for Keenetic routers for work with CLI via REST API (Python)
# -*- coding: utf-8 -*-
"""
Данные с адресом, логином, паролем хранятся в конфигурационном файле следующего вида:
[Router]
ip_addr = 192.168.1.1:8080
login = admin
passw = anyPassword
@Nalorokk
Nalorokk / keenetic.php
Created April 18, 2020 06:35
Keenetic RCI API PHP
#!/bin/php
<?php
ini_set('default_socket_timeout', 15);
ini_set('display_errors', 1);
error_reporting(E_ALL);
if(keen_auth('admin', 'password')) {
$metrics = keen_request('rci/', '{"show":{"interface":{"stat":[{"name":"GigabitEthernet1"},{"name":"Wireguard0"}]}}}');
$data = $metrics[2];
@alphapapa
alphapapa / org-kbd.el
Created December 16, 2018 10:24
Org mode: Add syntax to export HTML KBD elements
;;; org-kbd
;; (setq org-emphasis-alist '(("%" org-kbd verbatim)
;; ("*" bold)
;; ("/" italic)
;; ("_" underline)
;; ("=" org-verbatim verbatim)
;; ("~" org-code verbatim)
;; ("+"
;; (:strike-through t))))
@swiftgeek
swiftgeek / iButtonRW.ino
Last active November 1, 2023 04:18
RW1990 programmer, with arduino
// Based on https://danman.eu/blog/cloning-ibutton-using-rw1990-and-avr/
// and: http://elimelecsarduinoprojects.blogspot.com/2013/06/read-dallas-ibutton-arduino.html
// By Swift Geek 28-08-2015
// TODO: danger to atmega328! Use OpenCollector logic!
// Used 4.8kΩ Pull-up and 3.1 Vcc for arduino/pull-up
#include <OneWire.h>
OneWire ibutton (8); // I button connected on PIN 2.
@idreamsi
idreamsi / pythonscript.py
Last active August 15, 2024 17:18
Python script for Telegram
# -*- coding: utf-8 -*-
#!/usr/bin/python
import subprocess
import os
import picamera
import time
import shlex
from datetime import datetime
from datetime import timedelta
import datetime as dt