Skip to content

Instantly share code, notes, and snippets.

Rob Dunham Nilpo

View GitHub Profile
@Nilpo
Nilpo / Using Git to Manage a Live Web Site.md
Last active Jul 9, 2020
Using Git to Manage a Live Web Site
View Using Git to Manage a Live Web Site.md

Using Git to Manage a Live Web Site

Overview

As a freelancer, I build a lot of web sites. That's a lot of code changes to track. Thankfully, a Git-enabled workflow with proper branching makes short work of project tracking. I can easily see development features in branches as well as a snapshot of the sites' production code. A nice addition to that workflow is that ability to use Git to push updates to any of the various sites I work on while committing changes.

Contents

@Nilpo
Nilpo / .bashrc
Created Oct 1, 2014
Adds colored bash prompt, Git completion, and git branch name in the bash prompt.
View .bashrc
# uncomment for a colored prompt, if the terminal has the capability; turned
# off by default to not distract the user: the focus in a terminal window
# should be on the output of commands, not on the prompt
force_color_prompt=yes
if [ -n "$force_color_prompt" ]; then
if [ -x /usr/bin/tput ] && tput setaf 1 >&/dev/null; then
# We have color support; assume it's compliant with Ecma-48
# (ISO/IEC-6429). (Lack of such support is extremely rare, and such
# a case would tend to support setf rather than setaf.)
@Nilpo
Nilpo / allow
Created Sep 16, 2016 — forked from Mteigers/allow
CSF Allow AND Ignore Cloudflare IPv4 IP's.
View allow
for i in `curl https://www.cloudflare.com/ips-v4`; do csf -a $i; done
@Nilpo
Nilpo / Session.php
Last active May 13, 2020
A simple session wrapper class to provide static OOP access to PHP sessions.
View Session.php
<?php
/**
* Session Helper Class
*
* A simple session wrapper class.
*
* Recommended for use with PHP 5.4.0 or higher. (Not required.)
*
* Usage Example:
@Nilpo
Nilpo / CustomException.php
Last active May 10, 2020
If you intend on creating a lot of custom exceptions, I've created an interface and an abstract exception class that ensures that all parts of PHP's built-in Exception class are preserved in child classes. It also properly pushes all information back to the parent constructor ensuring that nothing is lost. This allows you to quickly create new e…
View CustomException.php
<?php
/*
* This code is free software; you can use it, redistribute it, and/or modify as you wish.
* This code is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY - implied or otherwise.
* This code is distributed "as is." All risk and cost are assumed by the user of the code and not the creator thereof.
* If you wish to give attribution, the original creator is Robert "Nilpo" Dunham (devnilpo@gmail.com)
*/
interface IException
{
@Nilpo
Nilpo / BIND for the Small LAN.md
Last active May 6, 2020
How to configure BIND 9 to act as a caching nameserver or as the nameserver for a local domain.
View BIND for the Small LAN.md
@Nilpo
Nilpo / INSTALL.md
Last active Mar 27, 2020
Instal Plex on Asus Tinker Board
View INSTALL.md
  1. In terminal, upgrade TinkerOS.

    sudo apt update && apt upgrade -y
    sudo apt dist-upgrade
  2. Install avahi-daemon

@Nilpo
Nilpo / Installing The Sword Project.md
Last active Feb 20, 2020
Instruction for installing The Sword Project on Mac and Linux. This is intended for module developers.
View Installing The Sword Project.md

Installing The Sword Project

I found installing Sword from source to be problematic on both Mac and Linux. Thankfully, I found hidden in some documentation that it is available through common repositories. Unfortunately, the documentation was not thorough. Here's what worked for me on Mac OSX 10.9.5 and Linux Mint 17.3 "Rosa". These instructions should work on any recent version of Mac and any flavor of Ubuntu.

Installing Sword Package

The process for installing Sword differs a bit between Mac and Linux. I used Homebrew on Mac, but MacPorts should work just fine. Linux was a little less friendly, but I did get it working.

Instructions for Mac Users

You can’t perform that action at this time.