Skip to content

Instantly share code, notes, and snippets.

View darcyclarke's full-sized avatar
🔥
busy building things...

Darcy Clarke darcyclarke

🔥
busy building things...
View GitHub Profile
@darcyclarke
darcyclarke / jquery.missing.selector.js
Created May 27, 2016 03:23
A jQuery filter selector for ":missing" (ie. opposite of ":contains")
/*!
*
* jQuery :missing Plugin
* http://darcyclarke.me/articles/development/find-elements-that-dont-contain-a-string/
*
* Copyright 2016, Darcy Clarke
* Do what you want license
*
*/
jQuery.expr[':'].missing = function(elem, index, match) {
@darcyclarke
darcyclarke / jquery.animate.floats.js
Last active March 7, 2017 22:35
jQuery plugin for animating elements with floats
/*!
* Animate Floats jQuery Plugin
* http://darcyclarke.me/articles/development/animate-float-positions-in-jquery-1-5/
*
* Copyright 2016, Darcy Clarke
* Do what you want license
*/
(function(window, $){
var $plugin = $.sub();
$plugin.fn.animate = function(props, speed, cb){
@darcyclarke
darcyclarke / youtubeThumb.php
Created May 27, 2016 03:15
Get the video thumbnail for a YouTube video from a URL
<?php
/***********************************************/
/* Get a Youtube or Vimeo video's Thumbnail from a URL
/* http://darcyclarke.me/articles/development/get-image-for-youtube-or-vimeo-videos-from-url/
/*
/* Copyright 2016, Darcy Clarke
/* Do what you want license
/***********************************************/
function video_image($url){
$image_url = parse_url($url);
@darcyclarke
darcyclarke / pubsub.js
Last active September 17, 2016 17:39
Library agnostic publish/subscribe
/*!
*
* Library Agnostic Pubsub
* http://darcyclarke.me/articles/development/library-agnostic-pubsub-publish-subscribe/
*
* Copyright 2016, Darcy Clarke
* Do what you want license...
*
*/
(function(window){
@darcyclarke
darcyclarke / strip.php
Last active May 27, 2016 03:09
Strip text out from between two strings
<?php
/***********************************************/
/* PHP Strip Function
/* http://darcyclarke.me/articles/development/strip-out-text-between-two-tags-in-a-string-php/
/*
/* Copyright 2016, Darcy Clarke
/* Do what you want license
/***********************************************/
function strip($startTag,$endTag,$text,$pos=0){
if(!is_integer($pos)){
@darcyclarke
darcyclarke / clean.js
Created May 27, 2016 03:04
Get Clean window & DOM Objects
/*!
*
* Get Clean window & DOM Objects
* http://darcyclarke.me/articles/development/getting-a-clean-document-or-window-object-in-javascript/
*
* Copyright 2016, Darcy Clarke
* Do what you want license
*
*/
(function(){
@darcyclarke
darcyclarke / gulpfile.coffee
Created May 29, 2015 13:30
Example Build file
# --------------------------------------
# Setup
# --------------------------------------
server = false
fs = require( 'fs' )
path = require( 'path' )
_ = require( 'underscore' )
wrench = require( 'wrench' )