Skip to content

Instantly share code, notes, and snippets.

VboxManage.exe clonehd "E:\VirtualBox VMs\Win7\Win7.vdi" --existing "E:\VirtualBox VMs\Win7\News_Win7.vdi"
@githubcom13
githubcom13 / generate.php
Created April 19, 2016 21:27
PHP: CLI script that can also be run in a web browser
<?php
// I had a command line (CLI) script written in PHP that I wanted to be able to
// run via the web, to save having to open a terminal and SSH connection each
// time.
// First I had to modify the console script so it could output messages to
// either the console, using STDOUT or STDERR, or the web, which requires
// flushing the buffer each time:
@githubcom13
githubcom13 / README.TXT
Last active November 26, 2019 09:04
install Nginx 1.16, SSL Let's Encrypt for wildcard, PHP7.3 FPM 7.3.11, MySQL 8, PHPmyadmin 4.6, Postfix 3.4 on Ubuntu 19.10 x64 (Eoan Ermine)
install Nginx, SSL Let's Encrypt, PHP7.3, MySQL, PHPmyadmin, Postfix on Ubuntu 19.10 x64 (Eoan Ermine)
package version :
- nginx-extras 1.16.1
- php7.3 fpm 7.3.11
- mysql 8.0.18
- phpmyadmin 4.6.6-5
- postfix 3.4.5-1
- certbot
@githubcom13
githubcom13 / gist:db6ea52f45bd9b2205e600488bb964bc
Last active February 19, 2020 02:41
Command grep for extracting email addresses from big text files. You can pass it multiple files. Tested on large 190GB file (with 152,353,216 lines)
# split the file into a file of 50,000 lines.
split -b 50000 bigfile.txt
# OR split the file into a 100MB file.
split -b 100M bigfile.txt
# extract the email addresses contained in all the files of a directory
grep -r -E -h -o "[[:alnum:]+\.\_\-]*@[[:alnum:]+\.\_\-]*" /dir/* > emails.txt
# remove duplicates and sort order ASC
@githubcom13
githubcom13 / Protonmail.md
Last active March 28, 2025 10:44 — forked from ibaiul/Protonmail.md
Configure the protonmail bridge linux client on Ubuntu 20.04 and Debian 10 server

Protonmail on Ubuntu 20.04 and Debian 10 server

#protonmail #debian #linux

Before you start

Currently protonmail bridge for linux is distributed as part of an open beta program, but soon it will be made public (https://protonmail.com/bridge/install).

Consider that the bridge linux client requires a paid protonmail account to work.

Get the protonmail bridge linux installer

@githubcom13
githubcom13 / starUML.md
Created June 2, 2020 14:58 — forked from trandaison/starUML.md
Get full version of StarUML
@githubcom13
githubcom13 / agent.sh
Created June 8, 2020 19:16 — forked from tokyoneon/agent.sh
MyCC - turn MyBB forums into C&C servers
#!/bin/bash
# https://null-byte.com/turn-forums-into-c-c-servers-0196708/
while true; do
forumUser="tokyoneon";
username="[email protected]";
password="treHGFd76547^%$";
cookies='/tmp/forum_cookies';
function urlencode ()
@githubcom13
githubcom13 / gist:7bb60e0fb863de6151879e3f3f071336
Created June 10, 2020 16:39
Working with Email Addresses in SQL
/// QUERY - Checking if an email address if valid ///
SELECT email,
email REGEXP '^[A-Za-z0-9._%\-+!#$&/=?^|~]+@[A-Za-z0-9.-]+[.][A-Za-z]+$' AS valid_email
FROM email_table
/// RESULT ///
email | valid_email
After a reboot, i can no longer connect to my Debian 10 server in SSH.
I receive the following error message: Socket is closed: Socket closed by remote peer
The identifier/password are correct (i don't use a key), I tried with Putty, ZenTermLite and Filezilla clients in sFTP mode.
# log filezilla
Status: Connecting to xx.xx.xx.xx...
Response: fzSftp started, protocol_version=9
Command: open "[email protected]" 22
@githubcom13
githubcom13 / goaccess.service
Created June 16, 2020 14:07 — forked from virtualdreams/goaccess.service
goaccess systemd service
[Unit]
Description=Goaccess Web log report.
After=network.target
[Service]
Type=simple
User=root
Group=root
Restart=always
ExecStart=/usr/local/bin/goaccess -a -g -f /var/log/nginx/access.log -o /srv/www/goaccess/index.html --real-time-html --ws-url <your url>