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
#!/usr/bin/perl | |
# Simple script to cleanup mysql binlogs if you start running out of diskspace. | |
# Running out of diskspace is fatal on a mysql database. But you also want to keep as many binlogs as possible, so when your replication dies | |
# you have time to fix it. This script will delete all logs except 2 if disk space free falls below 6% | |
# | |
# has a few dependencies : to install on debian(ish) systems: | |
# apt-get install libfilesys-diskspace-perl libmime-lite-perl libdbd-mysql | |
# | |
# Add this to cron with something like: |
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 | |
# Database backup script | |
# | |
#Large tables - we only keep one copy of these | |
export mysql_large_tables="track_page track_visit emails_message_body emails_message_body_new" | |
export dumpopts=" --single-transaction --max_allowed_packet=32M --compact " | |
export mysqldump="mysqldump -Q $dumpopts" | |
export backup_root='/srv/backup/temp-databases' | |
export ldap_dumpall="/usr/sbin/slapcat" |
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
#Replace $SITE and $CONTENT | |
sshz-site $SITE | |
echo -n $CONTENT > pages/fileauth.txt.html | |
#eg | |
#sshz-site zeald | |
#echo -n 201709190334595r84u8lue4jgdynncckpw7pruhtmj0vrzjtgnm4bgongfb2gc9 > pages/fileauth.txt.html |
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
<?xml version="1.0" encoding="utf-8"?> | |
<key name="Software"> | |
<key name="ConEmu"> | |
<key name=".Vanilla" modified="2017-10-28 10:57:45" build="170910"> | |
<value name="StartType" type="hex" data="02"/> | |
<value name="CmdLine" type="string" data=""/> | |
<value name="StartTasksFile" type="string" data=""/> | |
<value name="StartTasksName" type="string" data="{Default Split}"/> | |
<value name="StartFarFolders" type="hex" data="00"/> | |
<value name="StartFarEditors" type="hex" data="00"/> |
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
#!/usr/bin/perl | |
use Net::SMTP; | |
$smtp = Net::SMTP->new($ARGV[0], | |
Hello => 'myserver.app', | |
Timeout => 60, | |
Debug =>1); | |
$smtp->mail('root@myserver.app'); | |
if ($smtp->to('somthing@example.com')) { | |
$smtp->data; |
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/sh | |
# Copyright 1999-2005 Gentoo Foundation | |
# Copyright 2007 Aron Griffis <agriffis@n01se.net> | |
# Copyright 2009-2010 Funtoo Technologies, LLC | |
# lockfile() Copyright 2009 Parallels, Inc. | |
# Distributed under the terms of the GNU General Public License v2 | |
# Originally authored by Daniel Robbins <drobbins@gentoo.org> |
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
#To run this add something like this to your Vagrantfile: | |
# | |
# | |
# config.vm.provision "shell", inline: <<-SHELL | |
# #Install LAMP stack | |
# export VAGRANT_DIR=/vagrant | |
# curl https://gist.githubusercontent.com/jonathonsim/ac13a63a38ffdbe831246ab809d97158/raw/ | bash | |
# SHELL | |
# | |
# |
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
{ | |
"Version": "2012-10-17", | |
"Statement": [ | |
{ | |
"Sid": "AllowDuplicity", | |
"Effect": "Allow", | |
"Action": [ | |
"s3:PutObject", | |
"s3:GetObject", | |
"s3:ListBucket", |
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
#To use: | |
# (assuming you trust it): | |
#curl https://gist.githubusercontent.com/jonathonsim/cc286f3baed66faed69e3be2d4608858/raw/ | bash | |
cd ~ | |
chmod 777 ~/bin/* | |
cat > ~/.bash_profile <<'EOF' | |
# source the users bashrc if it exists | |
if [ -f "${HOME}/.bashrc" ] ; then | |
source "${HOME}/.bashrc" |
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 | |
/** | |
* Idealstack Healthcheck. | |
* | |
* This file is checked by the load balancer to see whether the site is healthy. | |
* If it returns a 500 error the site is considered unhealthy, and the site's container | |
* will be rebooted. | |
* | |
* This default check doesn't do much except check that PHP is running. | |
* You can customise this file to check other important resources |
OlderNewer