Skip to content

Instantly share code, notes, and snippets.

View danielt69's full-sized avatar
:octocat:
Focusing

Daniel danielt69

:octocat:
Focusing
View GitHub Profile
#!/bin/bash
#
# This script configures WordPress file permissions based on recommendations
# from http://codex.wordpress.org/Hardening_WordPress#File_permissions
#
# Author: Michael Conigliaro <mike [at] conigliaro [dot] org>
#
WP_OWNER=www-data # <-- wordpress owner
WP_GROUP=www-data # <-- wordpress group
WP_ROOT=$1 # <-- wordpress root directory
## Configure eth0
#
# vi /etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE="eth0"
NM_CONTROLLED="yes"
ONBOOT=yes
HWADDR=A4:BA:DB:37:F1:04
TYPE=Ethernet
BOOTPROTO=static
# ~/.bashrc: executed by bash(1) for non-login shells.
# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc)
# for examples
# If not running interactively, don't do anything
[ -z "$PS1" ] && return
# don't put duplicate lines in the history. See bash(1) for more options
# ... or force ignoredups and ignorespace
HISTCONTROL=ignoredups:ignorespace
@danielt69
danielt69 / deploy.sh
Last active August 29, 2015 14:20 — forked from nodesocket/deploy.sh
BASE_PATH="/srv/www"
REPO_PATH="/srv/www/repo"
GIT_URL="https://github.com/username/repo.git"
if [ -d "$REPO_PATH" ]; then
cd $REPO_PATH
git pull --quiet
echo "git pull successfully ran ($(git rev-parse --short HEAD))";
else
cd $BASE_PATH
@danielt69
danielt69 / 0_reuse_code.js
Created November 1, 2015 15:23
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@danielt69
danielt69 / manage-etc-hosts.sh
Created May 9, 2020 17:03 — forked from irazasyed/manage-etc-hosts.sh
Bash Script to Manage /etc/hosts file for adding/removing hostnames.
#!/bin/sh
# PATH TO YOUR HOSTS FILE
ETC_HOSTS=/etc/hosts
# DEFAULT IP FOR HOSTNAME
IP="127.0.0.1"
# Hostname to add/remove.
HOSTNAME=$1
@danielt69
danielt69 / .htaccess
Created October 12, 2020 22:03 — forked from alexsasharegan/.htaccess
Apache Config for React Router - react .htaccess
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.html$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-l
RewriteRule . /index.html [L]