Skip to content

Instantly share code, notes, and snippets.

@robetus
robetus / generator.php
Created December 5, 2022 10:11 — forked from Fedcomp/generator.php
IPV6 generator
<?php
$filename = "ip.list";
$prefix = "2a04:5200:8";
function generate_ipv6($prefix){
function generate_ipv6_block() {
$seed = str_split('1234567890abcdef');
shuffle($seed);
$block = join("", $seed); // Symbol array to string
$block = substr($block, 0, 4);
@robetus
robetus / schema.sql
Created March 30, 2018 11:41 — forked from alexdo/schema.sql
PowerDNS/Poweradmin/Pdnsmanager SQL Schema
-- Create syntax for TABLE 'comments'
CREATE TABLE `comments` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`domain_id` int(11) NOT NULL,
`name` varchar(255) NOT NULL,
`type` varchar(10) NOT NULL,
`modified_at` int(11) NOT NULL,
`account` varchar(40) NOT NULL,
`comment` mediumtext NOT NULL,
PRIMARY KEY (`id`),
@robetus
robetus / generateWhmcsUuids.php
Last active September 7, 2020 07:01 — forked from klaude/generateWhmcsUuids.php
WHMCS UUID Generator for clients and admins. Tested working on WHCMS 7.4.1
<?php
/**
* Generate uuids for clients and admins that don't have uuids set.
*
* The WHMCS 7.4.1 update process automatically inserts uuids, but if your
* installation bypasses WHMCS update routines then this will generate uuids for
* the client and admin users that don't have one yet.
*
* Warning! Please back up at least your tblclient and tbladmin tables before
* running this!
@robetus
robetus / gist:8afa0889f4d03b5ef03a2669bb4f3f49
Created October 2, 2017 20:21 — forked from mnathani/gist:27754bd2eb6cceefcc57
ARP Networks Routed /48 IPv6 configuration on CentOS 6
contents of /etc/sysconfig/network-scripts/ifcfg-eth0:
4 Public IPv6 addresses configured:
DEVICE="eth0"
BOOTPROTO="static"
BROADCAST="206.162.240.71"
DNS1="8.8.8.8"
GATEWAY="206.162.240.65"
HWADDR="52:54:00:8C:36:36"
@robetus
robetus / nginx-tuning.md
Created September 25, 2017 10:24 — forked from denji/nginx-tuning.md
NGINX tuning for best performance

NGINX Tuning For Best Performance

For this configuration you can use web server you like, i decided, because i work mostly with it to use nginx.

Generally, properly configured nginx can handle up to 400K to 500K requests per second (clustered), most what i saw is 50K to 80K (non-clustered) requests per second and 30% CPU load, course, this was 2 x Intel Xeon with HyperThreading enabled, but it can work without problem on slower machines.

You must understand that this config is used in testing environment and not in production so you will need to find a way to implement most of those features best possible for your servers.

@robetus
robetus / no_admin_confirm.php
Created September 22, 2017 22:46 — forked from jclarke/no_admin_confirm.php
Disables the confirm password feature in the WHMCS admin area. Place in includes/hooks
<?php
add_hook('AdminLogin', 1, function($vars) {
$_SESSION["AuthConfirmationTimestamp"] = \Carbon\Carbon::now()->timestamp;
});
add_hook('AdminAreaHeadOutput', 1, function($vars) {
$_SESSION["AuthConfirmationTimestamp"] = \Carbon\Carbon::now()->timestamp;
return '
<script type="text/javascript">
$(document).ready(function(){
@robetus
robetus / 20-3proxy.conf
Created March 20, 2017 01:40 — forked from YannRobert/20-3proxy.conf
working 3proxy configuration for a personal usage proxy
# /etc/fail2ban/jail.d/20-3proxy.conf
[3proxy]
enabled = true
filter = 3proxy
action = iptables[name=3proxy, port=3128, protocol=tcp]
logpath = /var/log/3proxy/3proxy.log*
maxretry = 3
bantime = 3600 ; 1 hour
findtime = 3600 ; 1 hour
@robetus
robetus / README.md
Created November 23, 2016 00:06 — forked from gbraad/README.md
Install TripleO on baremetal using Quickstart

Install TripleO on baremetal using Quickstart

This gist contains the files and scripts used to deploy to baremetal. Be aware deploy.sh wasn't really used in this way. The steps were actually performed from an interactive session (due to issues with the overcloud loosing connectivity).

The undercloud image needs to be build or download and stored in /var/lib/oooq-images/.