Skip to content

Instantly share code, notes, and snippets.

View dented's full-sized avatar
🎯
Focusing

Gram dented

🎯
Focusing
View GitHub Profile
@dented
dented / list.text
Created January 20, 2019 02:44
Project Names
Amigos
Antique
Apollo
Astro
Atlantis
Aurora
Balto
Barcelona
Barney
Barracuda
.gradient {
background: linear-gradient(-45deg, #EE7752, #E73C7E, #23A6D5, #23D5AB);
background-size: 400% 400%;
-webkit-animation: Gradient 5s ease infinite;
-moz-animation: Gradient 5s ease infinite;
animation: Gradient 5s ease infinite;
}
@dented
dented / bling.delegation.js
Created February 22, 2018 04:31
Bling Event Delegation
Node.prototype.on = window.on = function (name, delegate, fn) {
if(arguments.length !== 3) {
return this.addEventListener(name, arguments[1]);
}
return this.addEventListener(name, function (e) {
if(e.target.matches(delegate)){
return fn.apply(e.target, arguments);
}
})
@dented
dented / bling.deferred.js
Created February 22, 2018 04:29
Deferred without jQuery
window.$.Deferred = function() {
var resolver, rejector;
var promise = new Promise(function(resolve, reject) {
resolver = resolve;
rejector = reject;
});
var deferred = {
resolve: resolver,
reject: rejector,
then: function(a, b) { promise = promise.then(a, b); return deferred; },
@dented
dented / bling.hasText.js
Last active February 22, 2018 04:36
Extend Bling to support text searching selector
$.expr[':']['hasText'] = function(node, index, props){
return node.innerText.contains(props[3]);
}
@dented
dented / infinite.css
Created August 31, 2017 04:39
Infinity CSS
#infinity {
position: relative;
width: 212px;
height: 100px;
}
#infinity:before,
#infinity:after {
content: "";
@dented
dented / remove_branches.sh
Created August 17, 2017 17:11
Remove merged branches locally if merged into current branch already
git branch --merged | egrep -v "(^\*|master|dev)" | xargs git branch -d
@dented
dented / manager.rb
Created April 8, 2017 09:39
Support Polymorphic for STI
class Manager < User
def can_do_stuff
end
end
@dented
dented / libName.js
Created February 7, 2017 10:14
UMD Library Template
/* ****************************************************************************
* libName v0.0.1
*
* libName is a set of functions to wrap libName info and
* Copyright (c) 2017 Gram <g@whub.io> (http://www.whub.io).
* Released under the MIT license. You may obtain a copy of the License
* at: http://www.opensource.org/licenses/mit-license.php).
* ****************************************************************************/
(function(root, factory) {
'use strict';
@dented
dented / trends 2017.md
Last active January 25, 2017 09:08
tech trends for 2017