This file contains hidden or 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
cd /home/forge/default | |
git pull origin master | |
npm install --production |
This file contains hidden or 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\Helpers; | |
/* | |
| BTCMarkets | |
| Exchange is in AUD. | |
| | |
| https://github.com/BTCMarkets/API/wiki/Introduction | |
| |
This file contains hidden or 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
tail -n300 /var/log/auth.log | grep ssh |
This file contains hidden or 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
sudo apt-get install proftpd | |
sudo nano /etc/proftpd/proftpd.conf | |
# disable ipv6 | |
# update server name | |
# set default root ~ | |
# disable RequireValidShell | |
# set masqurade ip to external ip | |
# enable passive ports |
This file contains hidden or 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 automysqlbackup | |
apt-get -y --force-yes install automysqlbackup | |
# Create post backup script | |
mkdir -p /home/forge/scripts | |
cat >/home/forge/scripts/mysql-backup-post.sh <<"EOF" | |
#!/bin/bash | |
find /var/lib/automysqlbackup -type f -exec chown root:forge {} \; -exec chmod 740 {} \; |
This file contains hidden or 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
# FORGE CONFIG (DOT NOT REMOVE!) | |
include forge-conf/example.com/before/*; | |
server { | |
listen 80; | |
server_name example.com; | |
root /home/forge/example.com/web; | |
# FORGE SSL (DO NOT REMOVE!) | |
# ssl_certificate; |
This file contains hidden or 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 | |
// SHOW YOAST PRIMARY CATEGORY, OR FIRST CATEGORY | |
$category = get_the_category(); | |
$useCatLink = true; | |
// If post has a category assigned. | |
if ($category){ | |
$category_display = ''; | |
$category_link = ''; | |
if ( class_exists('WPSEO_Primary_Term') ) |
This file contains hidden or 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
global $wp; | |
$current_url = home_url(add_query_arg(array(),$wp->request)); |
This file contains hidden or 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
add_action( 'phpmailer_init', 'wph_phpmailer_init' ); | |
function wph_phpmailer_init( PHPMailer $phpmailer ) { | |
$phpmailer->IsSMTP(); | |
$phpmailer->setFrom('[email protected]', 'WEBSITE'); // default from address | |
$phpmailer->SMTPAuth = true; // enable SMTP authentication | |
$phpmailer->Port = 587; // set the SMTP server port | |
$phpmailer->Host = 'SMTP_HOST'; // SMTP server | |
$phpmailer->Username = 'SMTP_USERNAME'; // SMTP server username | |
$phpmailer->Password = 'SMTP_PASSWORD'; // SMTP server password | |
$phpmailer->SMTPSecure = 'tls'; |