Skip to content

Instantly share code, notes, and snippets.

View jarrettbarnett's full-sized avatar

Jarrett Barnett jarrettbarnett

View GitHub Profile
<?php
/**
* Test to see if a given string contains HTML tags
*/
function testIfContainsTag($input)
{
if (strpos($input, '<') > -1) {
return true;
} else {
return false;
<?php namespace JB;
/**
* Class NumberHelper Test
* @package JB
* @author Jarrett Barnett <hello@jarrettbarnett.com>
*/
class NumberHelper
{
/**
* Get Sum of Values Squared By Array Key
@jarrettbarnett
jarrettbarnett / .bash_profile
Last active May 26, 2016 14:25 — forked from RavenHursT/.bash_profile
Handy BASH aliases
# ---------------------------------------------------------------------------
#
# Description: This file holds all my BASH configurations and aliases
#
# Sections:
# 1. Environment Configuration
# 2. Make Terminal Better (remapping defaults and adding functionality)
# 3. File and Folder Management
# 4. Searching
# 5. Process Management
@jarrettbarnett
jarrettbarnett / save_disney_photos
Last active May 26, 2016 14:26 — forked from focustrate/save_disney_photos
For exporting photos from Disney Photo Pass website
#!/bin/bash
#
# takes a url like this:
# http://www.disneyphotopass.com/api/photostore/getSharedImageList.ashx?ShareToken=[[token]]
# and saves all the pictures to ./disneypics
#
# url can be found by going to http://www.disneyphotopass.com/photoshare.aspx and sharing photos by email.
# the link will be in the email
[[ -n "$1" ]] || { echo "Please add the share url as a parameter"; exit 0; }