Skip to content

Instantly share code, notes, and snippets.

View danielo515's full-sized avatar
🏠
Working from home

Daniel Rodríguez Rivero danielo515

🏠
Working from home
View GitHub Profile
@danielo515
danielo515 / javascript.json
Created August 11, 2016 17:10
My javascript snippets for VSCode
{
/*
// Place your snippets for JavaScript here. Each snippet is defined under a snippet name and has a prefix, body and
// description. The prefix is what is used to trigger the snippet and the body will be expanded and inserted. Possible variables are:
// $1, $2 for tab stops, ${id} and ${id:label} and ${1:label} for variables. Variables with the same id are connected.
// Example:
"Print to console": {
"prefix": "log",
"body": [
"console.log('$1');",
@danielo515
danielo515 / getBGImgURLsFromCSSs.js
Last active May 3, 2016 15:49 — forked from donut/getBGImgURLsFromCSSs.js
Builds a list of images found in the linked style sheets
window.npup = (function (doc) {
var sheets = doc.styleSheets;
var hash = {}, sheet, rules, rule, url, match;
// loop the stylesheets
for (var sheetIdx=0, sheetsLen=sheets.length; sheetIdx<sheetsLen; ++sheetIdx) {
sheet = sheets[sheetIdx];
// ie or w3c stylee rules property?
rules = sheet.rules ? sheet.rules : sheet.cssRules;
// loop the rules
for (var ruleIdx=0, rulesLen=rules.length; ruleIdx<rulesLen; ++ruleIdx) {
@danielo515
danielo515 / colors.py
Last active December 2, 2015 13:19 — forked from jossef/colors.py
python coloring for linux, based on this answer http://stackoverflow.com/a/26445590/3191896
def color(text, *user_styles):
styles = {
# styles
'reset': '\033[0m',
'bold': '\033[01m',
'disabled': '\033[02m',
'underline': '\033[04m',
'reverse': '\033[07m',
@danielo515
danielo515 / fieldmangleer_extended.js
Last active October 4, 2015 14:25
An extension of the TW5 fieldmangler widget
/*\
title: $:/plugins/danielo515/OctoWiki/Widgets/FieldMangler
type: application/javascript
module-type: widget
\*/
(function(){
/*jslint node: true, browser: true */
/*global $tw: false */
@danielo515
danielo515 / data.json
Created October 1, 2015 12:08
Require basic example taht fails
[
{
"name":"My Cool Operator Template Created",
"text":"Created filter $FilterID$ for operator $OPName$"
}
]
@danielo515
danielo515 / auto-deploy.md
Created September 24, 2015 19:03 — forked from domenic/0-github-actions.md
Auto-deploying built products to gh-pages with Travis

Auto-deploying built products to gh-pages with Travis

This is a set up for projects which want to check in only their source files, but have their gh-pages branch automatically updated with some compiled output every time they push.

Create a compile script

You want a script that does a local compile to e.g. an out/ directory. Let's call this compile.sh for our purposes, but for your project it might be npm build or gulp make-docs or anything similar.

The out/ directory should contain everything you want deployed to gh-pages. That almost always includes an index.html.

@danielo515
danielo515 / README.md
Last active September 6, 2015 17:28 — forked from chrisjacob/README.md
Setup GitHub Pages "gh-pages" branch as a subfolder within the "master" project on your local checkout - a step-by-step guide.

Intro

Setup GitHub Pages "gh-pages" branch as a subfolder within the "master" project on your local checkout.

IMPORTANT

If you plan on switching between different branches (e.g. git checkout master-experiment then revert back with git checkout master) you will loose your child folder from this tutorial (because it's in your .gitignore and is not part of your master branch).

@danielo515
danielo515 / style.css
Last active August 29, 2015 14:26
Styles are not being applied
.panel {width:45%; float:left; display:inline-block}
#result_raw {font-size:50%}
@danielo515
danielo515 / GlobalPopupProblem
Created July 28, 2015 12:07
Problem with global popups in cloudwall
({
data: {
popup:{}
},
init: function ($form, form) {
$form.html(this.html);
$.my.modal.parent("#globalPopup");
},
ui: {
"#btn-html": function (d,v,$o){
@danielo515
danielo515 / Embeded font
Created June 23, 2015 12:54
A small font subset of foundation icons
@charset "UTF-8";
@font-face {
font-family: "untitled-font-1";
src:url(data:application/font-woff2;charset=utf-8;base64,d09GMgABAAAAAAnYABEAAAAAEegAAAlzAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAP0ZGVE0cGh4GVgCCcggYCYRlEQgKjzSNUQE2AiQDZAs0AAQgBYNkB4FTDIE0P3dlYmYGG6YPyB6FjWO5D0nQRlnisX3/P23a3zcGmcFjNND2kYkDDYkTOSVG7G+jhCGNacXYlG1z9ge+pWdYcXnDSoVVp0q/WlatAg9vt/ejBM8L/FYaSN5WBJEEwUnbP7TyX7Twx7k3m2w/I5SzxMZNzsn2fXxJeUCYcQ8AJDlROGAyjoQ6e0LZO2T337WELXlI+mAvFAAQAMCJ52JHWtoOvtj/rXVQ/TQAkAWAAkTQjARTI+DLbkDXAAsM62JvUTVrem36NMwMBgAK2DTArRH81d6zbQYAtPnnVeFUGKgBivg6HerWFt0hkCYz0AvAQBwa8NW1sFB4XIrH88+noDaTBf5I6jv/wt/+97cjf7SuH5PPQdySnYg60/7Mswzof4lmWE6lTuNBug2dAccteN8HEvH78gGWJBIcCekb+UWvRLr2B6SdxWomnF1qDLRf7PIAPk1Q+iazkyAH/iPR2J2EcnT3S21iwCbdmnYsmjHx9Eo24gk4CeMY5mMTbQelv1g+DFj63Fa6YPksYBFthLVLxLs/0KlgdS5/1qEdGXYSzqHkokMry/jQyIiFwBTjKoeS18z0BKsdJiN2lzpJmgNfvgC+IT8SJnR+p4gJU9BFoHeXZ+VJnK2ttdhsAYtci/TDYhq/s1GDxWCbbVxw4JNHSWngCUqJyj4iYdwueie3YQnPTA2HPly7qqqGYhm3y95JUcayuBQXJ7aJR1fPBo0+4pmtqP2FbhV3Y9Jss1lwUr4CdcBiJybg25ewiSzqHSJOLuw