Skip to content

Instantly share code, notes, and snippets.

View sitedata's full-sized avatar
🎯
Focusing

Larry Johnson sitedata

🎯
Focusing
View GitHub Profile
#!/bin/bash
#
# A little Mastodon hygeine. Keeping the storage nice and tidy.
# Get to where the script needs to go
cd /home/mastodon/live/bin
# Clean out accounts that have never interacted with anyone on this instance.
RAILS_ENV=production /home/mastodon/live/bin/tootctl accounts prune
@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 / gist:5cb0db40e4465c854a5274b136db410f
Created August 24, 2022 20:21 — forked from spudbean/gist:1558257
Look of disapproval and other emoticons
ಠ_ಠ
( ͡° ͜ʖ ͡°)
¯\_(ツ)_/¯
(╯°□°)╯︵ ┻━┻
http://www.fileformat.info/convert/text/upside-down.htm
WRTTN http://wrttn.me/30dbfd/
Unicode Emoticons
@lukecav
lukecav / Commands
Created August 24, 2022 16:50
Install Redis in EasyApache 4 in cPanel running on CentOS 7
rpm -ivh https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
rpm -ivh http://rpms.famillecollet.com/enterprise/remi-release-7.rpm
yum -y install redis --enablerepo=remi --disableplugin=priorities
systemctl enable redis
systemctl start redis
@sitedata
sitedata / SplClassLoader.php
Created July 7, 2022 19:18 — forked from jwage/SplClassLoader.php
Add MIT license.
<?php
/*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
@sitedata
sitedata / dbt2.sh
Created April 29, 2022 05:23 — forked from BenMorel/dbt2.patch
Downloads and runs the DBT2 benchmark for MySQL.
#!/bin/sh
# Downloads and runs the DBT2 benchmark for MySQL.
# ================================================
#
# Tested with MySQL 8.0.17 - CentOS 8 - 2020-09-14
# Tested with MySQL 8.0.21 - Fedora 32 - 2020-09-14
#
# On a bare metal server, Xeon E5-1650v4 6x (12x HT) 3.60GHz, 64GB DDR4 2666, NVMe drive, with:
# - innodb_buffer_pool_size = 32GB
#!/bin/sh
for domainhash in `cat /etc/userdomains | grep "\." | sed 's/ //'`
do
read domain user <<<$(echo $domainhash | sed 's/:/ /');
find /home/${user}/mail/${domain}/*/.Trash/{cur,new,tmp}/ -type f | xargs -ifile rm -f file
find /home/${user}/mail/${domain}/*/.Junk/{cur,new,tmp}/ -type f | xargs -ifile rm -f file
done
#!/bin/sh
/sbin/modprobe nf_conntrack_ftp 2>&1 >/dev/null
IPTABLES='/sbin/iptables'
# policy
$IPTABLES -P INPUT DROP
$IPTABLES -P OUTPUT DROP
$IPTABLES -P FORWARD ACCEPT
$IPTABLES -F
$IPTABLES -X
$IPTABLES -Z
@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/
@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