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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
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/bash | |
exec 5>&1 | |
SHARE="/mnt/TORRENT/completed" | |
LOCAL="/media/STORAGE/@temp" | |
FILES="/media/STORAGE/@new" | |
TIMESTAMP="$(date '+%d %h %y %H:%M:%S')" | |
LOCK="rsync-completed.lock" | |
# acquire lock |
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/bash | |
trap '[ "$?" -eq 0 ] || read -p "Looks like something went wrong... Press any key to continue..."' EXIT | |
VM=default | |
DOCKER_MACHINE=./docker-machine.exe | |
export PATH="/c/Program Files/Docker Toolbox:$PATH" | |
export HTTP_PROXY=10.235.34.235:3129 | |
export HTTPS_PROXY=10.235.34.235:3129 | |
for n in $(docker-machine ls --format {{.Name}}); do |
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 <Elapsed.h> | |
#include <Effects.h> | |
#include <Qube.h> | |
#include <FormattingSerialDebug.h> | |
#define BUTTON_PIN 2 | |
#define SIZE 3 | |
const int pins[SIZE][SIZE] = { // | |
{ 3, 4, 5 }, // row 1 | |
{ 6, 7, 8 }, // row 2 |
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
/* | |
CircularBuffer.h - Circular buffer library for Arduino. | |
Copyright (c) 2017 Roberto Lo Giacco. All right reserved. | |
This library is free software; you can redistribute it and/or | |
modify it under the terms of the GNU Lesser General Public | |
License as published by the Free Software Foundation; either | |
version 2.1 of the License, or (at your option) any later version. | |
This library is distributed in the hope that it will be useful, |
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 <Effects.h> | |
#include <Elapsed.h> | |
#include <Qube.h> | |
#define BUTTON_PIN 2 | |
#define SIZE 3 | |
const int pins[SIZE][SIZE] = { // | |
{ 3, 4, 5 }, // row 1 | |
{ 6, 7, 8 }, // row 2 | |
{ 9, 10, 11 } // row 3 |
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
int freeRam() { | |
extern int __heap_start, *__brkval; | |
int v; | |
return (int) &v - (__brkval == 0 ? (int) &__heap_start : (int) __brkval); | |
} |
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
int ref0, ref1; //reference values to remove offset | |
int ADCTouch_read(byte ADCChannel, int samples) { | |
long _value = 0; | |
for(int _counter = 0; _counter < samples; _counter ++) | |
{ | |
pinMode(ADCChannel, INPUT_PULLUP); | |
analogRead(ADCChannel); |
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 "Arduino.h" | |
#include <FastLED.h> | |
#include <elapsedMillis.h> | |
#include <FormattingSerialDebug.h> | |
#define PIN_LEGENDA 2 | |
#define PIN_PLASTICO 3 | |
#define NUM_STANZE 13 | |
#define LED_COUNT_LEGENDA 13 |