Skip to content

Instantly share code, notes, and snippets.

View justinledwards's full-sized avatar

Justin Edwards justinledwards

  • Florida Ninth Circuit Courts
  • Florida
View GitHub Profile
@justinledwards
justinledwards / button-neopixel-cycler.c
Last active December 20, 2015 17:29
Attempting to cycle through different shows using a button
#include <Adafruit_NeoPixel.h>
#define PIN 6
// Attempting to cycle through different shows using a button
// Parameter 1 = number of pixels in strip
// Parameter 2 = pin number (most are valid)
// Parameter 3 = pixel type flags, add together as needed:
// NEO_RGB Pixels are wired for RGB bitstream
// NEO_GRB Pixels are wired for GRB bitstream
@justinledwards
justinledwards / dialboard.cpp
Last active December 27, 2015 05:38
Working on dial in board
#include <LCD4Bit_mod.h>
LCD4Bit_mod lcd = LCD4Bit_mod(2);
// Keys
// 0 = right
// 1 = up
// 2 = down
// 3 = left
// 4 = select
//Key message
@justinledwards
justinledwards / dpkg log
Last active December 27, 2015 17:39
debian installed packages for beaglebone black
root@arm:~# dpkg --get-selections
adduser install
apache2 install
apache2-mpm-worker install
apache2-utils install
apache2.2-bin install
apache2.2-common install
apt install
apt-utils install
aptitude install
@justinledwards
justinledwards / servers_controller.rb
Created December 2, 2013 22:09
Voxeo Load Dashboard
require 'nokogiri'
require 'open-uri'
@servers = Server.where(:active => true)
@servers.each do |s|
url = "http://" + s.ip_address + ":9999/stats_10?type=counters"
doc = Nokogiri::XML(open(url))
s.ports_in_use = doc.xpath("//counters/item[@name='CT/Licensed/Ports']").text.to_i
s.ports_total = doc.xpath("//counters/item[@name='CT/Licensed/Licensed']").text.to_i
s.save
end
@justinledwards
justinledwards / database.yml
Created December 11, 2013 01:13
database.yml for testing production locally
# SQLite version 3.x
# gem install sqlite3
#
# Ensure the SQLite 3 gem is defined in your Gemfile
# gem 'sqlite3'
development:
adapter: sqlite3
database: db/development.sqlite3
pool: 5
timeout: 5000
@justinledwards
justinledwards / screentest.py
Created December 23, 2013 00:20
Cheap ebay GY-IICLCD paired with 2004 LCD Working with Beaglebone black (p9 19 and 20)
'''
Copyright (C) 2012 Matthew Skolaut
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and
associated documentation files (the "Software"), to deal in the Software without restriction,
including without limitation the rights to use, copy, modify, merge, publish, distribute,
sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial
@justinledwards
justinledwards / pylcd.py
Last active January 1, 2016 04:19
Weather LCD
'''
Copyright (C) 2012 Matthew Skolaut
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and
associated documentation files (the "Software"), to deal in the Software without restriction,
including without limitation the rights to use, copy, modify, merge, publish, distribute,
sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial
@justinledwards
justinledwards / 8LEDblinkwoDelay.ino
Last active March 7, 2023 17:56
8 LED blink without delay
/* 8 LEDs blinking at random intervals without delay
Using the millis method you don't have to wait for an operation to happen before executing the next bit of code.
If you don't use this method you can't overlap state changes.
*/
// constants won't change. Used here to
// set pin numbers:
const int ledPin = 13; // the number of the LED pin
const int ledPin2 = 12;
const int ledPin3 = 11;
#include <opencv/cv.h>
#include "opencv2/highgui/highgui.hpp"
#include <iostream>
using namespace cv;
using namespace std;
int main(int argc, char* argv[])
{
VideoCapture cap(0);// open the video file for reading
@justinledwards
justinledwards / dryrun.ps1
Last active August 29, 2015 14:00
Ultra Fast VDI Boot
# Did you run Voodoo on the registry and reboot?
# Did you run "Set-ExecutionPolicy remotesigned" ?
Set-Location C:\voodoomagic
function Test-ReparsePoint([string]$path) {
$file = Get-Item $path -Force -ea 0
return [bool]($file.Attributes -band [IO.FileAttributes]::ReparsePoint)
}
function Symlinker([string]$dir) {