Skip to content

Instantly share code, notes, and snippets.

View scottclaeys's full-sized avatar
🆕
Updating cloud/VPS API module

Scott Claeys scottclaeys

🆕
Updating cloud/VPS API module
View GitHub Profile
@scottclaeys
scottclaeys / virtualizor-welcome-email.txt
Last active October 5, 2022 19:11 — forked from sclaeys/virtualizor-welcome-email.txt
Text file containing html source of a VPS welcome email template (for WHMCS)
<p>Dear {$client_name},</p>
<p><strong>PLEASE PRINT THIS MESSAGE FOR YOUR RECORDS – PLEASE READ THIS EMAIL IN FULL.</strong></p>
<p>We are pleased to inform you that the VPS you ordered has been set up.</p>
<p><strong>Server Details<br /></strong>=============================</p>
<p>{$service_product_name} - <a title="Manage {$service_product_name}" href="{$whmcs_url}clientarea.php?action=productdetails&id={$service_id}" target="_blank" rel="noopener">Click to Manage</a></p>
<p>ServerName: {$service_domain}<br />Main IP: {$service_dedicated_ip}<br />Root pass: {$service_password}<br />{if $service_assigned_ips} IP Address Allotted: {$service_assigned_ips} {/if}</p>
<p><strong>Client Area<br /></strong>=============================</p>
<p>Manage Service from Client Area: <a href="{$whmcs_url}clientarea.php?action=productdetails&id={$service_id}">Click Here</a></p>
<p><strong>Manager Details<br /></strong>=============================</p>
<p>URL: <a>https://{$service_server_hostname}:4083</a><br />Username: {$s
@sclaeys
sclaeys / virtualizor-welcome-email.txt
Created September 1, 2022 15:42
Text file containing html source of a VPS welcome email template (for WHMCS)
<p>Dear {$client_name},</p>
<p><strong>PLEASE PRINT THIS MESSAGE FOR YOUR RECORDS – PLEASE READ THIS EMAIL IN FULL.</strong></p>
<p>We are pleased to inform you that the VPS you ordered has been set up.</p>
<p><strong>Server Details<br /></strong>=============================</p>
<p>{$service_product_name} - <a title="Manage {$service_product_name}" href="{$whmcs_url}clientarea.php?action=productdetails&amp;id={$service_id}" target="_blank" rel="noopener">Click to Manage</a></p>
<p>ServerName: {$service_domain}<br />Main IP: {$service_dedicated_ip}<br />Root pass: {$service_password}<br />{if $service_assigned_ips} IP Address Allotted: {$service_assigned_ips} {/if}</p>
<p><strong>Client Area<br /></strong>=============================</p>
<p>Manage Service from Client Area: <a href="{$whmcs_url}clientarea.php?action=productdetails&id={$service_id}">Click Here</a></p>
<p><strong>Manager Details<br /></strong>=============================</p>
<p>URL: <a>https://{$service_server_hostname}:4083</a><br />Username:
@sitedata
sitedata / start.sh
Created June 30, 2022 21:44 — forked from NiKiZe/start.sh
Filter and route on hostname using SNI
#!/bin/bash
# Filter and route on hostname using SNI
# https://github.com/Lochnair/xt_tls/issues/52
# This creates iptables rules and ip rules to filter and route HTTPS traffic based on hostname in SNI field
# Some links on why packets might be droped, see rp_filter below
# https://serverfault.com/questions/934848/ip-rule-to-works-but-ip-rule-fwmark-fails-why
# https://serverfault.com/questions/932205/advanced-routing-with-firewall-marks-and-rp-filter
# https://serverfault.com/questions/816393/disabling-rp-filter-on-one-interface
@sitedata
sitedata / backup.sh
Created June 30, 2022 21:44 — forked from NiKiZe/backup.sh
Linux system backup
# from https://wiki.archlinux.org/title/Full_system_backup_with_tar
# -p, --acls and --xattrs store all permissions, ACLs and extended attributes.
# Without both of these, many programs will stop working!
# It is safe to remove the verbose (-v) flag. If you are using a
# slow terminal, this can greatly speed up the backup process.
#--exclude-from=$exclude_file
tar --exclude=/tmp/* --exclude=/var/tmp/* --exclude=/usr/portage/* --acls --xattrs --one-file-system -cpvf - . | xz -zvv -T3 -0 > file.xz
restore:
xz | tar --acls --xattrs --numeric-owner -xpf -
@sitedata
sitedata / .htaccess
Created April 14, 2021 05:07 — forked from ScottPhillips/.htaccess
Common .htaccess Redirects
#301 Redirects for .htaccess
#Redirect a single page:
Redirect 301 /pagename.php http://www.domain.com/pagename.html
#Redirect an entire site:
Redirect 301 / http://www.domain.com/
#Redirect an entire site to a sub folder
Redirect 301 / http://www.domain.com/subfolder/
@sitedata
sitedata / gist:c1682a2d8071f5b2c35ed547e12272a7
Created April 14, 2021 02:07
blog.sitedata.org/.htaccess
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
# set some environment variables depending on host
RewriteRule .* - [E=ENVIRONMENT:prod]
RewriteCond %{HTTP_HOST} ^sitedata.org [NC]
RewriteRule .* - [E=ENVIRONMENT:prod]
RewriteCond %{HTTP_HOST} ^blog.sitedata.org [NC]
RewriteRule .* - [E=ENVIRONMENT:dev]
@chase2981
chase2981 / rxjs-diagrams.md
Created April 13, 2021 18:44 — forked from PCreations/rxjs-diagrams.md
Super Intuitive Interactive Diagrams to learn combining RxJS sequences by Max NgWizard K
@sitedata
sitedata / supermicro-ipmi-mac-address.md
Created May 3, 2020 08:49 — forked from DavidWittman/supermicro-ipmi-mac-address.md
Pull the LAN1/eth0 MAC address from SuperMicro IPMI

You can find the MAC address for LAN1/eth0 (not the BMC MAC) via the SuperMicro IPMI interface by running the following command:

$ ipmitool -U $IPMI_USER -P $IPMI_PASS -H $IPMI_HOST raw 0x30 0x21 | tail -c 18

The eth0 MAC address will be output in this format:

00 25 90 f0 be ef
const $ = cheerio.load(pm.response.text());
let siteName = $('.top > .action-post-job').text();
var things1 = [];
var things2 = [];
$('table#jobsboard tr.job').each((index,element) => {
things1.push({
@sitedata
sitedata / temporary-email-address-domains
Created November 28, 2019 03:51 — forked from adamloving/temporary-email-address-domains
A list of domains for disposable and temporary email addresses. Useful for filtering your email list to increase open rates (sending email to these domains likely will not be opened).
0-mail.com
0815.ru
0clickemail.com
0wnd.net
0wnd.org
10minutemail.com
20minutemail.com
2prong.com
30minutemail.com
3d-painting.com