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 <Wire.h> | |
#include <Adafruit_GFX.h> | |
#include <Adafruit_SSD1306.h> | |
#define SCREEN_WIDTH 128 // OLED display width, in pixels | |
#define SCREEN_HEIGHT 64 // OLED display height, in pixels | |
#define OLED_RESET -1 // Reset pin (-1 if sharing Arduino reset pin) | |
#define SCREEN_ADDRESS 0x3C // Typical I2C address for 0.96" OLED displays | |
// Joystick pins |
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 <DHT.h> | |
#include <Wire.h> | |
#include <Adafruit_GFX.h> | |
#include <Adafruit_SSD1306.h> | |
#define pinDHT 7 | |
#define SCREEN_WIDTH 128 // OLED display width, in pixels | |
#define SCREEN_HEIGHT 64 // OLED display height, in pixels | |
#define OLED_RESET 4 // Reset pin # (or -1 if sharing Arduino reset pin) | |
#define SCREEN_ADDRESS 0x3C // See datasheet for Address; 0x3D for 128x64, 0x3C for 128x32 |
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
<ItemGroup> | |
<Content Include="file.txt" CopyToPublishDirectory="Always" /> | |
</ItemGroup> | |
this is not available through GUI |
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 integrated docker terminal or run bash like this: | |
docker exec -it CONTAINERID /bin/bash | |
# unzip and then use mbstream utility to extract data | |
cd /var/www/html/dbbackup/; | |
gunzip -c DB.gz | mbstream -x; | |
# restore db | |
cd /var/lib/mysql; | |
rm -r *; |
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
winget upgrade (optional) | |
winget upgrade -h --all |
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
mysql -uroot -p --default-character-set=utf8 | |
(enter password) | |
use "database-name"; | |
source /var/www/html/db.sql; |
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 incomingByte = 0; // for incoming serial data | |
const int ledPinRed = 2; // the number of the LED pin | |
const int ledPinGreen = 3; // the number of the LED pin | |
const int ledPinYellow = 4; | |
const int ledPinBlue = 5; | |
void setup() { | |
Serial.begin(9600); // opens serial port, sets data rate to 9600 bps | |
pinMode(ledPinRed, OUTPUT); | |
pinMode(ledPinGreen, OUTPUT); |
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 <U8g2lib.h> | |
#include <LM75A.h> | |
// Create display instance | |
U8G2_SSD1306_128X64_NONAME_1_HW_I2C u8g2(U8G2_R0); | |
// Create I2C LM75A instance | |
LM75A lm75a_sensor(false, false, false); | |
// temperature variable |