Skip to content

Instantly share code, notes, and snippets.

@beam
beam / build-kernel-package.sh
Last active April 19, 2022 18:39
debian crosscompile kernel
apt install build-essential crossbuild-essential-armhf debhelper kernel-wedge fakeroot git kernel-wedge quilt ccache flex bison libssl-dev dh-exec rsync libelf-dev bc libncurses-dev
cd /root
mkdir cross-kernel
cd cross-kernel
wget https://deb.debian.org/debian/pool/main/l/linux/linux_4.19.235-1.debian.tar.xz
wget https://deb.debian.org/debian/pool/main/l/linux/linux_4.19.235.orig.tar.xz
mkdir tools
mv linux_4.19.235-1.debian.tar.xz tools/
@beam
beam / zfs-rollback.sh
Last active September 27, 2021 15:31 — forked from mwpher/zfs-rollback.sh
ZFS Recursive Rollback
#!/bin/sh
# Originally by: Dr. Martin Menzel www.dr-menzel-it.de
# Modified by Matthew Pherigo
#
# Use at your own risk. No warranty. No fee.
#
# parameter list:
# (1) the filesystem to be used to start decendant recursion
# example: apool/zones/webzone
# (2) the snapshot to which the filesystems should be rolled back
@beam
beam / samsung_remote.py
Last active March 27, 2021 10:05 — forked from danielfaust/samsung_remote.py
Samsung TV Remote Control Python Script
import time
import socket
import base64
app_name = 'Python Remote' # remote name
app_id = 'SimpleScript'
app_desc = app_name + ' Script'
dst = '192.168.0.125' # ip of tv
# $FreeBSD: head/net-p2p/transmission-cli/Makefile 536412 2020-05-24 16:33:00Z rigoletto $
PORTNAME= transmission
DISTVERSION= 3.00
PORTREVISION?= 2
CATEGORIES+= net-p2p
SLAVEPORT?= cli
PKGNAMESUFFIX?= -cli
MAINTAINER= rigoletto@FreeBSD.org
@beam
beam / patch-CMakeLists.txt
Last active July 28, 2020 14:28
FreeBSD transmission patch
--- CMakeLists.txt.orig 2020-05-16 02:36:16.000000000 +0200
+++ CMakeLists.txt 2020-07-28 16:06:44.888680000 +0200
@@ -366,6 +366,10 @@
tr_fixup_auto_option(WITH_SYSTEMD SYSTEMD_FOUND SYSTEMD_IS_REQUIRED)
endif()
+if (CMAKE_BUILD_TYPE MATCHES Release)
+ add_definitions(-DNDEBUG)
+endif()
+
@beam
beam / CMakeLists.txt
Last active July 28, 2020 14:25
Transmission CMakeLists.txt
cmake_minimum_required(VERSION 2.8.12 FATAL_ERROR)
project(transmission)
list(APPEND CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake)
set(CMAKE_MACOSX_RPATH ON)
include(CheckIncludeFile)
include(CheckIncludeFiles)
include(CheckFunctionExists)
@beam
beam / small-remote.xml
Last active July 23, 2020 14:06
Small remote kodi keymap
<keymap>
<global>
<keyboard>
<home>ActivateWindow(Home)</home>
<home mod="longpress">FullScreen</home>
<escape>Back</escape>
<power>Mute</power>
</keyboard>
</global>
<VideoOSD>
@beam
beam / Configuration_adv.h
Last active September 16, 2019 20:01
Ender 3 Pro Filament Change Lenght
#define ADVANCED_PAUSE_FEATURE
#if ENABLED(ADVANCED_PAUSE_FEATURE)
#define PAUSE_PARK_RETRACT_FEEDRATE 60
#define PAUSE_PARK_RETRACT_LENGTH 2
#define FILAMENT_CHANGE_UNLOAD_FEEDRATE 150 // 10
#define FILAMENT_CHANGE_UNLOAD_ACCEL 25
#if ENABLED(DIRECT_DRIVE_PRINTER)
#define FILAMENT_CHANGE_UNLOAD_LENGTH 20
#else
#define FILAMENT_CHANGE_UNLOAD_LENGTH 430 // 100
@beam
beam / alpine.go
Created March 13, 2019 16:16
Docker Alpine provisioner
package provision
import (
"fmt"
"github.com/docker/machine/libmachine/auth"
"github.com/docker/machine/libmachine/drivers"
"github.com/docker/machine/libmachine/engine"
"github.com/docker/machine/libmachine/log"
"github.com/docker/machine/libmachine/mcnutils"
"github.com/docker/machine/libmachine/provision/pkgaction"
@beam
beam / keybase.md
Created November 5, 2018 13:36
Keybase.io

Keybase proof

I hereby claim:

  • I am beam on github.
  • I am andrewbeam (https://keybase.io/andrewbeam) on keybase.
  • I have a public key ASAYGTW2aP67JY6CGJOPGE0FOwrj1ZnQBGVavH65q9X-FQo

To claim this, I am signing this object: