Skip to content

Instantly share code, notes, and snippets.

View trailofdad's full-sized avatar
👹

Christian Hapgood trailofdad

👹
  • REDspace
  • Halifax, NS
  • 23:46 (UTC -03:00)
View GitHub Profile
@trailofdad
trailofdad / Node.js File Looper
Created October 11, 2017 14:51 — forked from adamwdraper/Node.js File Looper
Loop through all files in a given directory with node.js
var fs = require('fs');
var walkPath = './';
var walk = function (dir, done) {
fs.readdir(dir, function (error, list) {
if (error) {
return done(error);
}
@trailofdad
trailofdad / fix-wordpress-permissions.sh
Created January 7, 2017 00:23 — forked from Adirael/fix-wordpress-permissions.sh
Fix wordpress file permissions
#!/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
@trailofdad
trailofdad / install-wp.sh
Last active February 7, 2017 20:57 — forked from BFTrick/install-wp.sh
Download & Install WordPress via Curl
curl -O https://wordpress.org/latest.zip
unzip latest.zip
mv wordpress site
rm latest.zip
//add this to your bash profile to install worpress to your desired folder
function wp-install() { curl -O https://wordpress.org/latest.zip && unzip latest.zip && mv wordpress $1 && rm latest.zip };