Skip to content

Instantly share code, notes, and snippets.

View gmcclins's full-sized avatar

Geoffrey McClinsey gmcclins

View GitHub Profile

Keybase proof

I hereby claim:

  • I am gmcclins on github.
  • I am geoffmcc (https://keybase.io/geoffmcc) on keybase.
  • I have a public key ASBwByd6H7N7fA4FY-WTyAmAa3HNX9xqmxwdkP_f0obTDwo

To claim this, I am signing this object:

@gmcclins
gmcclins / 010_pi-nopasswd
Created May 24, 2020 02:32
Allow pi user to use sudo without password
pi ALL=(ALL) NOPASSWD: ALL
#!/usr/bin/env bash
# I don't know if this will work. It may end up fixing display, but need to be run every time it goes wonky.
# It might not even do that and just do nothing.
# https://askubuntu.com/questions/1030929/ubuntu-18-04-lts-display-flashes-and-turns-upside-down-how-to-fix
# obtain output using xrandr -q
xrandr --output LVDS-1 --rotate normal
exit
# ~/.profile: executed by the command interpreter for login shells.
# This file is not read by bash(1), if ~/.bash_profile or ~/.bash_login
# exists.
# see /usr/share/doc/bash/examples/startup-files for examples.
# the files are located in the bash-doc package.
# the default umask is set in /etc/profile; for setting the umask
# for ssh logins, install and configure the libpam-umask package.
#umask 022
---
network:
version: 2
renderer: networkd
ethernets:
enp1s0:
dhcp4: false
dhcp6: false
bridges:
br0:
@gmcclins
gmcclins / daemon.json
Created June 22, 2018 02:51
Docker breaks LXC networking. This will fix it.
# create /etc/docker/daemon.json if does not exist and paste below
{
"iptables": false
}
@gmcclins
gmcclins / rename.sh
Created April 26, 2018 17:42
rename files avi.mkv to just mkv after convert
for file in *.avi.mkv; do
mv "$file" "${file/avi./}"
done
@gmcclins
gmcclins / ifwsl
Created March 26, 2018 18:14
If WSL
if ! [[ "$(uname -r)" = *Microsoft* ]]; then
@gmcclins
gmcclins / fstab
Last active May 23, 2022 06:26
fstab for raspbian w/ rootfs on USB and 3 WD USB drives (RASPBERRY PI 2 MODEL B)
# WD External Drives
PARTUUID=9a0b23dd-f3aa-904a-aa36-fbfcb89693e5 /media/WD1 ntfs-3g permissions,locale=en_US.utf8 0 2
PARTUUID=135ced04-ce4e-9a4b-9501-106e92e9c435 /media/WD2 ntfs-3g permissions,locale=en_US.utf8 0 2
PARTUUID=052d07e3-cc87-8647-a0cb-58f406c2513b /media/WD3 ntfs-3g permissions,locale=en_US.utf8 0 2
@gmcclins
gmcclins / my-pi-temp.sh
Last active October 25, 2017 16:50
Get CPU & GPU Temps
#!/bin/bash
# Script: my-pi-temp.sh
# Purpose: Display the ARM CPU and GPU temperature of Raspberry Pi 2/3
# Author: Vivek Gite <www.cyberciti.biz> under GPL v2.x+
# Updated: Geoffrey McClinsey <hashbang.sh> under GPL v2.x+
# Changed: Made the output a little cleaner
# -------------------------------------------------------
gpu=$(/opt/vc/bin/vcgencmd measure_temp)
cpu=$(</sys/class/thermal/thermal_zone0/temp)
echo "$(date) @ $(hostname)"