Skip to content

Instantly share code, notes, and snippets.

View alkalinecoffee's full-sized avatar

Joe Martin alkalinecoffee

  • Comcast
  • Philadelphia, PA
View GitHub Profile
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>AdjustWindowForFontSizeChange</key>
<true/>
<key>AllowClipboardAccess</key>
<false/>
<key>AnimateDimming</key>
<false/>
@alkalinecoffee
alkalinecoffee / simple_form_bootstrap.rb
Last active November 5, 2015 19:23
custom simple form component
SimpleForm.setup do |config|
config.wrappers :half_width_checkboxes, tag: 'div', class: 'row', error_class: 'has-error' do |b|
b.use :html5
b.wrapper tag: 'div', class: 'col-md-5' do |ba|
ba.wrapper tag: 'div', class: 'panel panel-default' do |bb|
bb.wrapper tag: 'div', class: 'panel-heading' do |bc|
bc.use :h_label, class: 'panel-title'
end
bb.wrapper tag: 'div', class: 'panel-body' do |bc|
@alkalinecoffee
alkalinecoffee / linux_cheat_sheet.txt
Last active January 21, 2016 01:21
Common linux commands
############
# SYSTEM
############
# show running daemons (CentOS)
systemctl
# show daemon status (CentOS)
systemctl status sshd.service
############
brew install bash-completion
brew tap cloudfoundry/tap && brew install cf-cli
brew tap drone/drone && brew install drone
brew install tomcat
brew install phantomjs
brew install python@2
pip install ansible
# add to /usr/local/Cellar/tomcat/8.5.8/libexec/conf/tomcat-users.xml
<role rolename="admin"/>
wget https://github.com/nodemcu/nodemcu-firmware/releases/download/0.9.6-dev_20150704/nodemcu_float_0.9.6-dev_20150704.bin
git clone https://github.com/themadinventor/esptool.git
cd esptool
sudo python setup.py install
sudo python ./esptool.py --port=/dev/cu.SLAB_USBtoUART write_flash -fm=dio -fs=32m 0x00000 nodemcu_float_0.9.6-dev_20150704.bin
@alkalinecoffee
alkalinecoffee / rf_test.ino
Created January 17, 2017 00:05
echo fireplace
// simple script to send RF code out to transmitter
// https://github.com/alkalinecoffee/echo_fireplace
#include <RCSwitch.h>
RCSwitch mySwitch = RCSwitch();
const int ledPin = 16;
const int transmitPin = 12; // D6
const int pulseLength = 430;
Harbor Breeze
FAN LOW: 0111110001000
FAN MED: 0111110010000
FAN HGH: 0111110100000
FAN OFF: 0111110000010
LIGHT1: 0111110000001
LIGHT2: 0111110000000
@alkalinecoffee
alkalinecoffee / haproxy.cfg
Created February 17, 2017 02:20
haproxy config for pihole and homeassistant on raspberry pi
global
log /dev/log local0
log /dev/log local1 notice
chroot /var/lib/haproxy
stats socket /run/haproxy/admin.sock mode 660 level admin
stats timeout 30s
user haproxy
group haproxy
daemon
@alkalinecoffee
alkalinecoffee / gist:9ff353d6ca33c736fbfd83b252d8cd47
Last active February 18, 2017 13:12
JBtek USB TTL pin connections for pine64
Pine64
EXP PINS
6 - Black (GND)
7 - White (RX)
8 - Green (TX)
Pi model B
2 - Red (Vcc) optional
6 - Black (GND)
8 - White (RX)
@alkalinecoffee
alkalinecoffee / gist:1dab0cd845ad839d97281aa300a66f69
Last active November 17, 2017 21:09
test value for prometheus/alertmanager
# HELP testvalue A test value
# Type testvalue gauge
testvalue 5