Skip to content

Instantly share code, notes, and snippets.

View anthonyscolaro's full-sized avatar

Anthony Scolaro anthonyscolaro

View GitHub Profile
@anthonyscolaro
anthonyscolaro / .htaccess
Last active February 20, 2021 15:57 — forked from BFTrick/.htaccess
Default WordPress .htaccess File
# Image Rewrite URL for local dev
RewriteCond %{REQUEST_URI} ^/app/uploads/[^\/]*/.*$
RewriteRule ^(.*)$ REMOTE_URL/$1 [QSA,L]
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
@anthonyscolaro
anthonyscolaro / init.yml
Created March 15, 2016 08:24 — forked from renoirb/init.yml
How to install Oracle Java from ppa webupd8team/java using Salt stack, in ONE state file
#
# How to install automatically Oracle Java 7 under Salt Stack
#
# Thanks Oracle for complicating things :(
#
# 1. Create a java/ folder in your salt master
# 2. Paste this file in init.sls
# 3. salt '*' state.sls java
#
# Source:
@anthonyscolaro
anthonyscolaro / cf-ddns.sh
Created January 12, 2016 14:51 — forked from larrybolt/cf-ddns.sh
Automatically update your CloudFlare DNS record to the IP, Dynamic DNS for Cloudflare
#!/usr/bin/env bash
set -o errexit
set -o nounset
set -o pipefail
# Automatically update your CloudFlare DNS record to the IP, Dynamic DNS
# Can retrieve cloudflare Domain id and list zone's, because, lazy
# Place at:
# /usr/local/bin/cf-ddns.sh
@anthonyscolaro
anthonyscolaro / 99fixbadproxy
Created January 5, 2016 16:57 — forked from trastle/99fixbadproxy
Fixing the issue with apt caused by a bad local proxy: -1- Create 99fixbadproxy at: /etc/apt/apt.conf.d/99fixbadproxy -2- Run clear.sh
Acquire::http::Pipeline-Depth "0";
Acquire::http::No-Cache=True;
Acquire::BrokenProxy=true;
@anthonyscolaro
anthonyscolaro / innobackupex-restore.sh
Last active January 3, 2016 13:23 — forked from dalecaru/innobackupex-restore.sh
Scripts to create and restore full and incremental backups (for all databases on server) using innobackupex from Percona.
#!/bin/sh
#
# Script to prepare and restore full and incremental backups created with innobackupex-runner.
#
# This script is provided as-is; no liability can be accepted for use.
#
INNOBACKUPEX=innobackupex
INNOBACKUPEXFULL=/usr/bin/$INNOBACKUPEX
TMPFILE="/tmp/innobackupex-restore.$$.tmp"
@anthonyscolaro
anthonyscolaro / mariadb
Last active November 22, 2015 14:13
too many functions
debconf-utils:
pkg.installed
mysql_setup:
debconf.set:
- name: mysql-server
- data:
'mysql-server/root_password': {'type': 'password', 'value': '{{ salt['pillar.get']('mariadb:root:prod') }}' }
'mysql-server/root_password_again': {'type': 'password', 'value': '{{ salt['pillar.get']('mariadb:root:prod') }}' }
- require:
sudoers:
users:
deploy:
- 'ALL=(root) NOPASSWD: CACHES_CLEAR'
aliases:
users:
DEPLOY:
- deploy
commands:
CACHES_CLEAR: