This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 = { |
This file contains hidden or 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
.force-show-scrollbars ::-webkit-scrollbar-track:vertical { | |
border-left: 1px solid #E7E7E7; | |
box-shadow: 1px 0 1px 0 #F6F6F6 inset, -1px 0 1px 0 #F6F6F6 inset; | |
} | |
.force-show-scrollbars ::-webkit-scrollbar-track:horizontal { | |
border-top: 1px solid #E7E7E7; | |
box-shadow: 0 1px 1px 0 #F6F6F6 inset, 0 -1px 1px 0 #F6F6F6 inset; | |
} |
This file contains hidden or 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 getLocaleDateString = (locale) => { | |
const formats = { | |
'af-ZA': 'yyyy/MM/dd', | |
'am-ET': 'd/M/yyyy', | |
'ar-AE': 'dd/MM/yyyy', | |
'ar-BH': 'dd/MM/yyyy', | |
'ar-DZ': 'dd-MM-yyyy', | |
'ar-EG': 'dd/MM/yyyy', | |
'ar-IQ': 'dd/MM/yyyy', | |
'ar-JO': 'dd/MM/yyyy', |
This file contains hidden or 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; |
NewerOlder