Skip to content

Instantly share code, notes, and snippets.

View Ernest314's full-sized avatar

Ernest Gu Ernest314

  • 20:19 (UTC -07:00)
View GitHub Profile
**Easley**
Chase monk ww
Dutch rogue outlaw
Inaru monk ww
Violet monk ww
**Ernie**
Aaylia druid balance
Krek druid balance
Life druid feral
@Ernest314
Ernest314 / DarkmoonDeckSim.cpp
Last active September 18, 2018 17:08
A quick simulation for how many cards need to be crafted to make a specific Darkmoon Deck.
#include "pch.h"
#include <chrono>
#include <iostream>
#include <random>
#include <vector>
using std::cin;
using std::cout;
using std::endl;
using std::vector;
@Ernest314
Ernest314 / WallyBeacon.java
Created September 2, 2016 18:30
Temporary beacon interface
public interface WallyBeacon {
public String getMacAddress();
public String getServiceUUID();
public String getServiceData();
public String getBeaconName();
public int getRSSI();
public int getTxPowerLevel();
}
@Ernest314
Ernest314 / RCSwitch.cpp
Last active March 29, 2019 14:28
A preliminary implementation of the RCSwitch library, allowing for an arbitrary number of RX pins.
/* ========================= .cpp ================================= */
/*
RCSwitch - Arduino libary for remote control outlet switches
Copyright (c) 2011 Suat Özgür. All right reserved.
Contributors:
- Andre Koehler / info(at)tomate-online(dot)de
- Gordeev Andrey Vladimirovich / gordeev(at)openpyro(dot)com
- Skineffect / http://forum.ardumote.com/viewtopic.php?f=2&t=46
@Ernest314
Ernest314 / rgb-control.ino
Created June 19, 2016 04:37
A (slightly over-engineered) set of functions to control the Photon's built-in RGB LED.
// Ernest Gu, 2016-06-17
void setup()
{
Particle.function("setRGB", str_setRGB);
Particle.function("setRGBcolor", str_setRGBcolor);
Particle.function("setRGBmag", str_setRGBmag);
// We need to take control of the RGB LED; there is no good way to share control with the
// default firmware. (This might mean a substantial amount of reimplementation of functionality.)