H4sIAAA...
is the start of a base64-encoded gzipped string.
H4sI
H4sIA
H4sIAA
H4sIAAA
H4sIAAAA
H4sIAAAAA
H4sIAAAAAA
# A simple PowerShell script for retrieving the RAID status of volumes with help of diskpart. | |
# The nicer solution would be using WMI (which does not contain the RAID status in the Status field of Win32_DiskDrive, Win32_LogicalDisk or Win32_Volume for unknown reason) | |
# or using the new PowerShell API introduced with Windows 8 (wrong target system as our customer uses a Windows 7 architecture). | |
# | |
# diskpart requires administrative privileges so this script must be executed under an administrative account if it is executed standalone. | |
# check_mk has this privileges and therefore this script must only be copied to your check_mk/plugins directory and you are done. | |
# | |
# Christopher Klein <ckl[at]neos-it[dot]de> | |
# This script is distributed under the GPL v2 license. |
// keep N-day worth of data | |
var days=7; | |
// change to false to have the script to really exclude old records | |
// from the database. While true, no change at all will be made to the DB | |
var dryrun=true; | |
var now = new Date().getTime(), | |
time_criteria = now ; | |
time_criteria_in_seconds = time_criteria / 1000; |
<?php | |
$payload = 'hello world'; | |
$stream = stream_socket_client("tcp://127.0.0.1:5555", $errno, $errstr); | |
if (!$stream) { | |
echo "{$errno}: {$errstr}\n"; | |
die(); | |
} | |
fwrite($stream, $payload); | |
stream_socket_shutdown($stream, STREAM_SHUT_WR); |
MP3 header is 32 bits | |
0 1 2 3 | |
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 | |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | |
| sync word |V| L |E| rate |frq|P|R| mode |C|O|EM | | |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | |
sync word = 1111 1111 111x (x is zero for MPEG 2.5 VBR extension) | |
V (version) 1 = MPEG |
# https://stackoverflow.com/a/58255859/446106 | |
HOST=1.2.3.4 | |
FILE1=foo.txt | |
FILE2=bar.txt | |
# Running the server on your host: | |
python3 ./httpupload.py | |
# Download a file from your host: |
H4sIAAA...
is the start of a base64-encoded gzipped string.
H4sI
H4sIA
H4sIAA
H4sIAAA
H4sIAAAA
H4sIAAAAA
H4sIAAAAAA
#!/bin/sh | |
# https://redmine.pfsense.org/attachments/1440 | |
# curl -s https://gist.githubusercontent.com/countingpine/3556e5ee09d56465ca9da081e202f46b/raw/_update_oui.sh | sh | |
# | |
# Run me to update the file in the package repo. | |
# | |
OUI_URL=http://standards-oui.ieee.org/oui/oui.txt | |
OUI_FILE=/usr/local/share/nmap/nmap-mac-prefixes | |
#OUI_FILE=nmap-mac-prefixes | |
TEMP_FILE=/tmp/oui-prefixes.txt |
#!/bin/bash | |
# watch du output every 10s, return size in KB/MB/GB, difference in KB/MB | |
# (Assumes du output is in KB) | |
set -u | |
path="${1:-.}" | |
while du -s "$path"; do sleep 10; done | | |
awk '{printf "%dK\t%dM\t%dG\t+%dK\t+%dM\n", $1, $1/1024, $1/1048576, ($1-old), ($1-old)/1024 ; old = $1}' |
KBD English "United Kingdom - Apple" | |
COPYRIGHT "(c) 2010 Stephane Moreau" | |
COMPANY "Stephane Moreau" | |
LOCALENAME "en-GB" | |
LOCALEID "00000809" |
$ID = 123456789 | |
$PASSWORD = "%68%75%6e%74%65%72%32" | |
$DIR = $env:USERPROFILE | |
$WHATSMYIP_URL = "https://ifconfig.me/ip" | |
$oldip = (Get-Content "$DIR\ddns-publicip.txt") | |
$ip = (Invoke-RestMethod $WHATSMYIP_URL) | |
if ($ip -ne $oldip) { |