Sometimes it’s distance or worse.
And I don’t know how to make that better.
Sometimes we could stick together;
One time sick together.
But all those things
That you don’t know
They know you.
Author: underblob
Flamingo #3
Residual Afterimage
It’s all there,
just waiting to be known.
Seed Leaf
Sex without love is as hollow and ridiculous as love without sex.
—Hunter S Thompson
Javascript Encode HTML Entities
var htmlEntities = function(str) { return str.replace(/[\u00A0-\u99999<>\&]/gim, function(i) { return '&#'+i.charCodeAt(0)+';'; }); };
Links
Replace All Occurrences in a String
var tokenRegex = new RegExp('{{TOKEN}}', 'g'); myString.replace(tokenRegex, myTokenValue);
MIME Types for Web Fonts
Add or make sure your web server is configured to serve these types of files for web fonts to work:
.eot: application/vnd.ms-fontobject .ttf: font/ttf .otf: font/otf .woff: application/x-font-woff
Remove jQuery Plugin Instances
Here’s how to remove all instances of all plugins from an element if the plugin does not include a destroy
method:
$.removeData($element.get(0));
This will not remove the bound events. You have to do that separately.
If the plugin you’re trying to remove has namespaced events, you’re in luck:
// Remove namespaced events added using .on() $element.off('pluginNamespace'); // Remove namespaced events added using .bind() $element.unbind('.pluginNamespace');
If not, you can examine all of the events attached to an element:
console.log( '$element events:', $._data($element.get(0), 'events') );
Here’s all wrapped up in a handy function:
var destroyCrappyPlugin = function($elem, eventNamespace) { var isInstantiated = !! $.data($elem.get(0)); if (isInstantiated) { $.removeData($elem.get(0)); $elem.off(eventNamespace); $elem.unbind('.' + eventNamespace); } };
2014 New Year’s Resolution
- Social anxiety
- Panic disorder
- Body dysmorphia
- Agoraphobia
- Suicidal ideation
- Borderline personality disorder
- Malingering
To The Wonder
Newborn.
I open my eyes.
I melt.
Into the eternal light.
A spark.
I fall into the flame.
You brought me out of the shadows.
You lifted me from the ground.
Brought me back to life.
What is she dreaming of?
How calm she is.
In love.
Forever at peace.
We climbed the steps…
to the Wonder.