Skip to content

Instantly share code, notes, and snippets.

@Averroes
Averroes / rename_vm.sh
Created December 20, 2019 21:47 — forked from skunkie/rename_vm.sh
Shell script to rename a virtual machine in VMware ESXi
#!/bin/sh
# shell script to rename a virtual machine in ESXi
VOLNAME=$1
DIRNAME=$2
OLDNAME=$3
NEWNAME=$4
VM_DIRPATH="/vmfs/volumes/$VOLNAME/$DIRNAME"
f_OK() {
@Averroes
Averroes / vm-rename
Created December 20, 2019 21:47 — forked from raarts/vm-rename
Script to rename a virtual machine in ESXi 6
#!/bin/sh
#
# shell script to rename a virtual machine in ESXi
#set -x
if [ $# -ne 4 ]; then
echo "Usage: $0 VOLNAME DIRNAME OLDNAME NEWNAME
where VOLNAME is the volume name, e.g. datastore1,
DIRNAME is the the name of the directory of the virtual machine,
@Averroes
Averroes / gist:fb3f9b0199cccc639e888c315b12cf8d
Last active December 20, 2019 09:28 — forked from jordelver/gist:3139365
How to write an image file to an SD card under Mac OS X (for Raspberry Pi)

Find the SD card device

In this case, the SD card is /dev/disk4. DO NOT get this wrong or you may destroy all the data on the wrong disk/card/drive.

diskutil list

/dev/disk0
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      GUID_partition_scheme                        *160.0 GB   disk0

1: EFI 209.7 MB disk0s1

@Averroes
Averroes / generate-ssh-key.sh
Last active December 11, 2019 08:02 — forked from grenade/01-generate-ed25519-ssh-key.sh
Correct file permissions for ssh keys and config.
ssh-keygen -t rsa -b 4096 -N '' -C "address@mail.com" -f ~/.ssh/id_rsa
ssh-keygen -t rsa -b 4096 -N '' -C "address@mail.com" -f ~/.ssh/github_rsa
ssh-keygen -t rsa -b 4096 -N '' -C "address@mail.com" -f ~/.ssh/mozilla_rsa
@Averroes
Averroes / 8x1080.md
Created April 7, 2019 18:32 — forked from epixoip/8x1080.md
8x Nvidia GTX 1080 Hashcat Benchmarks
(function (context, trackingId, options) {
const history = context.history;
const doc = document;
const nav = navigator || {};
const storage = localStorage;
const encode = encodeURIComponent;
const pushState = history.pushState;
const typeException = 'exception';
const generateId = () => Math.random().toString(36);
const getId = () => {
#!/bin/python
# -*- coding: utf-8 -*-
from time import sleep
from random import randint
from selenium import webdriver
from pyvirtualdisplay import Display
class MuncherySpider():
def __init__(self):
@Averroes
Averroes / .htaccess
Created August 27, 2018 08:12 — forked from seoagentur-hamburg/.htaccess
UPDATE 2018: Perfect .htaccess file for highspeed and security. You can use it for every WordPress-Website without problems. Highspeed and Security - testet on hundreds of Websites. If you are using a WordPress Multisite, change the last part of this file.
########################################################################
# OPTIMAL .htaccess FILE FOR SPEED AND SECURITY @Version 2018
########################################################################
# ----------------------------------------------------------------------
# Rewrite from HTTP to HTTPS - if you want to use it, comment it out
# ----------------------------------------------------------------------
cd /home/$user/public_html;
pwd;
wget http://wordpress.org/latest.zip;
unzip latest.zip;
mv ./wordpress/* ./ -f;
rm wordpress -rf;
cp wp-config-sample.php wp-config.php;
sed -i 's/database_name_here/'$user'/g' wp-config.php;
sed -i 's/username_here/'$user'/g' wp-config.php;
sed -i 's/password_here/'$password'/g' wp-config.php;
@Averroes
Averroes / Mautic New Admin - SQL Query
Last active November 23, 2018 14:01 — forked from ntorga/Mautic New Admin - SQL Query
Mautic New Admin - SQL Query
before :
php -r "echo password_hash('password', PASSWORD_BCRYPT, ['cost' => 13]);"
INSERT INTO `users` (`id`, `role_id`, `is_published`, `date_added`, `created_by`, `created_by_user`, `date_modified`, `modified_by`, `modified_by_user`, `checked_out`, `checked_out_by`, `checked_out_by_user`, `username`, `password`, `first_name`, `last_name`, `email`, `position`, `timezone`, `locale`, `last_login`, `last_active`, `online_status`, `preferences`)
VALUES
(2, 1, 1, '2015-04-01 15:15:07', 1, 'Nobody', NULL, NULL, NULL, NULL, NULL, NULL, 'madmin', '$2y$13$VkE7UjFetqAM13oT4v/VYOfRCGrJ4hbr0zuwRZo6KVfDnNb16WFwy', 'Administrator', 'Uuser', 'user@local.host', NULL, NULL, NULL, NULL, NULL, 'offline', 'N;');