Skip to content

Instantly share code, notes, and snippets.

View ThePenguin1140's full-sized avatar

Jason Würtz ThePenguin1140

View GitHub Profile
// set pin numbers:
const int buttonPin = 2; // the number of the pushbutton pin
const int ledPin = 10; // the number of the LED pin
// variables will change:
int buttonState = 0; // variable for reading the pushbutton status
int btncount = 0;
void setup() {
// initialize the LED pin as an output:
#include <math.h>
double celsius = 0;
double Thermistor(int RawADC) {
double Temp;
Temp = log(10000.0*((1024.0/RawADC-1)));
Temp = 1 / (0.001129148 + (0.000234125 + (0.0000000876741 * Temp * Temp ))* Temp );
return Temp;
}
@ThePenguin1140
ThePenguin1140 / workspaces.ahk
Last active February 26, 2017 17:07
Series of Windows 10 macros to make workspaces usable.
#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
; #Warn ; Enable warnings to assist with detecting common errors.
SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory.
#InstallKeybdHook
<!<^Up::
send, #{Tab}
Return
@ThePenguin1140
ThePenguin1140 / paging.ts
Created January 20, 2019 14:42
Manual pages because you like reinventing the wheel
interface IItem {
page: number;
content: number;
}
class Paging {
const ITEM_LIMIT: number = 10;
const CONTENT_FILTER: number = 2;
const content$: Subject<IItem[]>;
@ThePenguin1140
ThePenguin1140 / environmentVariables.json
Last active April 8, 2020 00:35
Simple object containing some information about the environment.
{
"branch": "UNKOWN",
"commit": "UNKOWN"
}