This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# path needs to be set before oh-my-zsh is loaded | |
export PATH=~/.npm-global/bin:$PATH | |
export PATH=~/.npm/bin:$PATH | |
export PATH="$HOME/.yarn/bin:$HOME/.config/yarn/global/node_modules/.bin:$PATH" | |
export PATH=$PATH:"/home/thomas/bin" | |
export NVM_DIR="$HOME/.nvm" | |
# load nvm | |
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
git commit --amend --author="John Doe <john@doe.org>" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Simple Counter | |
* —————— | |
* | |
* This is a simple counter that takes a digital input | |
* | |
*/ | |
int ledPin = 13; // choose the pin for the LED | |
int switchPin =2; // choose the input pin (for a pushbutton) | |
int val = 0; // variable for reading the pin status | |
int counter = 0; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
boolean delayTime(unsigned long time) { | |
static unsigned long previousmillis = 0; | |
unsigned long currentmillis = millis(); | |
if (currentmillis - previousmillis >= time) { | |
previousmillis = currentmillis; | |
return true; | |
} | |
return false; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const os = require("os"); | |
//Create function to get CPU information | |
function cpuAverage() { | |
//Initialise sum of idle and time of cores and fetch CPU info | |
var totalIdle = 0, totalTick = 0; | |
var cpus = os.cpus(); | |
//Loop through CPU cores |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/> | |
<title>Spoon-Knife</title> | |
<LINK href="styles.css" rel="stylesheet" type="text/css"> | |
</head> | |
<body> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Show hidden characters
{ | |
"Log to console (String)": { | |
"scope": "javascript,typescript,javascriptreact,typescriptreact", | |
"prefix": "#log", | |
"body": [ | |
"console.log('$1');", | |
"$0" | |
], | |
"description": "Log to the console (String)" | |
}, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// See https://go.microsoft.com/fwlink/?LinkId=733558 | |
// for the documentation about the tasks.json format | |
// ************************************************** | |
// USING: | |
// npm install node-sass -g | |
// npm install uglify-js -g | |
// npm install html-minifier -g | |
// ************************************************** | |
{ | |
"version": "2.0.0", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// GPS Speedometer | |
// Copyright (c) 2021 Thomas Meschke | |
// | |
// MIT License | |
// https://opensource.org/licenses/mit-license.php | |
// | |
// Put the GPS Module ( NEO-6M-x ) on the following pins: | |
// TX: Arduino Pro Micro / ATTINY 1634 => RX Pin | |
// RX: Arduino Pro Micro / ATTINY 1634 => TX Pin | |
// |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const pos = { x: 0, y: 0 }; | |
const zoom_target = { x: 0, y: 0 }; | |
const zoom_point = { x: 0, y: 0 }; | |
const factor = 0.1; | |
const max_scale = 3; | |
let scale = 1; | |
const scrolled = (e) => { | |
const size = { |
NewerOlder