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
gpio.mode(1, gpio.OUTPUT) | |
gpio.mode(2, gpio.OUTPUT) | |
gpio.write(1, gpio.HIGH) | |
gpio.write(2, gpio.LOW) | |
synced=0 | |
timeset=0 | |
inchours=0 | |
timezone=1 -- range 1 - 25 |
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
#!/usr/bin/python -u | |
from bluepy.btle import Scanner, DefaultDelegate | |
import json | |
import subprocess | |
myDevices = [ | |
"f8:f6:98:d7:33:fd", #gas meter | |
"f8:6a:94:76:a3:76", #power meter | |
] |
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
#!/usr/bin/python2 | |
import email | |
import sys | |
import re | |
import shutil | |
import uuid | |
allowed = [ | |
"[email protected]", |
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
#!/usr/bin/python | |
import sys | |
import time | |
import os | |
bus = sys.argv[1] # /dev/i2c-X | |
addr = sys.argv[2] # 0x50 | |
filename = sys.argv[3] | |
offset = 0 |
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
#!/usr/bin/python | |
import os | |
import time | |
import re | |
import statistics | |
dev = os.open("/dev/pts/0",os.O_RDWR) | |
#flush buffer |
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
#!/usr/bin/env python | |
import socket | |
import binascii | |
import sys | |
def main(): | |
MCAST_GRP = sys.argv[1] | |
MCAST_PORT = int(sys.argv[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
SRC=$1 | |
DIR=$SRC.ext | |
mkdir $DIR | |
eval `fdisk -l $SRC | grep ^$SRC | awk '{ print "dd if='$SRC' bs=512 of='$DIR'/"$1" skip="$2" count="$4" ; "; }'` | |
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
/* | |
Program for decrypting Compal CH7465LG private key | |
Compilation: | |
gcc -o compal-decrypt compal-decrypt.c -lcrypto | |
Running: | |
./compal-decrypt | |
usage: ./compal-decrypt <infile> <outfile> | |
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
#if ITX_BOOT_TYPE == ITX_HOST_BOOT | |
#include <stdlib.h> | |
#include <stdio.h> | |
#include <string.h> | |
#include <stdint.h> | |
#include <arpa/inet.h> | |
/* magic file header for compressed files */ | |
static const unsigned char magic[4] = { 'S', 'M', 'A', 'Z' }; |
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
- .dockerignore | |
- dockerd - containerd - runc | |
https://github.com/kratochj/docker-advance-training-exercise | |
- CMD vs ENTRYPOINT | |
- signal handling |
OlderNewer