#Git - Cheatsheet
###Create Repo
git init
###Fork (Copy) existing Repo
git clone repo name
###Branching You should create a branch per feature. Create a branch.
| version: "3.8" | |
| # Before you run the containers add the network using | |
| # docker network create main | |
| networks: | |
| main: | |
| external: true | |
| volumes: | |
| acme-certs: |
| blueprint: | |
| name: Offline detection for Z2M devices with last_seen | |
| description: Regularly test all sensors with 'last_seen' in name and 'timestamp' device_class | |
| ('last seen' Z2M sensors) to detect offline and if so execute an action. | |
| domain: automation | |
| input: | |
| hours: | |
| name: Hours not seen | |
| description: Sensors not seen this amount of time are assumed to be offline. | |
| default: 24 |
| #!/usr/bin/python3 | |
| # Author: ceres-c 2019-12-29 | |
| # Authenticate to ICODE SLI tags | |
| import hid | |
| # Global defines & commands | |
| password = [0x00, 0x00, 0x00, 0x00] # You have to find it yourself, try to search online in german ;-) |
| #! /bin/bash | |
| # NEWLY ADDED BACKUP FUNCTIONALITY IS NOT FULLY TESTED YET, USE WITH CARE, ESPECIALLY DELETION | |
| # Developed for DSM 6 - 7.0.1. Not tested on other versions. | |
| # Steps to install | |
| # Save this script in one of your shares | |
| # Edit it according to your requirements | |
| # Backup /usr/syno/share/nginx/ as follows: | |
| # # cd /usr/syno/share/ | |
| # # tar cvf ~/nginx.tar nginx |
| #!/usr/bin/python3 | |
| # | |
| # Simple Bloom filter implementation in Python 3 | |
| # Copyright 2017 Hector Martin "marcan" <marcan@marcan.st> | |
| # Licensed under the terms of the MIT license | |
| # | |
| # Written to be used with the Have I been pwned? password list: | |
| # https://haveibeenpwned.com/passwords | |
| # | |
| # Download the pre-computed filter here (968MB, k=11, false positive p=0.0005): |
| #!/bin/bash | |
| SERIAL="00000000" | |
| echo "Looking for device with serial $SERIAL..." | |
| for d in /sys/bus/usb/devices/*-*; do | |
| if [[ -f "$d/serial" ]]; then | |
| serial=$(<"$d/serial") | |
| if [[ "$serial" = "$SERIAL" ]]; then | |
| device="$(basename $d)" |
| Option Explicit | |
| Dim WithEvents myOlExp As Outlook.Explorer ' <=== | |
| Dim WithEvents objInspectors As Outlook.Inspectors | |
| Dim WithEvents objOpenInspector As Outlook.Inspector | |
| Dim WithEvents objMailItem As Outlook.MailItem | |
| Private Sub Application_Startup() | |
| Set objInspectors = Application.Inspectors |
| # Compiled source # | |
| ################### | |
| *.com | |
| *.class | |
| *.dll | |
| *.exe | |
| *.o | |
| *.so | |
| # Packages # |
#Git - Cheatsheet
###Create Repo
git init
###Fork (Copy) existing Repo
git clone repo name
###Branching You should create a branch per feature. Create a branch.
| <?php | |
| header("Cache-Control: no-cache, must-revalidate"); | |
| header("Expires: Sat, 26 Jul 1997 05:00:00 GMT"); | |
| header("Pragma: no-cache"); | |
| function human_filesize($bytes, $decimals = 2) { | |
| $sz = 'BKMGTP'; | |
| $factor = floor((strlen($bytes) - 1) / 3); | |
| return sprintf("%.{$decimals}f", $bytes / pow(1024, $factor)) . @$sz[$factor]; | |
| } |