Skip to content

Instantly share code, notes, and snippets.

View vilhalmer's full-sized avatar

Bill Doyle vilhalmer

View GitHub Profile
@shinyquagsire23
shinyquagsire23 / gist:7ddd17d1569acb21920683866570cb35
Created February 23, 2023 07:43
LG MStar firmware disorganized notes -- Hotwords: AEON B2, MStar, LG DualUp Firmware, MST9W00V4, MST9U
DDC/CI Command Codes (antiquated MStar function, not real):
------
0xCC, 0xF1, 0xF0 - LG special? Only CC actually used.
3
1
0xC6
0xC8
0xF3
0xF5
0xB1
irsend.sendNEC( 0x57E318E7, 32);
// E817 power
// 18E7 power off
// 16E9 power on
// 21DE hdmi1
// 22DD hdmi 2
// 23DC hdmi 3
// F00F vol up
@reedjosh
reedjosh / config
Created November 3, 2017 21:35
Sway Config File (About a week into using sway)
font pango:Inconsolata B 14
focus_follows_mouse no
gaps edge_gaps on
gaps 1
hide_edge_borders smart
default_border pixel
seamless_mouse off
#font Inconsolata-dz for Powerline 14
@cryzed
cryzed / fix-infinality.md
Last active March 1, 2025 20:28
A set of instructions on how to fix the harfbuzz + Infinality issue and restoring good-looking, Infinality-like font rendering.

Disclaimer: Please follow this guide being aware of the fact that I'm not an expert regarding the things outlined below, however I made my best attempt. A few people in IRC confirmed it worked for them and the results looked acceptable.

Attention: After following all the steps run gdk-pixbuf-query-loaders --update-cache as root, this prevents various gdk-related bugs that have been reported in the last few hours. Symptoms are varied, and for Cinnamon the DE fails to start entirely while for XFCE the icon theme seemingly can't be changed anymore etc.

Check the gist's comments for any further tips and instructions, especially if you are running into problems!

Screenshots

Results after following the guide as of 11.01.2017 13:08:

macro_rules! parsable_enum {
($(#[$attrs:meta])* enum $name:ident { $($member:ident),*}) =>
(parsable_enum! { $(#[$attrs])* enum $name { $($member),* ,}});
($(#[$attrs:meta])* enum $name:ident { $($member:ident),* , }) => {
$(#[$attrs])*
pub enum $name {
$($member),+
}
use std::str::FromStr;
@lurch
lurch / pizero_usb_internet.sh
Last active November 1, 2022 16:59
Script to automatically provide internet access to a PiZero connected to a Linux host over a USB-network (only tested on Ubuntu 14.04)
#!/bin/bash
# Automatically setup routing and DNS for a PiZero connected over a USB-network
# NOTE: Before running this script for the first time, you need to run the
# following two commands on your Linux PC
# sudo sysctl -w net.ipv4.ip_forward=1
# sudo iptables -t nat -A POSTROUTING -s 169.254.0.0/16 -o eth0 -j MASQUERADE
# (replace eth0 in the second command with your internet-facing network device,
# e.g. wlan0 on a laptop)
# The Avahi-discovered hostname
@gbaman
gbaman / HowToOTGFast.md
Last active March 10, 2025 06:41
Simple guide for setting up OTG modes on the Raspberry Pi Zero, the fast way!

Setting up Pi Zero OTG - The quick way (No USB keyboard, mouse, HDMI monitor needed)

More details - http://blog.gbaman.info/?p=791

For this method, alongside your Pi Zero, MicroUSB cable and MicroSD card, only an additional computer is required, which can be running Windows (with Bonjour, iTunes or Quicktime installed), Mac OS or Linux (with Avahi Daemon installed, for example Ubuntu has it built in).
1. Flash Raspbian Jessie full or Raspbian Jessie Lite onto the SD card.
2. Once Raspbian is flashed, open up the boot partition (in Windows Explorer, Finder etc) and add to the bottom of the config.txt file dtoverlay=dwc2 on a new line, then save the file.
3. If using a recent release of Jessie (Dec 2016 onwards), then create a new file simply called ssh in the SD card as well. By default SSH i

@cdl
cdl / .vimrc
Created December 7, 2015 20:21
"""""""""""""""""""""""""""""
" Files, backups, undo, etc.
"""""""""""""""""""""""""""""
set nocompatible
set encoding=utf8
set ffs=unix,dos,mac
set nobackup
set nowb
set noswapfile
@renchap
renchap / README.md
Last active February 14, 2025 13:25
One-line certificate generation/renews with Letsencrypt and nginx

Prerequisites : the letsencrypt CLI tool

This method allows your to generate and renew your Lets Encrypt certificates with 1 command. This is easily automatable to renew each 60 days, as advised.

You need nginx to answer on port 80 on all the domains you want a certificate for. Then you need to serve the challenge used by letsencrypt on /.well-known/acme-challenge. Then we invoke the letsencrypt command, telling the tool to write the challenge files in the directory we used as a root in the nginx configuration.

I redirect all HTTP requests on HTTPS, so my nginx config looks like :

server {
@steventroughtonsmith
steventroughtonsmith / gist:6788b6c340a0aa52345a
Created October 27, 2015 05:19
Run OS X Screen Saver as Wallpaper
/System/Library/Frameworks/ScreenSaver.framework/Resources/ScreenSaverEngine.app/Contents/MacOS/ScreenSaverEngine -background