Skip to content

Instantly share code, notes, and snippets.

View IcyMidnight's full-sized avatar

Damien Bargiacchi IcyMidnight

  • San Francisco, CA
View GitHub Profile
@IcyMidnight
IcyMidnight / blocked-elements.txt
Created August 14, 2021 00:18
Ad Block Settings
zkillboard.com###adsensetop
zkillboard.com###otherBannerDiv
www.youtube.com###items > ytd-grid-video-renderer.ytd-grid-renderer.style-scope:contains(Set reminder)
Ok so my DIY Lacroix electrical helper is ready to go. Voltage checker and USB charger in one.
It takes about an hour and a bit to cut out all the holes in the plastic project box and then just some basic soldering is needed. Total cost around $50 for the two connectors, voltage display and the USB car charge port.
The USB charger already saved me the other day. I was 15 miles from the car when I realized I forgot to charge the remote and was down to one flashing bar. Charged it for 10 minutes and it got me 15 miles back to the car.
Parts:
Large connector:
https://www.amazon.com/CNLINKO-Industrial-Circular-Connector-Waterproof/dp/B07RYTQLZM
Voltage meter:
@IcyMidnight
IcyMidnight / docker-compose.yaml
Created March 23, 2019 10:32
Docker Compose for Home Assistant
version: '3'
services:
home-assistant:
container_name: home-assistant
image: homeassistant/intel-nuc-homeassistant:0.90.1
environment:
- TZ=America/Los_Angeles
network_mode: host
volumes:
@IcyMidnight
IcyMidnight / docker-compose.yaml
Created March 23, 2019 09:31
Docker Compose for Portainer
version: '3'
services:
portainer:
container_name: portainer
image: portainer/portainer
restart: always
ports:
- 9000:9000
environment:
- TZ=America/Los_Angeles

Keybase proof

I hereby claim:

  • I am icymidnight on github.
  • I am icymidnight (https://keybase.io/icymidnight) on keybase.
  • I have a public key ASAo2-j30hbNJzPptqBwDcWak8cnH0LxQ2hFOr75IjG03Ao

To claim this, I am signing this object:

#!/usr/bin/ruby
# Create display override file to force Mac OS X to use RGB mode for Display
# see http://embdev.net/topic/284710
require 'base64'
data=`ioreg -l -d0 -w 0 -r -c AppleDisplay`
edids=data.scan(/IODisplayEDID.*?<([a-z0-9]+)>/i).flatten
vendorids=data.scan(/DisplayVendorID.*?([0-9]+)/i).flatten
@IcyMidnight
IcyMidnight / getscr.sh
Created March 1, 2012 21:24
Manage you screen sessions
#!/bin/bash
if [ -z "$1" ]; then
options=0
@IcyMidnight
IcyMidnight / gem-uninstall-glob.sh
Created December 2, 2010 01:50
Gem uninstall glob
gem uninstall -i gems `ls gems/gems/ | grep merb | ruby -e "STDIN.each_line{|line| STDOUT.puts line.split('-')[0...-1].join('-')}"`
@IcyMidnight
IcyMidnight / Stupid Merb Slice Fix
Created August 25, 2010 01:01
Fix for Merb Slices using directory name as slice name
if File.exists?(slice_name_file = File.join(__DIR__, 'slice_name'))
contents = ''
file = open(slice_name_file, "r")
file.each_line do |line|
contents += line
end
file.close
contents.strip!
slice_name = contents unless contents.empty?
end
@IcyMidnight
IcyMidnight / gist:277643
Created January 15, 2010 00:08
Bash function to create a new git remote branch, a new local branch to track it, and then start using that branch
#!/bin/bash
function git-create-branch() {
if [ $# -ne 1 ]; then
echo 1>&2 Usage: $0 branch_name
exit 127
fi
branch_name=$1
# Create the remote branch
echo "git push origin master:refs/heads/$branch_name"