Skip to content

Instantly share code, notes, and snippets.

@sillero
sillero / README.md
Last active August 29, 2015 14:15
Experimental use case of "Awesomplete extensions" using UMD
// global notation
// <script src="awesomplete.js"></script>
// <script src="awesomplete-email.js"></script>
// <script src="awesomplete-select.js"></script>
Awesomplete.init();



// commonjs/middleware notation
@sillero
sillero / README.md
Last active April 26, 2024 22:43
GitHub markdown TOC generator (bookmarklet)

#GitHub markdown TOC generator (bookmarklet) Drag THIS LINK to the your bookmarks

@sillero
sillero / Element.setAttribute.enhanced.js
Last active January 4, 2016 20:08
Enhancing Element.setAttribute() to accept only 1 argument for attribute creation
//test case http://jsfiddle.net/NHZ6W/
(function(Element, undefined){
var _setAttribute = Element.prototype.setAttribute;
Element.prototype.setAttribute = function(attrName, attrValue){
if (this.hasAttribute(attrName)) {
if (attrValue !== undefined) {
_setAttribute.call(this, attrName, attrValue);
}
//do nothing if attr exists and action is to create
@sillero
sillero / select-reset.scss
Last active January 3, 2016 14:58
Select-reset for cross-device <select> appearance
/*
Tested on
(Windows 7)
Chrome, Firefox
(Android 4.1)
Android Browser, Chrome, Firefox
(iOS 6.1.3)
Safari
*/
@sillero
sillero / Main.sublime-menu
Last active January 2, 2016 09:29
Sublime Text 2/3 Layouts (created with http://fatihak.in/app/sublimelayout/)
[
{
"id": "view",
"children": [
{
"id": "layout",
"children": [
{
"command": "set_layout",
"caption": "3 col top, 1 row bottom",
@sillero
sillero / README.md
Last active January 1, 2016 05:19
node-tasker

#node-tasker An exercise on Promises and flows (simulating Grunt tasks on a node server)

##Usage

tasker.registerTask('test1', function(){
    console.log('test1');
});

tasker.registerTask('test2', function(resolve, reject){
@sillero
sillero / flexbox-grid.less
Created December 10, 2013 20:45
flexbox-grid.less
/* experimental, flexbox grid */
@fg_total_columns: 12;
.fg-row {
-moz-box-sizing: border-box;
box-sizing: border-box;
display: flex;
}
.fg-col-base {
-moz-box-sizing: border-box;
@sillero
sillero / strSearch + unlatinize
Last active December 30, 2015 10:09
String search + unlatinize
{
"terms": {
"search": "tração",
"text": "Concentração prévia tração centrado"
},
"found": true,
"result": [
{
"str": "Concen",
"isMatch": false