Skip to content

Instantly share code, notes, and snippets.

View themanyone's full-sized avatar

Henry Kroll III themanyone

View GitHub Profile
@sepastian
sepastian / gst_tools_examples.sh
Created October 7, 2013 12:10
Use gst-launch (gstreamer-tools) to capture single images and stream video from the command-line.
# Capture a single image and save it in JPEG format.
$ gst-launch v4l2src num-buffers=1 ! jpegenc ! filesink location=/tmp/test.jpg
# Stream video from a webcam.
$ gst-launch v4l2src ! xvimagesink
@jazzsequence
jazzsequence / end.gcode
Last active August 4, 2025 09:56
Start and End G-code for Ender 5 on Cura
; Ender 5 Custom End G-code
G4 ; Wait
M220 S100 ; Reset Speed factor override percentage to default (100%)
M221 S100 ; Reset Extrude factor override percentage to default (100%)
G91 ; Set coordinates to relative
G1 F1800 E-3 ; Retract filament 3 mm to prevent oozing
G1 F3000 Z20 ; Move Z Axis up 20 mm to allow filament ooze freely
G90 ; Set coordinates to absolute
G1 X0 Y220 F1000 ; Move Heat Bed to the front for easy print removal
M106 S0 ; Turn off cooling fan
@cellularmitosis
cellularmitosis / Makefile
Last active February 21, 2024 18:05
Compilation speed: tcc vs gcc (sudoku.c)
a.out: sudoku.c
gcc -std=c89 -Wall -Werror -Os sudoku.c -o a.out
ccbench:
@cat /proc/cpuinfo | grep 'model name' | head -n1
@tcc -v || true
@gcc --version | head -n1
@echo
@tcc sudoku.c
time tcc sudoku.c 2>&1 && mv a.out a.out.tcc
@joanbm
joanbm / nvidia-fix-linux-5.14.patch
Created July 12, 2021 19:03
Tentative fix for NVIDIA 465.31 driver for Linux 5.14-rc1
From f18c541edc5e122b06b0c1e65d0a422f0b8109e7 Mon Sep 17 00:00:00 2001
From: Joan Bruguera <[email protected]>
Date: Fri, 2 Jul 2021 02:09:58 +0200
Subject: [PATCH] Tentative fix for NVIDIA 465.31 driver for Linux 5.14-rc1
---
common/inc/nv-time.h | 6 ++++++
nvidia-drm/nvidia-drm-drv.c | 4 ++++
2 files changed, 10 insertions(+)
@themanyone
themanyone / skip_yt_ads.py
Last active September 28, 2024 00:32
Skip YouTube Ads, for Firefox
#!/usr/bin/python
# -*- coding: utf-8 -*-
LICENSE = """
Skip YouTube Ads - does what it says
Uses Python to launch a remote-controlled FireFox process.
Copyright (C) 2024 Henry Kroll III, www.thenerdshow.com
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@themanyone
themanyone / SETUID.md
Created October 4, 2024 07:40
make a script always run as root

How to make a script always run as root

Operation not permitted. Could it be because it is a bash script?

The error message Operation not permitted can occur because you are attempting to set the setuid bit on a Bash script.

Most modern Unix-like operating systems, including Linux, ignore the setuid bit on scripts for security reasons. Setting setuid on scripts can lead to various security vulnerabilities, such as privilege escalation attacks, which is why the operating system typically disallows it.

Why setuid Doesn’t Work on Scripts