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
esphome: | |
name: esphome-eink-01 | |
on_boot: | |
priority: 700 | |
then: | |
- delay: 3sec | |
- component.update: my_display | |
- delay: 200ms | |
- component.update: my_display | |
- delay: 200ms |
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
import time | |
import random | |
import string | |
import bcrypt | |
import hashlib | |
# Function to generate random string | |
def get_random_string(chars, length): | |
return ''.join(random.choice(chars) for _ in range(length)) |
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
# How to add your FVE (PhotoVoltaicPlant) to the sunnymap.net with: | |
# * HomeAssistant | |
# * REST API | |
# * GoodWe integration | |
# | |
# First: register your FVE and get API key via: https://sunnymap.net/token_request | |
# Second: edit the files: configuration.yaml, automations.yaml | |
# Third: in Developers Tools (/developer-tools/yaml): | |
# - check the configuration | |
# - restart configuration |
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
for i in $(ls -1); { echo $i; (cd $i; for ff in * ; { aa=$((aa+1)) ; mv "$ff" ${i}-${aa}.jpg } ) } |
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 <stdio.h> | |
#include <stdlib.h> | |
// Dobblo generator | |
// Here is a C code inspired from @karinka's answer with a different arrangement of symbols. | |
// https://math.stackexchange.com/questions/1303497/what-is-the-algorithm-to-generate-the-cards-in-the-game-dobble-known-as-spo | |
// | |
// It works for n being a prime number (2, 3, 5, 7, 11, 13, 17, ...). | |
// | |
// Number of symbols in a given card = n+1 | |
// Total number of cards = n^2 + n + 1 |
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
Terminal: | |
sudo apt install pst-utils | |
mkdir migrated-emails | |
readpst -o ./migrated-emails -M -u -w -e -b outlook.pst | |
Thunderbird: | |
1. install "ImportExportTools NG" add on | |
2. make new folder "MigratedEmails" in Thunderbird - preferably in "Lofal Folders" | |
3. right click on MigratedEmails folder -> ImportExportTools NG | |
-> import all messages from a directory |
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
python -c "import random,string,crypt; | |
randomsalt = ''.join(random.sample(string.ascii_letters,8)); | |
print crypt.crypt('MySecretPassword', '\$6\$%s\$' % randomsalt)" | |
# $6$glmhpDPn$TnHWDtgh9ATjfUfEGUPoiFq1wATR0aHmDtDWaDOZWJmtDVsgsqmMriUQNcdV2pR1kA6tYQTIfMOYubdgBStEx. |
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
python -c "import random,string,crypt; not_so_randomsalt = 'synergy'; | |
print crypt.crypt('', '\$1\$%s\$' % not_so_randomsalt)" | |
$1$synergy$O31nVEgYyKUdmjDRPUq8p. |
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
adb devices | |
echo "Wait at least 10secs and use the Android screen" | |
adb shell screenrecord --output-format=h264 - | ffplay -probesize 1M - |
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 <stdio.h> | |
#include <stdlib.h> | |
// from http://www.thelinuxrain.com/articles/bash-drivers-start-your-engines | |
// C version is about 2-4 times faster than perl version. | |
int main (int argc, char *argv[]) | |
{ | |
if (argc != 2){ | |
printf("Usage: %s filename\n", argv[0]); |
NewerOlder