Skip to content

Instantly share code, notes, and snippets.

View denzildoyle's full-sized avatar
🎯
Growing

Denzil Doyle denzildoyle

🎯
Growing
View GitHub Profile
<?php
/**
* Fired during plugin activation
*
* @link denzildoyle.me
* @since 1.0.0
*
* @package
* @subpackage
@denzildoyle
denzildoyle / deploy-static-site-heroku.md
Created August 7, 2018 22:44 — forked from wh1tney/deploy-static-site-heroku.md
How to deploy a static website to Heroku

Gist

This is a quick tutorial explaining how to get a static website hosted on Heroku.

Why do this?

Heroku hosts apps on the internet, not static websites. To get it to run your static portfolio, personal blog, etc., you need to trick Heroku into thinking your website is a PHP app. This 6-step tutorial will teach you how.

Basic Assumptions

@denzildoyle
denzildoyle / gist:1f9014e68b2c6ff20a639a01a14e8547
Created March 29, 2017 14:02 — forked from lttlrck/gist:9628955
rename git branch locally and remotely
git branch -m old_branch new_branch # Rename branch locally
git push origin :old_branch # Delete the old branch
git push --set-upstream origin new_branch # Push the new branch, set local branch to track the new remote
@denzildoyle
denzildoyle / Change Branch Name.sh
Last active March 29, 2017 14:04 — forked from lttlrck/gist:9628955
rename git branch locally and remotely
git branch -m new_branch # If on the branch already
git branch -m old_branch new_branch # Rename branch locally. Skip this step if on the branch alread
git push origin :old_branch # Delete the old branch
git push --set-upstream origin new_branch # Push the new branch, set local branch to track the new remote
@denzildoyle
denzildoyle / angular-domain-filter.js
Last active March 11, 2017 19:51
Create filter to filter out domain only from url
app.filter( 'domain', function () {
return function ( input ) {
var parser = document.createElement('a');
parser.href = input;
return parser.hostname;
};
});
<!DOCTYPE html>
<html>
<head>
<meta charset='utf-8' />
<title></title>
<meta name='viewport' content='initial-scale=1,maximum-scale=1,user-scalable=no' />
<script src='https://api.tiles.mapbox.com/mapbox-gl-js/v0.32.1/mapbox-gl.js'></script>
<link href='https://api.tiles.mapbox.com/mapbox-gl-js/v0.32.1/mapbox-gl.css' rel='stylesheet' />
<style>
body { margin:0; padding:0; }
@denzildoyle
denzildoyle / Like Animation — Jumpy Hearts.markdown
Created May 12, 2016 18:45
Like Animation — Jumpy Hearts
@denzildoyle
denzildoyle / removeDuplicates.js
Created October 6, 2015 17:38
Remove duplications from array in JavaScript
function removeDuplicates(array) {
var newArray = []; //create new array to store no duplicates
var isDuplicated = false; //track duplicate indexes
newArray.push(array[0]); //add first index to new array
for (i=1; i <= array.length; i++) { //loop over entered array
for (var x = newArray.length - 1; x >= 0; x--) { // loop over new array
if (newArray[x] == array[i]){ //compare newArray to entered array to see if the current index value already exist in the array
isDuplicated = true; //current array index has a duplicate value
-webkit-filter:blur(10px);