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
#!/bin/bash | |
# | |
# vvv-init-setup-plugins-post.sh | |
# | |
# This file will perform some additional tasks on installed plugins. | |
# Get Peasant from https://github.com/andrezrv/peasant-vvv-provider. | |
# Include config file. | |
this_dir="$(dirname `readlink -f $(dirname $0)/vvv-init.sh`)" | |
. "${this_dir}/config.sh" |
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
# Create ssh directory if it doesn't exist | |
mkdir -p ~/.ssh | |
# Go to ssh directory | |
cd !$ | |
# Create public and private keys | |
ssh-keygen | |
# Upload your publick key to some server | |
cat ~/.ssh/id_rsa.pub | ssh user@host -p 22 "cat - >> ~/.ssh/authorized_keys" |
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
################### | |
# Compress a folder | |
################### | |
tar czfv test.tar.gz test/ | |
# "czfv" stands for "Compress Zip File Verbose" | |
# If you want bzip files, use "j" instead of "z". | |
################### | |
# Uncompress a file | |
################### |
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
echo -e "\e[32m"; | |
while :; do for i in {1..16}; | |
do r="$(($RANDOM % 2))"; | |
if [[ $(($RANDOM % 5)) == 1 ]]; then | |
if [[ $(($RANDOM % 4)) == 1 ]]; then | |
v+="\e[1m $r "; | |
else | |
v+="\e[2m $r "; | |
fi; | |
else |
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
jQuery( document ).ready( function( $ ) { | |
var scrollable = $('#branding .navbar-inner'); | |
var difference = 5; | |
if ( scrollable.length ) { | |
var a = document.body; | |
var e = document.documentElement; | |
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 scripts to /usr/bin | |
ln -s /srv/www/website/tasks/website-backup-applications.sh /usr/bin/website-backup-applications | |
ln -s /srv/www/website/tasks/website-backup-database.sh /usr/bin/website-backup-database | |
ln -s /srv/www/website/tasks/website-full-backup.sh /usr/bin/website-full-backup | |
ln -s /srv/www/website/tasks/website-switch.sh /usr/bin/website-switch |
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
#server { | |
# listen 80; | |
# root /srv/www/mysite; | |
index index.php index.html index.htm; | |
# server_name www.mysite.com; | |
location / { | |
try_files $uri $uri/ /index.html; | |
} |
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
# Purge all Varnish cache | |
varnishadm "ban req.url ~ /" |
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
GRANT ALL PRIVILEGES ON %DB_NAME%.* TO %DB_USER%@%DB_HOST% IDENTIFIED BY '%DB_PASSWORD%'; |
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 | |
# Disables all kind of file modifications: | |
# core, plugins and themes won't be auto-updated | |
# and file editors won't appear anymore in wp-admin. | |
define( 'DISALLOW_FILE_MODS', true ); | |
# Disables all core updates: | |
define( 'WP_AUTO_UPDATE_CORE', false ); |