Skip to content

Instantly share code, notes, and snippets.

Rob Dunham Nilpo

Block or report user

Report or block Nilpo

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@Nilpo
Nilpo / Using Git to Manage a Live Web Site.md
Last active Feb 19, 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 / BIND for the Small LAN.md
Last active Jan 27, 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 / Session.php
Last active Jan 21, 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 / git-pushing-multiple.rst
Created Feb 2, 2019 — forked from KJoke70/git-pushing-multiple.rst
How to push to multiple git remotes at once. Useful if you keep mirrors of your repo.
View git-pushing-multiple.rst

Pushing to Multiple Git Repos

If a project has to have multiple git repos (e.g. Bitbucket and Github) then it's better that they remain in sync.

Usually this would involve pushing each branch to each repo in turn, but actually Git allows pushing to multiple repos in one go.

If in doubt about what git is doing when you run these commands, just

@Nilpo
Nilpo / GitHub-Forking.md
Created Apr 24, 2019 — forked from Chaser324/GitHub-Forking.md
GitHub Standard Fork & Pull Request Workflow
View GitHub-Forking.md

Whether you're trying to give back to the open source community or collaborating on your own projects, knowing how to properly fork and generate pull requests is essential. Unfortunately, it's quite easy to make mistakes or not know what you should do when you're initially learning the process. I know that I certainly had considerable initial trouble with it, and I found a lot of the information on GitHub and around the internet to be rather piecemeal and incomplete - part of the process described here, another there, common hangups in a different place, and so on.

In an attempt to coallate this information for myself and others, this short tutorial is what I've found to be fairly standard procedure for creating a fork, doing your work, issuing a pull request, and merging that pull request back into the original project.

Creating a Fork

Just head over to the GitHub page and click the "Fork" button. It's just that simple. Once you've done that, you can use your favorite git client to clone your repo or j

@Nilpo
Nilpo / Autoloader.php
Last active Nov 11, 2019
A simple recursive PHP autoloader using the RecursiveDirectoryIterator.
View Autoloader.php
<?php
/*
* The MIT License (MIT)
*
* Copyright (c) 2014 Rob Dunham
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
@Nilpo
Nilpo / Installing The Sword Project.md
Last active Oct 31, 2019
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

@Nilpo
Nilpo / download.py
Created Oct 26, 2019 — forked from triple-j/download.py
Download file through HTTP using requests.py and tqdm
View download.py
import os.path
from urllib.request import urlopen
import requests
from tqdm import tqdm
def download_from_url(url, dst):
"""
@param: url to download file
@param: dst place to put the file
You can’t perform that action at this time.