Skip to content

Instantly share code, notes, and snippets.


Barry BarryMode

View GitHub Profile
BarryMode / select-filter.html
Last active Jul 23, 2019
Filtering with a select box.
View select-filter.html
<select onchange="filter(this.value);">
<option selected="selected"></option>
<option value="option-1">Option 1</option>
<option value="option-2">Option 2</option>
<option value="option-3">Option 3</option>
<option value="option-4">Option 4</option>
<option value="option-5">Option 5</option>
<div class="filterable option-1">Option 1</div>
<div class="filterable option-2">Option 2</div>
View vimeo-background-cover.html
body { margin: 0; }
.vimeo-container {
padding: 0;
width: 100%;
height: 100vh;
overflow: hidden;
position: relative;
iframe {

Keybase proof

I hereby claim:

  • I am barrymode on github.
  • I am barrymode ( on keybase.
  • I have a public key ASBEZPMoVXYaO2Z7aFcauExenDJolui4fZ0ryXeE76KiXAo

To claim this, I am signing this object:

BarryMode / gregorianMDY.js
Last active Apr 8, 2019
Gregorian MDY in Javascript (ex. January 1, 2000)
View gregorianMDY.js
function gregorianMDY() {
var now = new Date();
var month = new Array();
month[0] = "January";
month[1] = "February";
month[2] = "March";
month[3] = "April";
month[4] = "May";
month[5] = "June";
month[6] = "July";
BarryMode / CreateWordpressUser.php
Created Oct 25, 2018 — forked from jawinn/CreateWordpressUser.php
Create WordPress Admin User from PHP
View CreateWordpressUser.php
// ----------------------------------
// Put this file in your Wordpress root directory and run it from your browser.
// Delete it when you're done.
// ----------------------------------------------------
BarryMode /
Created Sep 8, 2018 — forked from oubiwann/
appify — create the simplest possible Mac app from a shell script (adds an application icon)
#!/usr/bin/env bash
SCRIPT=`basename "$0"`
OSX_VERSION=`sw_vers -productVersion`
function usage {
BarryMode / date-time-template.php
Last active Mar 9, 2018
Return all possible date/time formatting combinations with a given start date/time and end date/time
View date-time-template.php
/* Possible Dates
1. if no end date, or start date and end date are the same
ex. January 1, 2000
2. if start month/year and end month/year are the same
ex. January 1 - 2, 2000
3. if start month and end month are different, and the year is the same
ex. January 1 - February 1, 2000
4. if start year and end year are different
BarryMode / csv-to-json.php
Created Feb 8, 2018 — forked from ur92/csv-to-json.php
Convert CSV to JSON
View csv-to-json.php
* Converts CSV to JSON
* Example uses Google Spreadsheet CSV feed
* csvToArray function I think I found on
header('Content-type: application/json');
// Set your CSV feed
BarryMode / emoji_entitizer.php
Last active Aug 5, 2020
Convert emojis in a string to html entities.
View emoji_entitizer.php
function emoji_entitizer($str) {
$emoji_pattern = "/\\x{1F469}\\x{200D}\\x{2764}\\x{FE0F}\\x{200D}\\x{1F48B}\\x{200D}\\x{1F469}|\\x{1F469}\\x{200D}\\x{2764}\\x{FE0F}\\x{200D}\\x{1F48B}\\x{200D}\\x{1F468}|\\x{1F468}\\x{200D}\\x{2764}\\x{FE0F}\\x{200D}\\x{1F48B}\\x{200D}\\x{1F468}|\\x{1F469}\\x{200D}\\x{1F469}\\x{200D}\\x{1F466}\\x{200D}\\x{1F466}|\\x{1F468}\\x{200D}\\x{1F468}\\x{200D}\\x{1F467}\\x{200D}\\x{1F466}|\\x{1F469}\\x{200D}\\x{1F469}\\x{200D}\\x{1F467}\\x{200D}\\x{1F467}|\\x{1F469}\\x{200D}\\x{1F469}\\x{200D}\\x{1F467}\\x{200D}\\x{1F466}|\\x{1F468}\\x{200D}\\x{1F469}\\x{200D}\\x{1F467}\\x{200D}\\x{1F467}|\\x{1F468}\\x{200D}\\x{1F469}\\x{200D}\\x{1F467}\\x{200D}\\x{1F466}|\\x{1F468}\\x{200D}\\x{1F469}\\x{200D}\\x{1F466}\\x{200D}\\x{1F466}|\\x{1F468}\\x{200D}\\x{1F468}\\x{200D}\\x{1F467}\\x{200D}\\x{1F467}|\\x{1F468}\\x{200D}\\x{1F468}\\x{200D}\\x{1F466}\\x{200D}\\x{1F466}|\\x{1F3CC}\\x{FE0F}\\x{200D}\\x{2640}\\x{FE0F}\\x{1F3FB}|\\x{1F3CB}\\x{FE0F}\\x{200D}\\x{2640}\\x{FE0F}\\x{1F3FF}|\\x{1F575}\\x{FE
BarryMode / .htaccess
Created Jan 26, 2017 — forked from jdevalk/.htaccess
These three files together form an affiliate link redirect script.
View .htaccess
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteRule ^index\.php$ - [L]
RewriteRule (.*) ./index.php?id=$1 [L]
You can’t perform that action at this time.