Skip to content

Instantly share code, notes, and snippets.

View printer.cfg
# This is a Klipper configuration for TronXY X5SA, with
# CXY-V6 motherboard.
# === FLASHING WITH STOCK BOOTLOADER ===
# You should make firmware for STM32F103 with bootloader offset
# at 0x8008800 (Chitu v6 Bootloader). Uncheck USB, and leave default
# serial settings.
#
# Use "./scripts/update_chitu.py ./out/klipper.bin ./out/update.cbd" after make to generate update.cbd.
@Nalorokk
Nalorokk / printer.cfg
Created Jan 6, 2021
Tronxy X5SA V6 config
View printer.cfg
# This is a Klipper configuration for TronXY X5SA, with
# CXY-V6 motherboard.
# === FLASHING WITH STOCK BOOTLOADER ===
# You should make firmware for STM32F103 with bootloader offset
# at 0x8008800 (Chitu v6 Bootloader). Uncheck USB, and leave default
# serial settings.
#
# Use "./scripts/update_chitu.py ./out/klipper.bin ./out/update.cbd" after make to generate update.cbd.
View neofetchlog
+ verbose=on
+ shift
+ [[ -n '' ]]
+ [[ on != on ]]
+ get_simple -vv
+ [[ -n -vv ]]
++ type -t get_-vv
+ [[ '' == \f\u\n\c\t\i\o\n ]]
+ shift
+ [[ -n '' ]]
@Nalorokk
Nalorokk / keenetic.php
Created Apr 19, 2020
Keenetic metrics to InfluxDB
View keenetic.php
#!/bin/php
<?php
ini_set('default_socket_timeout', 15);
ini_set('display_errors', 1);
error_reporting(E_ALL);
define('LOGIN', 'admin');
define('PASSWORD', 'password');
define('INFLUXDB', 'homedb');
@Nalorokk
Nalorokk / keenetic.php
Created Apr 18, 2020
Keenetic RCI API PHP
View keenetic.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];
@Nalorokk
Nalorokk / config.js
Last active Dec 1, 2020
Homebridge config for Gyver Lamp firmware by gunner47
View config.js
{
"accessories": [
{
"accessory": "mqttthing",
"type": "lightbulb",
"name": "Led Lamp",
"url": "mqtt://127.0.0.1",
"topics":
@Nalorokk
Nalorokk / bitbucket
Created Nov 13, 2018
Unlock bitbucket
View bitbucket
#!/usr/bin/php
<?php
$list = json_decode(file_get_contents('https://ip-ranges.atlassian.com/'), true);
foreach ($list['items'] as $item) {
$cidr = $item['cidr'];
if (strpos($cidr, ':') === false) {
echo "Adding $cidr\n";