Skip to content

Instantly share code, notes, and snippets.

View timypcr's full-sized avatar

Tim DeBarbora timypcr

View GitHub Profile
@timypcr
timypcr / jail_archive.sh
Created August 5, 2020 18:08
ezjail-archive
echo "archiving ypcr jail"
ezjail-admin stop ypcr
ezjail-admin archive -d /backup ypcr
ezjail-admin start ypcr
echo "ypcr jail archive complete"
echo "archiving ngam jail"
ezjail-admin stop ngam
ezjail-admin archive -d /backup ngam
ezjail-admin start ngam
@timypcr
timypcr / debug
Created July 27, 2020 14:30
wp-config.php
/**
* For developers: WordPress debugging mode.
*
* Change this to true to enable the display of notices during development.
* It is strongly recommended that plugin and theme developers use WP_DEBUG
* in their development environments.
*
* For information on other constants that can be used for debugging,
* visit the Codex.
*
@timypcr
timypcr / dns update script
Created May 29, 2020 17:03
replace google DNS with what ever
:: Set primary and alternate DNS for IPv4 on Windows Server 2000/2003/2008 &
:: Windows XP/Vista/7/8/10
@ECHO OFF
SETLOCAL EnableDelayedExpansion
SET adapterName=
FOR /F "tokens=* delims=:" %%a IN ('IPCONFIG ^| FIND /I "ETHERNET ADAPTER"') DO (
SET adapterName=%%a
upstream ypcr {
server 192.168.4.120:8114;
# server 192.168.4.116:8686;
# server 192.168.4.112;
}
server {
@timypcr
timypcr / no dice
Last active May 8, 2020 23:26
tried these individually
location /helpdesk {
return 302 helpdesk.example.com;
}
upstream integrity {
server 192.168.4.224:8486;
}
server {
listen 80;
@timypcr
timypcr / Freebsd pkgng error
Created April 17, 2020 13:34
Freebsd 11.3-release
# pkg upgrade
Updating FreeBSD repository catalogue...
pkg: repository meta /var/db/pkg/FreeBSD.meta has wrong version 2
pkg: Repository FreeBSD load error: meta cannot be loaded No error: 0
[integrity] Fetching meta.txz: 100% 916 B 0.9kB/s 00:01
pkg: repository meta /var/db/pkg/FreeBSD.meta has wrong version 2
repository FreeBSD has no meta file, using default settings
[integrity] Fetching packagesite.txz: 100% 6 MiB 932.6kB/s 00:07
pkg: repository meta /var/db/pkg/FreeBSD.meta has wrong version 2
pkg: Repository FreeBSD load error: meta cannot be loaded No error: 0
/usr/local/bin/certbot renew --quiet --post-hook "apachectl graceful
@timypcr
timypcr / httpd.com for blog
Last active March 10, 2020 02:44
vhost for apache
ServerName domain.com
ServerAlias www.domain.com
DocumentRoot /usr/local/www/domain
Redirect permanent / https://www.domain.com/
ServerAdmin youremail@emailser.com
# Directory for the file stored
DocumentRoot "/usr/local/www/domain"
#Domain
ServerName domain.com
upstream roane {
server 192.168.4.110:8485;
}
server {
listen 80;
server_name www.roanesrigging.com roanesrigging.com;
error_log /var/log/nginx/nginxreports.log warn;