Skip to content

Instantly share code, notes, and snippets.

Travis Miller tbmiller

Block or report user

Report or block tbmiller

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
tbmiller / SassMeister-input.scss
Created Oct 20, 2015
Generated by
View SassMeister-input.scss
// ----
// libsass (v3.2.5)
// ----
$categories: (sell-sheets: #F1B261, trends-reports: #6BBCCF, insights: #A07BA8, recipe-cards: #91B97D, videos: #EA838C);
$properties: (text: color, bg: background-color, border: border-color);
@mixin category_theming($type) {
@each $label, $property in $properties {
View vimeo-js-api.html
<!-- NOTE: ?api=1 and player_id at the end of the URL -->
<iframe id="player" width="" height="" src="" frameborder="0" webkitAllowFullScreen mozallowfullscreen allowFullScreen></iframe>
<script src=""></script>
var player = $f(document.getElementById('player'));
View PDO and

PDO (PHP Data Objects)

######Cheat sheet for using PDO to interact with MySQL db's

Used to use MySQL then found out it was being depreciated, this is of course right after I got the hang of it and was almost finished with the project i was using to learn myself. So desided to make the switch to PDO way much easier especially if you have security in mind.

For instance instead of $var = mysql_real_escape_string($_POST['data'];, you just $var = $db->quote($_POST['data'];. Or even better use prepared staements and the underlying driver will not only escape but quote the string for you!


Go to Sublime Text 2 > Preferences > Key Bindings - User and add this JSON to the file:

    { "keys": ["super+shift+l"],
      "command": "insert_snippet",
      "args": {
        "contents": "console.log(${1:}$SELECTION);${0}"
tbmiller / headings-mixin.scss
Created Oct 14, 2014
SCSS - Sass Mixin for Headings
View headings-mixin.scss
SCSS - Sass Mixin for Headings
Reference Link:
Also Look at:
@mixin headings($from: 1, $to: 6){
@for $i from $from through $to{
tbmiller / shortcode-custom-grid.php
Created Oct 7, 2014
PHP - Wordpress Shortcode Functions for Custom Sass Grid
View shortcode-custom-grid.php
// PHP - Wordpress Shortcode Functions for Custom Sass Grid
// A Working Shortcode Template for Custom Grid Layouts using Sass
/* =============================================================================
Row Block Shortcode
========================================================================== */
tbmiller / detect-animation-end.js
Created Sep 16, 2014
JS - Detect Animation End
View detect-animation-end.js
Detect Animation End! (Thanks David Walsh)
/* From Modernizr */
function whichTransitionEvent(){
var t;
var el = document.createElement('fakeelement');
var transitions = {
tbmiller / remove-empty-p.php
Created Sep 14, 2014
PHP - Remove Empty P Tags from WordPress
View remove-empty-p.php
// Removes P Tags from the_content
// Reference Link:
add_filter('the_content', 'remove_empty_p', 20, 1);
function remove_empty_p($content){
$content = force_balance_tags($content);
return preg_replace('#<p>\s*+(<br\s*/*>)?\s*</p>#i', '', $content);
tbmiller / replace-text.css
Created Sep 11, 2014
CSS - Replace Text via CSS (Hack)
View replace-text.css
.class {
.class:before {
content: "[Replaced Content]";
tbmiller / redirect-window.js
Created Aug 27, 2014
JS - Redirects & script
View redirect-window.js
JS - Redirects & script
Reference URL:
(Thanks David Walsh!)
You can’t perform that action at this time.