Skip to content

Instantly share code, notes, and snippets.

View aquatix's full-sized avatar

Michiel Scholten aquatix

View GitHub Profile
@T3chArmy
T3chArmy / readme
Last active March 29, 2019 10:09 — forked from lowjoel/sleepbot-migrate-to-sleep_as_android.rb
Migrates SleepBot data to Sleep as Android's format. Updated!
When exporting from mysleepbot.com:
-go to settings
-Change Date Format to Day/Month/Year
-Change Time Format to 24 hours
-Go to Entries
-Select from date that is older than your first sleepbot entry
-Select to date as todays date
-Export as CSV name file sleepbot-raw.csv
-Edit file and remove the first line and also do a find & replace and remove all 's from the file
#!/bin/bash
if [ "$1" != "" ]; then
nice -20 ocrmypdf --redo-ocr --pdfa-image-compression lossless --output-type pdfa-2 "$1" "$1"
else
echo "No filename given"
fi
#!/system/bin/sh
APIKEY=get this from syncthing config
# wait for service to start
retries=5
while ! curl -s -L -k -X GET -H "X-API-Key: $APIKEY" "http://localhost:8384/rest/system/ping"
do
sleep 1
if test $retries -eq 0; then
@johanndt
johanndt / upgrade-postgres-9.3-to-9.5.md
Last active July 15, 2022 12:35 — forked from dideler/upgrade-postgres-9.3-to-9.4.md
Upgrading PostgreSQL from 9.3 to 9.5 on Ubuntu

TL;DR

Install Postgres 9.5, and then:

sudo pg_dropcluster 9.5 main --stop
sudo pg_upgradecluster 9.3 main
sudo pg_dropcluster 9.3 main
@golles
golles / 1. Mechanische ventilatie in Home Assistant.md
Last active April 14, 2023 07:47
Mechanische ventilatie in Home Assistant

Allereerst bedankt @eelcohn voor je prachtige project --> https://github.com/eelcohn/nRF905-API

Als je packages gebruikt, zou het makkelijk zijn om dit te kopieren naar jouw HA. Anders zou je de elementen in zehnder.yaml handmatig moeten kopieren naar je configuration.yaml.

Hoe werkt het?

Een rest sensor (sensor.mechanische_ventilatie_status) haalt de data van de api en een fan template maakt er vervolgens een fan entity van (fan.mechanische_ventilatie). Op deze manier krijg je out of the box een speed list in lovelace en bijbehorende services.

De individuele rest commands worden gewrapt door scripts, dit zodat de host uit secrets kan komen, helaas is er geen manier om een secret in een template toe te passen. Fan templates moeten verplicht een turn_on en turn_off hebben, dit heeft de mechanische ventilatie niet, nu roepen deze acties een dummy script ventilation_turn_on_off_dummy aan die niks doet (als ieman

WannaCry|WannaDecrypt0r NSA-Cyberweapon-Powered Ransomware Worm

  • Virus Name: WannaCrypt, WannaCry, WanaCrypt0r, WCrypt, WCRY
  • Vector: All Windows versions before Windows 10 are vulnerable if not patched for MS-17-010. It uses EternalBlue MS17-010 to propagate.
  • Ransom: between $300 to $600. There is code to 'rm' (delete) files in the virus. Seems to reset if the virus crashes.
  • Backdooring: The worm loops through every RDP session on a system to run the ransomware as that user. It also installs the DOUBLEPULSAR backdoor. It corrupts shadow volumes to make recovery harder. (source: malwarebytes)
  • Kill switch: If the website www.iuqerfsodp9ifjaposdfjhgosurijfaewrwergwea.com is up the virus exits instead of infecting the host. (source: malwarebytes). This domain has been sinkholed, stopping the spread of the worm. Will not work if proxied (source).

update: A minor variant of the viru

@niksumeiko
niksumeiko / disable-html-form-input-autocomplete-autofill.md
Last active March 28, 2024 04:41
Disable HTML form input autocomplete and autofill

Disable HTML Form Input Autocomplete and Autofill

  1. Add autocomplete="off" onto <form> element;
  2. Add hidden <input> with autocomplete="false" as a first children element of the form.
<form autocomplete="off" method="post" action="">
    <input autocomplete="false" name="hidden" type="text" style="display:none;">
    ...