Skip to content

Instantly share code, notes, and snippets.

@DrJeff
DrJeff / CH340N_linux_fix.md
Created September 18, 2022 22:10 — forked from dattasaurabh82/CH340N_linux_fix.md
Fix Driver issues for CH340N usb serial chip in Linux (Ubuntu 22.04)

Tested on Ubuntu 20, 21 earlier and they were not working. So upgraded Ubutbu to latest 22 version.

The issue is: The built in Kernals of Ubuntu and many Linux Kernals (between ) have the CH340 drivers broken / have bugs and not fixed (from kernal 5.4.0-87 and above)

Note: I didn't try on linux kernal 5.4.0-86 my self. I though I will see how is the situation in the latest linux kernal (as of 16/05/2022)

Instructions for Ubuntu 22.04 LTS x86_64

@DrJeff
DrJeff / setup-oh-my-zsh-powerlevel9k.sh
Last active April 10, 2020 05:47 — forked from AlexZeitler/setup-oh-my-zsh-powerlevel9k.sh
Installing zsh / oh-my-zsh / Powerlevel9k on Ubuntu 18.04
sh -c "$(curl -fsSL https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"
git clone https://github.com/bhilburn/powerlevel9k.git ~/.oh-my-zsh/custom/themes/powerlevel9k
wget https://github.com/powerline/powerline/raw/develop/font/PowerlineSymbols.otf
wget https://github.com/powerline/powerline/raw/develop/font/10-powerline-symbols.conf
mkdir ~/.local/share/fonts/
mv PowerlineSymbols.otf ~/.local/share/fonts/
fc-cache -vf ~/.local/share/fonts/
mkdir ~/.config/fontconfig/conf.d/
mv 10-powerline-symbols.conf ~/.config/fontconfig/conf.d/
echo "Log out of your session and login again."
@DrJeff
DrJeff / app.js
Created February 29, 2020 03:18 — forked from rfletcher/app.js
A simple bridge between iMessage and Home Assistant's conversation component
const HomeAssistant = require( 'homeassistant' );
const Pino = require( 'pino' );
const config = require( 'config' );
const hass = new HomeAssistant( config.get( 'home_assistant' ) );
const imessage = require( 'osa-imessage' );
const logger = Pino();
// TODO package this better
const bridge = {
@DrJeff
DrJeff / WireGuard_Setup.txt
Created November 11, 2019 00:44 — forked from chrisswanda/WireGuard_Setup.txt
Stupid simple setting up WireGuard - Server and multiple peers
Install WireGuard via whatever package manager you use. For me, I use apt.
$ sudo add-apt-repository ppa:wireguard/wireguard
$ sudo apt-get update
$ sudo apt-get install wireguard
MacOS
$ brew install wireguard-tools
Generate key your key pairs. The key pairs are just that, key pairs. They can be
@DrJeff
DrJeff / setup_unraid_ssh.sh
Last active December 27, 2018 04:51 — forked from hongkongkiwi/setup_unraid_ssh.sh
Small script to setup ssh keys and configs on Unraid to persist after boot. Supports multiple users.
#!/bin/bash
# Add this line into /boot/config/go where username is the user you want to setup, probably root
#/boot/config/ssh/setup_ssh_client.sh "username"
if [[ "$1" == "" ]]; then
echo "Invalid User!"
exit 1
fi
@DrJeff
DrJeff / get-gravatar-image.sh
Created February 14, 2017 06:06 — forked from egel/get-gravatar-image.sh
Download Gravatar image for an email address
SIZE=500
EMAIL="[email protected]"
curl "http://www.gravatar.com/avatar/$(echo -n ${EMAIL} | md5sum | awk '{print $1}')?s=${SIZE}" > gravatar.png
@DrJeff
DrJeff / gravatar.sh
Created February 14, 2017 06:05 — forked from kristopherjohnson/gravatar.sh
Download Gravatar image for an email address
curl "http://gravatar.com/avatar/$(md5 -q -s [email protected])" > avatar.png