Skip to content

Instantly share code, notes, and snippets.

View garthvh's full-sized avatar

Garth Vander Houwen garthvh

View GitHub Profile
@HaxNobody
HaxNobody / ZoomMuteButton.ino
Last active July 19, 2022 02:23
Physical mute button for Zoom using an ATTiny85/Digispark and the Micronucleus bootloader to allow programming with the Arduino IDE
/*
Thanks to Elliotmade for the inspiration on this project
https://elliotmade.com/2020/04/23/physical-mute-button-for-zoom-meetings/
Refactored by HaxNobody to extend functionalty and add comments for my own understanding
This program will send USB HID keyboard presses to bring the Zoom window into
the foreground and activate microphone and video functions.
* A momentary press on button 1 will toggle mute on or off.
* Press and hold button 1 to activate PTT (Push-to-Talk) functionality.
@navsing
navsing / MessagesPart-II.swift
Last active January 17, 2023 17:13
Recreating the Messages App Part II (Conversation View) using SwiftUI and Swift Playgrounds on iPad
import SwiftUI
import PlaygroundSupport
struct Screen: View {
var body: some View {
VStack {
ChatTopView()
ConversationView()
ChatBottomBar().padding(.bottom, 10)
}
@debojyoti
debojyoti / lenovo_ideapad_330_ubuntu.md
Last active October 15, 2023 20:13
Lenovo ideapad 330 (15ARR) ubuntu issues and there solutions

Lenovo ideapad 330 (15ARR) ubuntu issues and their solutions

Issue-1: None of the ubuntu distros are getting installed

Solution: Ubuntu distros lower than 18.10 will not work in this laptop, as minimum kernal version required is 4.18.

So install ubuntu 18.10 / xubuntu 18.10 / lubuntu 18.10 / kubuntu 18.10 in UEFI mode

Issue-2: Wifi is not working

@crittermike
crittermike / wget.sh
Last active March 26, 2024 22:49
Download an entire website with wget, along with assets.
# One liner
wget --recursive --page-requisites --adjust-extension --span-hosts --convert-links --restrict-file-names=windows --domains yoursite.com --no-parent yoursite.com
# Explained
wget \
--recursive \ # Download the whole site.
--page-requisites \ # Get all assets/elements (CSS/JS/images).
--adjust-extension \ # Save files with .html on the end.
--span-hosts \ # Include necessary assets from offsite as well.
--convert-links \ # Update links to still work in the static version.
@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.

@savetheclocktower
savetheclocktower / README.md
Last active May 5, 2024 19:44
Using a rotary encoder as a volume control for the Raspberry Pi

Using a rotary encoder as a volume control

On my RetroPie machine I wanted a hardware volume knob — the games I play use a handful of emulators, and there's no unified software interface for controlling the volume. The speakers I got for my cabinet are great, but don't have their own hardware volume knob. So with a bunch of googling and trial and error, I figured out what I need to pull this off: a rotary encoder and a daemon that listens for the signals it sends.

Rotary encoder

A rotary encoder is like the standard potentiometer (i.e., analog volume knob) we all know, except (a) you can keep turning it in either direction for as long as you want, and thus (b) it talks to the RPi differently than a potentiometer would.

I picked up this one from Adafruit, but there are plenty others available. This rotary encoder also lets you push the knob in and treats that like a button press, so I figured that would be useful for toggling mute on and off.

@spalladino
spalladino / mysql-docker.sh
Created December 22, 2015 13:47
Backup and restore a mysql database from a running Docker mysql container
# Backup
docker exec CONTAINER /usr/bin/mysqldump -u root --password=root DATABASE > backup.sql
# Restore
cat backup.sql | docker exec -i CONTAINER /usr/bin/mysql -u root --password=root DATABASE
@glesik
glesik / check_motion.sh
Created September 5, 2015 14:20
Bash script for cron to check if motion is running and free disk space
#!/bin/bash
SERVICE='motion'
RUN_COMMAND='nice -n 10 /usr/local/bin/motion &'
LOGFILE=/home/pi/motion/motion.log
VOPATH=/media/data/motion # video output directory
LIMIT=90 # maximum disk usage
if [ ! $(pidof $SERVICE) ]
then
@alaudet
alaudet / 8192cu.conf
Last active June 30, 2016 20:06
Fix Wifi High Latency Issue on Raspberry Pi
1 - Create the file /etc/modprobe.d/8192cu.conf
2 - Add the following line to the file
options 8192cu rtw_power_mgnt=0 rtw_enusbss=0
3 - Reboot
4 - Check if power saving mode is switched off (0 = off, 1 = on)
cat /sys/module/8192cu/parameters/rtw_power_mgnt
@magicznyleszek
magicznyleszek / jekyll-and-liquid.md
Last active January 12, 2024 03:46
Jekyll & Liquid Cheatsheet

Jekyll & Liquid Cheatsheet

A list of the most common functionalities in Jekyll (Liquid). You can use Jekyll with GitHub Pages, just make sure you are using the proper version.

Running

Running a local server for testing purposes: