Skip to content

Instantly share code, notes, and snippets.

Avatar

Bill billpatrianakos

View GitHub Profile
@billpatrianakos
billpatrianakos / LIRC_Raspian_Buster.md
Last active Mar 5, 2021
How to set up LIRC on Raspbian Buster (2019, 4.x kernel)
View LIRC_Raspian_Buster.md

Infrared and LIRC

*Beware: These instructions have been cobbled together from all of the sources I found that got my specific unit working. I can verify it works on a Pi 3B running the latest OS as of summer 2019. Everyone's hardware and system will be a bit different so your mileage may vary. Before you go crazy trying to debug issues sending a signal, grab an existing lirc config for any remote and use the lirc CLI to send a signal out and verify your hardware is sending the signal by viewing the IR LED through a front-facing smartphone camera (almost all smartphone front cameras - even new iPhones - will not filter out IR light and you should see the LED flash when sending a signal). If you see your hardware is sending a signal and/or you can see that the IR input is seeing some signal, then you know your setup works and the issue may be that the remote you're trying to learn simply won't work with LIRC. I know for a fact that many Comcast/Xfinity cable remotes are actually RF devices and need to have

@billpatrianakos
billpatrianakos / connect.rb
Last active Aug 24, 2019
Connect over SSH without having to remember domains or IP addresses
View connect.rb
#!/usr/bin/env ruby
# Connect
#
# Quickly SSH into a server or get its details without
# having to remember IP addresses or domain names.
#
# SETUP
# -----
# Fill out the following:
@billpatrianakos
billpatrianakos / lirc_pi_zero_w.txt
Last active Feb 4, 2021 — forked from prasanthj/lirc-pi3.txt
Getting lirc to work with Raspberry Pi Zero W (Raspbian Buster)
View lirc_pi_zero_w.txt
# Steps to get IR receiver and transmitter from Amazon [1] working on a Raspberry Pi Zero W.
$ sudo apt-get update
$ sudo apt-get install lirc
# Remove this line from /boot/config.txt
dtoverlay=lirc-rpi,gpio_in_pin=18,gpio_out_pin=17
# Add the following lines in /boot/config.txt
dtoverlay=gpio-ir,gpio_pin=23
@billpatrianakos
billpatrianakos / server-reboot
Created Jun 18, 2018 — forked from DanielBlanco/server-reboot
Restart resque workers after server reboot
View server-reboot
#!/bin/bash
# This is an sample file, put a copy of this file inside /shared/bin
# I'm assuming a capistrano directory structure under /var/www/my-project/
#
# Called by crontab when the server reboots
#
# To use this file execute with root privileges:
# crontab -e
#
# then add this line:
@billpatrianakos
billpatrianakos / installfest_easy.sh
Last active Sep 19, 2016
Commands to install everything a student needs during a web development class
View installfest_easy.sh
#!/usr/bin/sh
# Install Fest 2.0
##
# Welcome message
##
echo "################################"
echo "# Welcome to InstallFest v2.0 #"
echo "#==============================#"
@billpatrianakos
billpatrianakos / style.css
Created Nov 8, 2015
Sample stylesheet for weekend workshop
View style.css
/**
* Main Stylesheet
*
* Do not code any styles within this file.
*
* USAGE:
* Import all styles into this file. Start with
* baseline styles at the top, site styles in the
* middle, then mobile styles at the end.
*/
@billpatrianakos
billpatrianakos / keybase.md
Created May 5, 2015
Verifying my identity
View keybase.md

Keybase proof

I hereby claim:

  • I am billpatrianakos on github.
  • I am billpatrianakos (https://keybase.io/billpatrianakos) on keybase.
  • I have a public key whose fingerprint is 357C 84B8 9FC4 141D 4545 F86D 4D75 39A8 3499 95DF

To claim this, I am signing this object:

@billpatrianakos
billpatrianakos / gist:12eedfe39f6d6b2ce533
Created Dec 15, 2014
Quick-n-dirty CLI random password generator
View gist:12eedfe39f6d6b2ce533
#!/usr/bin/env ruby
# Password Generator!
#
# Online password generators are kind of
# sketchy. Why copy and paste a string you
# got from some random website that could
# be building a rainbow table from the string
# they generate for you when you can run a
# quick script locally and get a secure password
@billpatrianakos
billpatrianakos / gist:c4b7d8c38fc441c91d79
Created Dec 15, 2014
Shortcut script to connect to servers via SSH without remembering IPs
View gist:c4b7d8c38fc441c91d79
#!/usr/bin/env ruby
# Connect
#
# Connects to a server by name and user
# Usage: Run `connect <hostname> <user>`
# <user> is optional and defaults to '<REPLACE WITH YOUR OWN DEFAULT>'
if ARGV[0].nil?
puts <<-END