Skip to content

Instantly share code, notes, and snippets.

T. Brian Jones tbrianjones

Block or report user

Report or block tbrianjones

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
tbrianjones /
Created Jan 29, 2017 — forked from yanofsky/
A script to download all of a user's tweets into a csv
#!/usr/bin/env python
# encoding: utf-8
import tweepy #
import csv
#Twitter API credentials
consumer_key = ""
consumer_secret = ""
access_key = ""
tbrianjones / download_file_to_client_computer.php
Last active Jan 18, 2019
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.
View download_file_to_client_computer.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
// download file if $_GET['download_file'] is set to true
tbrianjones / gist:6c139e9db0180992abd2
Created Aug 18, 2014
Simple English Stop Word List
View gist:6c139e9db0180992abd2
tbrianjones / sqs_web_manager.php
Last active Aug 1, 2016
A Simple Web App to manage Amazon SQS Queues ... delete/clear ... and add items to the queues ... all via web forms.
View sqs_web_manager.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 / whitespacePhraseTokenizer.php
Created Aug 7, 2014
A Whitespace Tokenizer for PHP-NLP-TOOLS that creates specified ngrams ( unigrams, bigrams, trigrams, etc. )
View whitespacePhraseTokenizer.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 / Inflect.php
Last active Jul 22, 2019
A PHP Class for converting English words between Singular and Plural.
View Inflect.php
// original source:
The MIT License (MIT)
Copyright (c) 2015
Permission is hereby granted, free of charge, to any person obtaining a copy
tbrianjones /
Last active Mar 13, 2019
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 / gist:6531036
Created Sep 11, 2013
A pretty good regular expression to extract US addresses from free text.
View gist:6531036
$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 / gist:6515916
Last active Dec 22, 2015
Used to import NOAA tide data into a Calendar CSV format for Google Calendar.
View gist:6515916
// how to use
// 1.) download a tide chart from here:
// 2.) cut and paste just the tide data into the $contents variable below
// 3.) update $location, and set the default time zone
tbrianjones / remove_philterit_for_gmail_labels.php
Created Aug 21, 2013
Gist to delete Gmail Labels created by the Gmail plugin called Philterit.
View remove_philterit_for_gmail_labels.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.
You can’t perform that action at this time.