Skip to content

Instantly share code, notes, and snippets.

View weegeekps's full-sized avatar

Adam Morris weegeekps

View GitHub Profile
@weegeekps
weegeekps / fall-colors.json
Created October 12, 2023 17:21
MN 2023 Fall Colors
[
{
"grasses": "0",
"id": "SPK00173",
"leaves": "6",
"alsoOfInterest": "The water volume on the Pigeon River is close to average water flow for this time of year, but the 120-foot High Falls is still an impressive sight. Keep your eyes out for signs of wildlife! You never know what you'll see. Patience and quietness are virtues when it comes to spotting wildlife. ",
"url": "/state_parks/grand_portage",
"photo": "1696226384446",
"whereToGo": "All 3 of our trails are past peak but still have some nice colors. The High Falls Trail is the busiest trail with lots of hikers. If you would like a more secluded wilderness experience, take a hike on the rugged and challenging Middle Falls Trail. Be sure to bring water and wear sturdy hiking boots. If you'd like an easy walk on a less-crowded paved trail, check out the Picnic Trail which has nice views of the Pigeon River. ",
"whatToSee": "The maple leaves have long since fallen. The birch and aspen have nice colors, but they are s
@weegeekps
weegeekps / Fix Controller Assignments.ps1
Created December 31, 2018 01:55
Fix DCS controller assignments when USB IDs change
$path = "~\Saved Games\DCS.openbeta\Config\Input"
$devices = @(
@{
Original = "3 axis 0 button joystick {5AE280A0-5D5E-11e4-8005-444553540000}.diff.lua"
New = "Flight Rudder Pedals {FA0AD4E0-0C58-11e9-8001-444553540000}.diff.lua"
},
@{
Original = "Joystick - HOTAS Warthog {5AE7FEE0-5D5E-11e4-8006-444553540000}.diff.lua"
New = "Joystick - HOTAS Warthog {B6F0F600-0C51-11e9-8003-444553540000}.diff.lua"
},
@weegeekps
weegeekps / gist:2886727
Created June 7, 2012 05:17
Confusing Switch
switch (request)
{
case RequestType.READ:
response = Read(request);
break;
case RequestType.CREATE:
Create(request);
break;
case RequestType.DELETE:
Delete(request);
internal void RouteRequest(RequestStruct request)
{
ResponseStruct response = null;
switch (request)
{
case RequestType.CREATE:
Create(request);
break;
case RequestType.UPDATE:
@weegeekps
weegeekps / gist:2886638
Created June 7, 2012 04:48
Enum Example
enum RequestType
{
CREATE,
READ,
UPDATE,
DELETE,
};
@weegeekps
weegeekps / gist:2886624
Created June 7, 2012 04:45
Switch Example
void RouteRequest(RequestStruct request)
{
ResponseStruct response = NULL;
switch (request)
{
case RequestType.CREATE:
Create(request);
break;
case RequestType.UPDATE:
@weegeekps
weegeekps / gist:2886578
Created June 7, 2012 04:32
Enum Example
enum ResponseType
{
CREATE,
READ,
UPDATE,
DELETE,
};
@weegeekps
weegeekps / switch_flexibility.cpp
Created February 11, 2012 03:37
Switch flexibility Example
int main (int argc, const char * argv[])
{
Process aNewProcess;
time_t startTime = time(NULL);
State processState = aNewProcess.run();
time_t secondsTaken = time(NULL) - startTime;
switch(processState)
{