Skip to content

Instantly share code, notes, and snippets.


DpEN techies23

Block or report user

Report or block techies23

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
techies23 / _blank.js
Created Dec 3, 2018 — forked from CrocoDillon/_blank.js
Automatically open external links in new tab or window.
View _blank.js
// vanilla JavaScript
var links = document.links;
for (var i = 0, linksLength = links.length; i < linksLength; i++) {
if (links[i].hostname != window.location.hostname) {
links[i].target = '_blank';
// or in jQuery
techies23 / Staging&ProductionUsingGit
Created Aug 1, 2016 — forked from mediabeastnz/Staging&ProductionUsingGit
Staging and Production Server using Git.
View Staging&ProductionUsingGit
If you are running a large website where you will need to test new features on a seperate url before pushing them live then the following instructions are for you ;)
For this example imagine your url is and you want a development/staging site on a subdomain which is
1. First thing you'll want to do is go ahead and create your website in plesk and add the subdomain at the same time.
2. ssh into the server e.g. $ ssh username@ipaddress
3. Once logged in cd into the private directory (this will be where all git repos are stored) e.g. $ cd ~/private
4. Create the main repo e.g. $ git init --bare apple.git
5. Now to clone this new repo on your local machine. $ git clone ssh://username@ipaddres/~/private/
You can’t perform that action at this time.