This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
alter database "Standalone" | |
set single_user with rollback immediate | |
go | |
alter database "Standalone" modify name = "Standalone-suffix" | |
go | |
alter database "Standalone-suffix" | |
Set multi_user with rollback immediate | |
go |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
#Server hardening script for cPanel servers | |
# Make sure only root can run this script | |
if [ "$(id -u)" != "0" ]; then | |
echo -e "\e[93m This script must be run as root \e[0m" | |
exit 1 | |
fi | |
echo -e "\e[1;36;40m Server Hardening initiated \e[0m" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
server { | |
listen 80; | |
listen 443 ssl; | |
server_name localhost; | |
ssl_certificate /etc/nginx/ssl/nginx.crt; | |
ssl_certificate_key /etc/nginx/ssl/nginx.key; | |
#charset koi8-r; | |
#access_log /var/log/nginx/host.access.log main; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace App\Console\Commands; | |
use Illuminate\Console\Command; | |
class EnsureQueueListenerIsRunning extends Command | |
{ | |
/** | |
* The name and signature of the console command. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<Response> | |
<Say loop=10 voice="woman">Zabbix server could not be reached.</Say> | |
</Response> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
install i3 (and therefore x) | |
install alsa and pulse (wasn't working immediately, did after | |
restart [really should learn how it's supposed to work at | |
some point]) | |
add script (audioCtrls.sh) for vol up/down and mute | |
bind buttons to script (in ~/.config/i3/config) | |
bindsym XF86AudioRaiseVolume exec ~/.scripts/audioCtrls.sh up | |
bindsym XF86AudioLowerVolume exec ~/.scripts/audioCtrls.sh down | |
bindsym XF86AudioMute exec ~/.scripts/audioCtrls.sh mute |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
RewriteEngine On | |
RewriteBase / | |
# Remove .php extension | |
RewriteCond %{THE_REQUEST} ^GET\ /[^?\s]+\.php | |
RewriteRule (.*)\.php$ /$1/ [L,R=301] | |
RewriteCond %{REQUEST_FILENAME} !-f | |
RewriteCond %{REQUEST_FILENAME} !-d | |
RewriteCond %{REQUEST_URI} ^/(.+)/$ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
useradd -c"Matt Butler" -Gwheel -m matt | |
# install ssl key for authentication | |
visudo # change wheel to allow nopassword | |
vim /etc/ssh/sshd_config # add "PermitRootLogin no" | |
yum install vim-enhanced | |
yum install git | |
yum install epel-release |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* UUID class | |
* | |
* The following class generates VALID RFC 4122 COMPLIANT | |
* Universally Unique IDentifiers (UUID) version 3, 4 and 5. | |
* | |
* UUIDs generated validates using OSSP UUID Tool, and output | |
* for named-based UUIDs are exactly the same. This is a pure | |
* PHP implementation. |