Skip to content

Instantly share code, notes, and snippets.

Travis Smith wpsmith

Block or report user

Report or block wpsmith

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
menushka / airdropSorter.scpt
Created Dec 30, 2018
A Folder Action script written in AppleScript used to separate AirDropped files into a different folder other than the default Downloads folder
View airdropSorter.scpt
property AIRDROP_FOLDER : "Path:to:AirDrop:Folder:in:Alias:format"
property QUARANTINE_KEY : "59"
property GET_QUARANTINE_COMMAND_START : "ls -l -@ '"
property GET_QUARANTINE_COMMAND_END : "' | tr '\\n' ' ' | sed 's/.*com\\.apple\\.quarantine\\s*\\(\\d*\\)/ \\1/' | awk '{$1=$1};1'"
on adding folder items to this_folder after receiving added_items
repeat with i from 1 to length of added_items
set current_item to item i of added_items
set quarantine_type to getQuarantineType(POSIX path of current_item)
deanhume / clear-cache.js
Created Sep 20, 2017
Clear Service Worker Cache
View clear-cache.js
if ('serviceWorker' in navigator) {
caches.keys().then(function(cacheNames) {
cacheNames.forEach(function(cacheName) {
davebarnwell / PHP composer
Last active Aug 23, 2019
Global installation of PHP tools with Composer
View PHP composer

Global installation of PHP tools with Composer

To install a composer package globally, you run the usual require command, but with the addition of the global modifier. So to install PHPUnit, you would run:

$ composer global require phpunit/phpunit
$ composer global require phpunit/dbunit
$ composer global require phing/phing
$ composer global require phpdocumentor/phpdocumentor
$ composer global require sebastian/phpcpd
chrismccoy / restapi.txt
Last active Jul 17, 2019
WordPress REST API Resources
View restapi.txt
Allow ALL cross origin requests to WordPress REST API
WordPress theme using Rest API and Vue.js
WordPress Post from Front End using REST API and Vue.js
An offline-first SPA using Vue.js, the WordPress REST API and Progressive Web Apps
bdougherty / Rules.1blockpkg
Created Nov 6, 2015
My custom 1Blocker packages
View Rules.1blockpkg
"id": "0aefa581-b042-4f36-b39c-74daa33b682a",
"name": "Block Annoying Article Stuff",
"rules": [{
"id": "634b4fd6-e2c9-4ce4-bcf9-0d52b4c74baa",
"name": "The Atlantic",
"content": {
"trigger": {
"url-filter": "^[^:]+://+([^:/]+\\.)?theatlantic\\.com[:/]",
"url-filter-is-case-sensitive": true,
wpsmith / sm-annotated.html
Created Oct 22, 2015 — forked from hdragomir/sm-annotated.html
The deferred font loading logic for Smashing Magazine.
View sm-annotated.html
<script type="text/javascript">
(function () {
"use strict";
// once cached, the css file is stored on the client forever unless
// the URL below is changed. Any change will invalidate the cache
var css_href = './index_files/web-fonts.css';
// a simple event handler wrapper
function on(el, ev, callback) {
if (el.addEventListener) {
el.addEventListener(ev, callback, false);
mattboon / webfont-localstorage.js
Last active Jun 26, 2016
View webfont-localstorage.js
function supportsWoff2() {
"use strict";
/*global FontFace*/
// Source:
if (!window.FontFace) {
return false;
} else {
var f = new FontFace('t', 'url("data:application/font-woff2,") format("woff2")', {});
return f.status === 'loading';
View gist:2b80771a5582b7528d9e
# remove specific file from git cache
git rm --cached filename
# remove all files from git cache
git rm -r --cached .
git add .
git commit -m ".gitignore is now working"
You can’t perform that action at this time.