Skip to content

Instantly share code, notes, and snippets.

View MC42's full-sized avatar

Kim MC42

View GitHub Profile
@justinschuldt
justinschuldt / raspberry-pi-zero_as_webcam.md
Last active February 25, 2024 07:34
Directions for setting up a RaspberryPi to act as a generic USB webcam

hardware/software

Webcam parts:

  • Raspberry Pi Zero W Rev 1.1
  • Raspberry Pi Camera v2 (8-megapixel)
  • Raspberry Pi High Quality Camera (12.3-megapixel)
  • Raspbian Buster Lite 2020-02-13

Webcam works with:

  • Windows 10
  • Windows 10 "Camera" app
@marshallmassengill
marshallmassengill / rules.d
Created April 30, 2020 01:23
sparkMax gs_usb udev rules
#put the following line into /etc/udev/rules.d
ACTION=="add", ATTRS{idVendor}=="0483", ATTRS{idProduct}=="a30e", RUN+="/sbin/modprobe gs_usb" RUN+="/bin/sh -c 'echo 0483 a30e ff > /sys/bus/usb/drivers/gs_usb/new_id'"
import collections
import math
import os
import cv2
import numpy as np
import time
MAX_LINES = 4000
N_PINS = 36*8
MIN_LOOP = 20 # To avoid getting stuck in a loop
@prateekma
prateekma / PathFollower.kt
Created July 11, 2018 04:37
Implementation of non-linear time-varying reference tracking on Pathfinder generated paths.
/*
* FRC Team 5190
* Green Hope Falcons
*/
package frc.team5190.lib.trajectory
import frc.team5190.lib.extensions.cos
import frc.team5190.lib.extensions.enforceBounds
import frc.team5190.lib.extensions.epsilonEquals
@probonopd
probonopd / linux_fusion360.md
Last active November 9, 2023 15:22
Autodesk Fusion 360 on Linux

Autodesk Fusion 360 on Linux

In the Web Browser

Ubuntu, Fedora, openSUSE, CentOS, SUSE Linux Enterprise, Debian,... users can finally use Autodesk Fusion 360 in the Linux Browser now.

https://myhub.autodesk360.com

On Chromium 55.0.2843.0 I get NET::ERR_CERTIFICATE_TRANSPARENCY_REQUIRED.

@fm4dd
fm4dd / gcc compiler optimization for arm systems.md
Last active April 9, 2024 19:24
GCC compiler optimization for ARM-based systems

GCC compiler optimization for ARM-based systems

2017-03-03 fm4dd

The gcc compiler can optimize code by taking advantage of CPU specific features. Especially for ARM CPU's, this can have impact on application performance. ARM CPU's, even under the same architecture, could be implemented with different versions of floating point units (FPU). Utilizing full FPU potential improves performance of heavier operating systems such as full Linux distributions.

-mcpu, -march: Defining the CPU type and architecture

These flags can both be used to set the CPU type. Setting one or the other is sufficient.

@benjaminblack
benjaminblack / lets-encrypt-certbot-acme-client-manual-dns-challenge.md
Last active August 6, 2023 23:28
Let's Encrypt certbot ACME client manual DNS challenge

Let's Encrypt certbot ACME client manual DNS challenge

certbot certonly [--dry-run] --manual --preferred-challenges dns-01 \
--domain example.com --domain www.example.com [...]

For each host passed via --domain, Let's Encrypt will prompt the user to create an _acme-challenge TXT record (_acme-challenge.example.com, _acme-challenge.www.example.com, etc.) with a specific value.

@mapuo
mapuo / debian_ksm.md
Last active September 21, 2023 20:44
Enable KSM (Kernel Same-Page Merging) on boot in Debian

Enable KSM (Kernel Same-Page Merging) on boot in Debian

I have installed and run Netdata on my Debian based home server and I wanted to enable KSM after Netdata installer suggested it could save some RAM.

To enable the KSM on boot in Debian you I executed these steps:

  1. Install ksmtuned without all the QEMU dependencies: