Skip to content

Instantly share code, notes, and snippets.

View jstnbr's full-sized avatar

Justin Breen jstnbr

View GitHub Profile
@jstnbr
jstnbr / .gitignore
Created October 22, 2019 15:43 — forked from salcode/.gitignore
See https://salferrarello.com/wordpress-gitignore/ for the latest version of my WordPress .gitignore file
# -----------------------------------------------------------------
# .gitignore for WordPress
# Bare Minimum Git
# http://ironco.de/bare-minimum-git/
# ver 20150227
#
# This file is tailored for a WordPress project
# using the default directory structure
#
# This file specifies intentionally untracked files to ignore
@jstnbr
jstnbr / Button with gradient border
Created October 27, 2019 05:26 — forked from joshrcook/Button with gradient border
Rounded Button with Gradient Border
@jstnbr
jstnbr / git-tag-delete-local-and-remote.sh
Created November 24, 2019 00:38 — forked from mobilemind/git-tag-delete-local-and-remote.sh
how to delete a git tag locally and remote
# delete local tag '12345'
git tag -d 12345
# delete remote tag '12345' (eg, GitHub version too)
git push origin :refs/tags/12345
# alternative approach
git push --delete origin tagName
git tag -d tagName
@jstnbr
jstnbr / jquery.external-links-new-window.js
Created December 23, 2019 21:11 — forked from wpscholar/jquery.external-links-new-window.js
Open all external links in a new window
@jstnbr
jstnbr / .gitignore
Last active January 18, 2020 23:13
A gitignore file for WordPress
/*
~*
.*
*.sass-cache
*.log
*.sql
*.sqlite
*.com
*.class
*.dll
@jstnbr
jstnbr / Magnific Popup - Youtube.html
Created February 13, 2020 00:00 — forked from philbar/Magnific Popup - Youtube.html
Runs a Youtube Video in Magnific Popup.
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
<script src="//www.youtube.com/iframe_api"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/magnific-popup.js/1.0.0/jquery.magnific-popup.min.js"></script>
<script>
$(document).ready(function() {
// Initializes Magnific Popup
$('#lp-pom-image-202 a, #lp-pom-box-218 a, #lp-pom-box-217 a').magnificPopup({
disableOn: 700,
@jstnbr
jstnbr / Unbuntu1604-LEMP.sh
Created March 11, 2020 20:53 — forked from blantonious/Unbuntu1604-LEMP.sh
Configuration script to prep and install Laravel 5.6 on Ubuntu 16.04
#!/bin/bash
# /*=================================
# = VARIABLES =
# =================================*/
WELCOME_MESSAGE='
____ ____ ____ ____ ____
||N ||||G ||||I ||||N ||||X ||
||__||||__||||__||||__||||__||
@jstnbr
jstnbr / Mailhog Bash Script (systemd)
Created March 11, 2020 20:53 — forked from v-jacob/Mailhog Bash Script (systemd)
Mailhog setup with systemd
#!/usr/bin/env bash
echo ">>> Installing Mailhog"
# Download binary from github
wget --quiet -O ~/mailhog https://github.com/mailhog/MailHog/releases/download/v1.0.0/MailHog_linux_amd64
# Make it executable
chmod +x ~/mailhog
@jstnbr
jstnbr / install_ngrok.sh
Created March 12, 2020 01:14 — forked from ZachBray/install_ngrok.sh
ngrok install
#!/bin/bash
wget https://bin.equinox.io/c/4VmDzA7iaHb/ngrok-stable-linux-amd64.zip
unzip ngrok-stable-linux-amd64.zip
rm ngrok-stable-linux-amd64.zip
sudo mv ngrok /usr/bin/
@jstnbr
jstnbr / youtube_id_regex.php
Created April 10, 2020 04:11 — forked from ghalusa/youtube_id_regex.php
Extract the YouTube Video ID from a URL in PHP
<?php
// Here is a sample of the URLs this regex matches: (there can be more content after the given URL that will be ignored)
// http://youtu.be/dQw4w9WgXcQ
// http://www.youtube.com/embed/dQw4w9WgXcQ
// http://www.youtube.com/watch?v=dQw4w9WgXcQ
// http://www.youtube.com/?v=dQw4w9WgXcQ
// http://www.youtube.com/v/dQw4w9WgXcQ
// http://www.youtube.com/e/dQw4w9WgXcQ
// http://www.youtube.com/user/username#p/u/11/dQw4w9WgXcQ