Skip to content

Instantly share code, notes, and snippets.

View ZeroDragon's full-sized avatar
🌮
Tacos de canasta

Zero Dragon ZeroDragon

🌮
Tacos de canasta
View GitHub Profile
@ZeroDragon
ZeroDragon / labelnator.sh
Last active July 5, 2018 19:21
Para meter las labels a los repos de RTD
#!/bin/sh
REPO=resuelve/$1
TOKEN=$2
labels=(
'{"name": "Bug 🐛", "description": "MUCHO ROJO!!!", "color": "d73a4a"}'
'{"name": "Documentación 📗", "description": "Documentación", "color": "a369ef"}'
'{"name": "Epic", "description": "Épica", "color": "3E4B9E"}'
'{"name": "Hackday 💡", "description": "Puntos extras por mejora muy opcional", "color": "5319e7"}'
@ZeroDragon
ZeroDragon / Rangemap.js
Created June 11, 2018 22:50
Range translator
class Rangemap {
constructor (input, output) {
this.inMin = input[0]
this.inMax = input[1]
this.outMin = output[0]
this.outMax = output[1]
}
transport (value, trim = false) {
let retval = (value - this.inMin) *
(this.outMax - this.outMin) / (this.inMax - this.inMin) +
#!/bin/sh
echo "Last tag is:"
git tag | sed -e '$!d'
echo "Want to tag current commit? type the name of the tag (leave empty to skip)"
read current
if [ "$current" != "" ]; then
git tag -a $current
fi
echo "Type the name of the tag you want to move (leave blank to skip)"
@ZeroDragon
ZeroDragon / RETAGGER.md
Last active October 11, 2017 21:05
Git retagger

Rettager

This file will help you to create tags in your git repository.
Also you can use it to move a tag from commit to commit (for build tags).

Usage

Just add retagger.sh to anyplace you want (bin maybe) and add execution permissions.
Also you can just leave it in your Documents or Downloads and just add an alias in your .bashrc file

###*
* Fancy ID generator that creates 20-character string identifiers with the following properties:
*
* 1. They're based on timestamp so that they sort *after* any existing ids.
* 2. They contain 72-bits of random data after the timestamp so that IDs won't collide with other clients' IDs.
* 3. They sort *lexicographically* (so the timestamp is converted to characters that will sort properly).
* 4. They're monotonically increasing. Even if you generate more than one in the same timestamp, the
* latter ones will sort after the former ones. We do this by using the previous random bits
* but "incrementing" them by 1 (only in the case of a timestamp collision).
###
@ZeroDragon
ZeroDragon / app.coffee
Last active September 28, 2016 14:32
Slack File Deleter
###*
* Confugure HERE
###
token = "Slack-Token" #Slack token
domain = "myTeamName" #Your team name
maxCool = 10 #Max retries to get files list
days = 7 #Keep this days of files
###*
* Stop editing
###
@ZeroDragon
ZeroDragon / consoleImage.coffee
Last active April 10, 2016 05:00
image on dev tools for chrome
if console?.log?
url = "http://i.imgur.com/oGiMR.gif"
getBox = (width, height)->
return {
string: "+",
style: "font-size: 1px; padding: " + Math.floor(height/2) + "px " + Math.floor(width/2) + "px; line-height: " + height + "px;"
}
img = new Image()
img.onload = ->
dim = getBox(@.width, @.height);
@ZeroDragon
ZeroDragon / README.md
Created April 7, 2016 00:53
ChaiTea Plugins

First plugin test...

request = require 'request'
crypto = require 'crypto'
querystring = require 'querystring'
class Freezer
constructor: (data) ->
@coinWallet = data.coinWallet
@wallets = {
BTC : data.BTC
@ZeroDragon
ZeroDragon / README.md
Last active November 11, 2023 18:39
Este es un grid system para CSS

Stylus Minimal Grid System

Un sistema de columnas para CSS, basado en 12 columnas, líquido, MVP.
Puede ser usado como semilla para extenderlo a diferentes resoluciones o páginas responsivas.

Por default el gap entre columnas es de 10px, pero se puede cambiar con la variable gap en la línea 2

## Update 2016-09-30 Agrego una versión modificada responsiva. Incluye la misma base a 12 columnas, reduje el gap a 8px Hice el grid a 5 saltos responsivos: