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 config --global alias.wcb '!f() { branch_name=$1; if git show-ref --verify --quiet refs/heads/$branch_name; then echo "Branch $branch_name already exists in the current repository."; else git checkout -b $branch_name; fi; new_branch=$branch_name; cd ./base; if git show-ref --verify --quiet refs/heads/$new_branch; then echo "Branch $new_branch already exists in the base repository."; else git checkout -b $new_branch; fi; }; f' | |
git config --global alias.wco '!f() { branch_name=$1; if git show-ref --verify --quiet refs/heads/$branch_name; then git checkout $branch_name; else echo "Branch $branch_name does not exist in the current repository."; fi; new_branch=$branch_name; cd ./base; if git show-ref --verify --quiet refs/heads/$new_branch; then git checkout $new_branch; else echo "Branch $new_branch does not exist in the base repository."; fi; }; f' | |
git config --global alias.wp '!f() { branch_name=$1; if git show-ref --verify --quiet refs/heads/$branch_name; then git push origin $branch_name; else echo "Branc |
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
/** | |
* This script must execute before "npm install" | |
* Lock the major version of Node running based on the one set in the package.json | |
* Works by setting a major version in package.json (e.g. "14" or "15"....) in the "engines.node" section. | |
*/ | |
const path = require("path"); | |
const packageJson = require(path.join(process.cwd(), "package.json")); | |
const requiredNodeVersion = parseInt(packageJson.engines.node); |
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
/** | |
* TPM2 Example | |
* with the FastLED library | |
* | |
* Copyright (c) 2019 Stephan Ruloff | |
* https://github.com/rstephan/TPM2 | |
* | |
* GPL v2 only | |
*/ |
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
// This is a potential structure for a frame object | |
const exampleFrame = { | |
'controllerId': { | |
// Pixelpusher knows how to process this from the controller metadata | |
// alternative 1: Put each pixel in an array, if the array has length of 3 | |
// it means RGB, if length===4 it means RGBW | |
'channelId': [[255,0,0], [0,0,0,255], ['more pixels here...']], | |
// alternative 2: send one big array of r/g/b(w) values |
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 lang="en"> | |
<head> | |
<title>Parcel Sandbox</title> | |
<meta charset="UTF-8" /> | |
</head> | |
<body> | |
<button id="portSelect" type="button">Select a port</button> |
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
/* example options: | |
teaserImageConfig: [ | |
{ | |
resize: | |
{ | |
width: '420', | |
height: '420', | |
fit: 'crop' | |
}, |
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
# Open google from windows linux subsystem | |
# This gist will be extended to check for the platform its running on and adapt accordingly | |
echo "cmd.exe /C start http://www.google.de" |