Skip to content

Instantly share code, notes, and snippets.

View tbrianjones's full-sized avatar

T. Brian Jones tbrianjones

View GitHub Profile
@tbrianjones
tbrianjones / free_email_provider_domains.txt
Last active November 15, 2024 08:56
A list of free email provider domains. Some of these are probably not around anymore. I've combined a dozen lists from around the web. Current "major providers" should all be in here as of the date this is created.
1033edge.com
11mail.com
123.com
123box.net
123india.com
123mail.cl
123qwe.co.uk
126.com
150ml.com
15meg4free.com
@tbrianjones
tbrianjones / remove_philterit_for_gmail_labels.php
Created August 21, 2013 23:12
Gist to delete Gmail Labels created by the Gmail plugin called Philterit.
<?php
// delete all labels / folders created by Philterit for Gmail
//
// - Philterit is an app that organizes your gmail by applying labels
// to emails for all the brands that email you. Philterit shut down,
// but the labels ( thousands of them ) remained in my Gmail account.
//
// - this app removes them all in bulk.
//
@tbrianjones
tbrianjones / gist:6515916
Last active January 12, 2024 17:59
Used to import NOAA tide data into a Calendar CSV format for Google Calendar. http://tidesandcurrents.noaa.gov/tide_predictions.shtml?gid=235
<?php
// how to use
//
// 1.) download a tide chart from here: http://tidesandcurrents.noaa.gov/tide_predictions.shtml?gid=235
//
// 2.) cut and paste just the tide data into the $contents variable below
//
// 3.) update $location, and set the default time zone
//
@tbrianjones
tbrianjones / gist:6531036
Created September 11, 2013 23:10
A pretty good regular expression to extract US addresses from free text.
<?php
$regex = "/\b(p\.?\s?o\.?\b|post office|\d{2,5})\s*(?:\S\s*){8,50}(AK|Alaska|AL|Alabama|AR|Arkansas|AZ|Arizona|CA|California|CO|Colorado|CT|Connecticut|DC|Washington\sDC|Washington\D\.C\.|DE|Delaware|FL|Florida|GA|Georgia|GU|Guam|HI|Hawaii|IA|Iowa|ID|Idaho|IL|Illinois|IN|Indiana|KS|Kansas|KY|Kentucky|LA|Louisiana|MA|Massachusetts|MD|Maryland|ME|Maine|MI|Michigan|MN|Minnesota|MO|Missouri|MS|Mississippi|MT|Montana|NC|North\sCarolina|ND|North\sDakota|NE|New\sEngland|NH|New\sHampshire|NJ|New\sJersey|NM|New\sMexico|NV|Nevada|NY|New\sYork|OH|Ohio|OK|Oklahoma|OR|Oregon|PA|Pennsylvania|RI|Rhode\sIsland|SC|South\sCarolina|SD|South\sDakota|TN|Tennessee|TX|Texas|UT|Utah|VA|Virginia|VI|Virgin\sIslands|VT|Vermont|WA|Washington|WI|Wisconsin|WV|West\sVirginia|WY|Wyoming)(\s+|\&nbsp\;|\<(\S|\s){1,10}\>){1,5}\d{5}/i";
?>
@tbrianjones
tbrianjones / beach_volleyball_sand_workouts.md
Last active May 24, 2022 07:04
Sand workouts based on beach volleyball drills and gameplay.

Beach Volleyball Sand Workout

Workout Notes

  • workout time
    • most exercises will take 1:30-2:00 minutes ( with windsprint and rest )
    • 3x through 8 of these will be roughly 45min
  • windsprints between each workout ( roughly ~10-15 seconds, full speed )
  • 30 seconds after each windsprint ( adjust accordingly to keep heart rate up )
@tbrianjones
tbrianjones / Inflect.php
Last active February 21, 2024 21:28
A PHP Class for converting English words between Singular and Plural.
<?php
// original source: http://kuwamoto.org/2007/12/17/improved-pluralizing-in-php-actionscript-and-ror/
/*
The MIT License (MIT)
Copyright (c) 2015
Permission is hereby granted, free of charge, to any person obtaining a copy
@tbrianjones
tbrianjones / whitespacePhraseTokenizer.php
Created August 7, 2014 23:06
A Whitespace Tokenizer for PHP-NLP-TOOLS that creates specified ngrams ( unigrams, bigrams, trigrams, etc. )
<?php
namespace NlpTools\Tokenizers;
/**
* White space phrase tokenizer.
* Break on every white space
* Create ngrams with the specified number of words ( $n )
*/
class WhitespacePhraseTokenizer implements TokenizerInterface
@tbrianjones
tbrianjones / sqs_web_manager.php
Last active August 1, 2016 20:22
A Simple Web App to manage Amazon SQS Queues ... delete/clear ... and add items to the queues ... all via web forms.
<?php
// include api config file
require_once( dirname( __FILE__ ) . '/../../config.php' );
// create aws sqs conneciton
require_once( BASE_PATH . 'libraries/aws_php_sdk_v2/vendor/autoload.php' );
use Aws\Sqs\SqsClient;
try {
$config = array(
@tbrianjones
tbrianjones / gist:6c139e9db0180992abd2
Created August 18, 2014 18:28
Simple English Stop Word List
'll
a
a
able
about
about
above
abst
accordance
according
@tbrianjones
tbrianjones / download_file_to_client_computer.php
Last active October 28, 2021 02:49
Simple way to write data to a file and save it to a Client's computer when they click a link, using only PHP and HTML.
<?php
// this is a single page that can access and write any data to a file
// on a clients computer when they click a link using only HTML and PHP
//
// this will keep the data between page loads
session_start();
// download file if $_GET['download_file'] is set to true