<a href="https://www.buymeacoffee.com/gbraad" target="_blank"><img src="https://www.buymeacoffee.com/assets/img/custom_images/orange_img.png" alt="Buy Me A Coffee" style="height: 41px !important;width: 174px !important;box-shadow: 0px 3px 2px 0px rgba(190, 190, 190, 0.5) !important;-webkit-box-shadow: 0px 3px 2px 0px rgba(190, 190, 190, 0.5) !important;" ></a>
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
#include<iostream> | |
int main() { | |
char c; | |
// Set the terminal to raw mode | |
while(1) { | |
system("stty raw"); | |
c = getchar(); | |
// terminate when "." is pressed | |
system("stty cooked"); |
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
docker run --rm -ti \ | |
--env-file <(env | grep -iE 'DEBUG|NODE_|ELECTRON_|YARN_|NPM_|CI|CIRCLE|TRAVIS_TAG|TRAVIS|TRAVIS_REPO_|TRAVIS_BUILD_|TRAVIS_BRANCH|TRAVIS_PULL_REQUEST_|APPVEYOR_|CSC_|GH_|GITHUB_|BT_|AWS_|STRIP|BUILD_') \ | |
--env ELECTRON_CACHE="/root/.cache/electron" \ | |
--env ELECTRON_BUILDER_CACHE="/root/.cache/electron-builder" \ | |
-v ${PWD}:/project \ | |
-v ${PWD##*/}-node-modules:/project/node_modules \ | |
-v ~/.cache/electron:/root/.cache/electron \ | |
-v ~/.cache/electron-builder:/root/.cache/electron-builder \ | |
electronuserland/builder:wine |
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
BIN=C:/arduino-1.0.5-r2/hardware/tools/avr/bin | |
TOOLS=C:/arduino-1.0.5-r2/hardware/tools/avr/bin | |
LIB=d:/rajeev/code/bitbucket/dl/lib | |
INC=d:/rajeev/code/bitbucket/dl/include | |
ROOT=d:/rajeev/code/bitbucket/dl | |
PROG=aout | |
MCU=atmega2560 | |
ASRC=d:/rajeev/code/bitbucket/dl/lib/arduino | |
CPU_SPEED=16000000L |
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
# The command finds the most recent tag that is reachable from a commit. | |
# If the tag points to the commit, then only the tag is shown. | |
# Otherwise, it suffixes the tag name with the number of additional commits on top of the tagged object | |
# and the abbreviated object name of the most recent commit. | |
git describe | |
# With --abbrev set to 0, the command can be used to find the closest tagname without any suffix: | |
git describe --abbrev=0 | |
# other examples |
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
copy/delete word under cursor in Vim | |
yw / byw | |
Assuming that the cursor is at the first character of the word simply do this in command mode: | |
yw | |
y is for yank and w is for word. | |
Other ways of doing the same thing which are not as efficient: | |
vey | |
the v starts visual select mode. e tells vim to move to end of word. y yanks or copies the word. to delete replace y with x. |
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
#include <stdlib.h> | |
#include <string.h> | |
#include <Nixie.h> | |
#include <MultiDAC.h> | |
#include "messaging.h" | |
Nixie nixie(NIXIE_PIN_DATA, NIXIE_PIN_CLK, NIXIE_PIN_LATCH); | |
MultiDAC barGraph(GRAPH_PIN_DATA, GRAPH_PIN_CLK, GRAPH_PIN_LATCH); | |
void setup() { |