Skip to content

Instantly share code, notes, and snippets.

View BaReinhard's full-sized avatar
🏠
Working from home

Brett Reinhard BaReinhard

🏠
Working from home
View GitHub Profile
PLEASE REFER TO https://github.com/BaReinhard/pod-installer-utils
@BaReinhard
BaReinhard / install_new_client.sh
Last active September 14, 2020 16:19
A tool used for Mac users for Path of Diablo. Some users are unable to have the POD Launcher download files, this will do that work for you.
PLEASE REFER TO https://github.com/BaReinhard/pod-installer-utils
@BaReinhard
BaReinhard / download_files.sh
Last active September 14, 2020 16:19
File downloader for xml links for Path of Diablo (for mac users, should also work for linux, given you have xmlstarlet installed)
PLEASE REFER TO https://github.com/BaReinhard/pod-installer-utils
//Program: RGB Color Change
//Programmer: Brett Reinhard
//Date: 10/20/2016
//Description: Changes color of LED's within the Pumpkin, with smooth transitions.
int const Red = 9, /* Pin 3 */ Blue = 11, /* Pin 5 */ Green = 10; /* Pin 6 */
class Pumpkin
{
private:
int *_r;
int *_g;
//Program: RGB Color Change
//Programmer: Brett Reinhard
//Date: 03/12/2016
//Description: Changes color of rgb led by use of a potentiator knob.
int prevR = 0, prevG = 0, prevB = 0; // all of the previous RGB values
int const Red = 3; //pin 3
int const Blue = 5; // pin 4
/*
* LedBrightness sketch
* controls the brightness of LEDs on "analog" (PWM) output ports.
*/
#include <LiquidCrystal.h>
LiquidCrystal lcd(12,11,9,4,8,7);
class rgb_color {
private:
int my_r;
// pseudo code
// strip string of white space
// check first character for sign
// loop through remaining string until the end or a non integer value
// check ascii value of each character and ensure it falls in proper range
// then offset the ascii value from the ascii of 0
// return new integer with sign 1 or -1
func myAtoi(str string) int {
finalString:= ""
sign:= 1
func reverse(x int) int {
// calc minimum and maximum values
max:= int(math.Pow(2,31))
min:= int(math.Pow(-2,31)) -1
tmp := x
reverse:= 0
for{
digit := tmp % 10
reverse = reverse * 10 + digit
tmp = tmp / 10
/**
* Definition for singly-linked list.
* type ListNode struct {
* Val int
* Next *ListNode
* }
*/
func addTwoNumbers(l1 *ListNode, l2 *ListNode) *ListNode {
// Check that l1 and l2 are not empty
func threeSum(nums []int) [][]int {
sort.Ints(nums[:])
used:= map[string]bool{}
if !(len(nums)>2){
fmt.Printf("Not enough integers in array")
return [][]int{}
}
firstNum:= nums[0]
lastNum:= nums[len(nums)-1]
// Check that the sorted list to see if its a long array of 0's