Skip to content

Instantly share code, notes, and snippets.

deb http://deb.debian.org/debian stretch main contrib non-free
deb-src http://deb.debian.org/debian stretch main contrib non-free
deb http://deb.debian.org/debian stretch-updates main contrib non-free
deb-src http://deb.debian.org/debian stretch-updates main contrib non-free
deb http://security.debian.org/debian-security/ stretch/updates main contrib non-free
deb-src http://security.debian.org/debian-security/ stretch/updates main contrib non-free
fcMoKcUpYaFbZXUh7PYnbwwKuKr1dBaWaLF
@huglester
huglester / win10-setup.txt
Last active March 6, 2018 15:29
win10.setup
# https://github.com/Disassembler0/Win10-Initial-Setup-Script/blob/master/Win10.ps1
# run:
# powershell.exe -NoProfile -ExecutionPolicy Bypass -File Win10.ps1 -preset win10-setup.txt
### Privacy Settings ###
DisableTelemetry
DisableWiFiSense
DisableSmartScreen
DisableWebSearch
DisableAppSuggestions
DisableBackgroundApps
@huglester
huglester / HLS_dvr.sh
Created January 9, 2017 14:01 — forked from John07/HLS_dvr.sh
A small script to make recording http live streams (HLS, those streams that work on iOS devices) nicer on a Mac. Script records the stream for a defined period of time and sends the user notifications if anything goes wrong and once it's done.
# required: ffmpeg (e.g. from homebrew), terminal-notifier from https://github.com/alloy/terminal-notifier
# you can schedule this with launchd to run e.g. weekly
# Specify in seconds how long the script should record (default here is 1 hour).
seconds=3600
# Date format for the recording file name
DATE=`date "+%d-%m-%y_%H-%M"`
# start ffmpeg recording
@huglester
huglester / ssl.php
Created July 4, 2016 20:53
SSL verify
<?php
$g = stream_context_create (array("ssl" => array("capture_peer_cert" => true)));
$r = stream_socket_client("tls://www.google.com:8080", $errno, $errstr, 30,
STREAM_CLIENT_CONNECT, $g);
$cont = stream_context_get_params($r);
var_dump($cont["options"]["ssl"]["peer_certificate"]);
@huglester
huglester / mac_address_change.sh
Created June 26, 2016 13:37
MAC address changer for MacOSX
#!/bin/bash
ORIGINAL_MAC="00:11:22:33:44:55"
RANDOM_MAC=`openssl rand -hex 6 | sed 's/\(..\)/\1:/g; s/.$//'`
INTERFACE=en0
MAC=$RANDOM_MAC
if [ "$1" = "original" ]; then
MAC=$ORIGINAL_MAC
fi
@huglester
huglester / transfer
Created March 1, 2016 19:11
This little bash scripts allows you to transfer DirectAdmin accounts to a new server. It first checks if the account is already backed up or installed on the new server (for security). If not existing on the new server, it starts the backup and waits for it to finish. Once finished, it will copy the backup to the new server and starts the restore.
#!/bin/bash
password="******"
target="127.0.0.1"
if [ -z "$1" ]; then
echo "Please give me the account to backup. ";
exit 0
fi
yum remove samba-client samba-common samba-libs libsmbclient libwbclient httpd
yum install nano mc postfix yum-cron
@huglester
huglester / gist:83deb96f79195f8bcd92
Last active September 30, 2017 16:46
ElCapitan PHP 5.6 installer (with OpenSSL support)
brew install mc wget httpie mcrypt icu4c
# install homebrew cURL with OpenSSL
brew install curl --with-libssh2 --with-openssl --with-nghttp2
# Install php with OpenSSL instead of SecureTransport
brew install php56 --with-fpm --with-homebrew-curl --with-homebrew-libxslt --with-homebrew-openssl --without-snmp
brew install php56-mcrypt
brew install php56-intl
@huglester
huglester / ffmpeg_compile.sh
Created November 1, 2015 15:44
Compile FFMPEG with ffplay support on Ubuntu 14.04 LTS
sudo apt-get install libsdl-dev yasm
git clone git://source.ffmpeg.org/ffmpeg.git ffmpeg
cd ffmpeg
./configure
make