Skip to content

Instantly share code, notes, and snippets.

View noquierouser's full-sized avatar

Marco González Luengo noquierouser

View GitHub Profile
@noquierouser
noquierouser / RedCastRunner.js
Last active June 19, 2019 07:12
Small timeout runner for RedCast OnTime
const { execFile } = require("child_process");
const timeoutSeconds = 5;
console.log(`Waiting ${timeoutSeconds} seconds before launching RedCast OnTime...`);
setTimeout(() => {
console.log("Starting RedCast OnTime.");
execFile("RedCast OnTime.exe").unref();
}, timeoutSeconds * 1000);
@noquierouser
noquierouser / os-x-update-tzdata.sh
Last active January 30, 2018 14:09 — forked from tgirardi/os-x-update-tzdata.sh
Actualiza los datos de tzdata e ICU en OS X para arreglar problemas con información de zonas horarias obsoletas. Necesita reiniciar el equipo después de aplicarse.
#!/bin/bash
# author: Tomás Girardi
# Based on http://helw.net/2011/04/28/updating-osx-for-egypts-dst-changes/ by Ahmed El-Helw
# CHANGE THIS:
# go to https://www.iana.org/time-zones and get the URL for the last DATA
# release
URLTZDATASRC=https://www.iana.org/time-zones/repository/tzdata-latest.tar.gz
# BACKUP your current icu file first
function validaRut(campo){
if ( campo.length == 0 ){ return false; }
if ( campo.length < 8 ){ return false; }
campo = campo.replace('-','')
campo = campo.replace(/\./g,'')
var suma = 0;
var caracteres = "1234567890kK";
var contador = 0;

Sass/Less Comparison

In this document I am using Sass's SCSS syntax. You can choose to use the indented syntax in sass, if you prefer it, it has no functional differences from the SCSS syntax.

For Less, I'm using the JavaScript version because this is what they suggest on the website. The ruby version may be different.

Variables

@noquierouser
noquierouser / 40_custom
Created October 21, 2016 00:23
Adding Android-x86 as a GRUB entry in Ubuntu
#!/bin/sh
exec tail -n +3 $0
# This file provides an easy way to add custom menu entries. Simply type the
# menu entries you want to add after this comment. Be careful not to change
# the 'exec tail' line above.
# /etc/grub.d/40_custom
menuentry "Android-x86" {
set root='(hd1,msdos2)'
@noquierouser
noquierouser / .htaccess
Last active August 29, 2015 14:08 — forked from ScottPhillips/.htaccess
Cosas interesantes que se pueden hacer con .htaccess
#301 Redirects for .htaccess
#Redirect a single page:
Redirect 301 /pagename.php http://www.domain.com/pagename.html
#Redirect an entire site:
Redirect 301 / http://www.domain.com/
#Redirect an entire site to a sub folder
Redirect 301 / http://www.domain.com/subfolder/
@noquierouser
noquierouser / grad-gen-twbs.php
Last active October 21, 2016 00:25
Generador de gradientes, para botones en Twitter Bootstrap 2
<?php
function hex2rgb($hex) {
$hex = str_replace("#", "", $hex);
if(strlen($hex) == 3) {
$r = hexdec(substr($hex,0,1).substr($hex,0,1));
$g = hexdec(substr($hex,1,1).substr($hex,1,1));
$b = hexdec(substr($hex,2,1).substr($hex,2,1));
} else {
$r = hexdec(substr($hex,0,2));