Skip to content

Instantly share code, notes, and snippets.

@FabianPastor
FabianPastor / Meneame_CSS_Edit.js
Created October 16, 2015 11:11
UserScript para Greasymonkey para modificar el CSS de Meneame
// ==UserScript==
// @name Meneame CSS Edit
// @namespace FabianPastor
// @include https://www.meneame.net/*
// @version 1
// @grant none
// ==/UserScript==
$(".ads-interlinks").remove();
$("#sidebar").remove();
@FabianPastor
FabianPastor / Mediavida_Abrir_Spoilers.js
Created October 18, 2015 03:31
Abre todos los spoilers de mediavida
// ==UserScript==
// @name Mediavida Abrir Spoilers
// @description Abre todos los spoilers de mediavida
// @namespace FabianPastor
// @include http://www.mediavida.com/foro/*/*
// @run-at document-end
// @version 1.0.0
// @grant none
// ==/UserScript==
var i=0;
@FabianPastor
FabianPastor / Pordede_AutoContinue.js
Last active October 18, 2015 17:00
UserScript para Greasymonkey que redirecciona automáticamente en la pagina Pordede al abrir un enlace.
// ==UserScript==
// @name Pordede AutoContinue
// @description Le da click al continue cuando abres un link a otra web.
// @namespace @FabianPastor
// @include http://www.pordede.com/aporte/*
// @version 1.0.0
// @grant none
// ==/UserScript==
location=$(".links .episodeText").attr("href");
@FabianPastor
FabianPastor / firefox-last-portable.sh
Last active December 2, 2015 14:58
Portable - Descarga la última versión de Firefox y de flashplayer y usa un archivo encriptado para abrir el perfil de FF.
#!/bin/bash
#Esta parte ejecutarla solo en entornos donde la carpeta personal se crea cada vez que te registras
#chmod -R go-rwx /home/`whoami`/ #Quitamos permisos de la carpeta personal a otros usuarios
#export LANG="es_ES.UTF-8" #Le decimos de usar un tipo de idioma y charset determinado
rojo="\e[1m\e[31m"; #Color Rojo con negrita
verde="\e[1m\e[32m"; #Color verde con negrita
end="\e[0m"; #Color de reset
function downloadFlash {
#!/usr/bin/php
<?php
if($_SERVER['USER']!="root"){
echo "Debes ser Root, ejecuta con sudo".PHP_EOL;
exit(1);
}
$option=new Options();
//TODO: Force Download Version
$fversion=false;
@FabianPastor
FabianPastor / TDesktopDependencies.sh
Last active October 16, 2017 12:17
Instalador de dependencias de TDesktop para Ubuntu 12.04
#!/bin/bash
cpus="6"
# zlibv="1.2.8"
opusv="v1.2-alpha2"
ffmpegv="3.2"
portaudiov="pa_stable_v19_20140130_r1919"
opensslv="OpenSSL_1_0_1-stable"
cmakev="3.6.2" #Cuidado al cambiar esto. Tener en cuenta gyp/refresh.sh
tddir="tdesktop"
#!/bin/bash
# Get the coordinates of the active window's
# top-left corner, and the window's size.
# This excludes the window decoration.
unset x y w h
eval $(xwininfo |
sed -n -e "s/^ \+Absolute upper-left X: \+\([0-9]\+\).*/x=\1/p" \
-e "s/^ \+Absolute upper-left Y: \+\([0-9]\+\).*/y=\1/p" \
-e "s/^ \+Width: \+\([0-9]\+\).*/w=\1/p" \
-e "s/^ \+Height: \+\([0-9]\+\).*/h=\1/p" )
<?php
namespace GitHub\Status;
class API{
//This URLS Can change in any time.
protected $urls=[
"status.github.com",
"octostatus-production.github.com",
"octostatus-9676240.us-east-1.elb.amazonaws.com",
"54.243.208.39",
"107.22.212.99",
@FabianPastor
FabianPastor / index.php
Last active January 31, 2017 11:47
Route file for mirroring telegram desktop update system
<?php
/************************
** Author: FabianPastor
** Description: Simple route file for mirroring telegram desktop update system
**
** You can test it in local by using the PHP integrated Webserver:
** $ php -S localhost:8080 index.php
** Also if you want to use it on Apache2 make sure you have mod_rewrite enabled.
** This would be the content for the .htaccess
DirectorySlash Off
@FabianPastor
FabianPastor / iana_langs.php
Created June 13, 2017 12:58
Small script to download and format into JSON the IANA Languages subtag registry
<?php
$iana_lang_subtags_file = 'iana_lang_subtags.txt';
$iana_lang_subtags_url = 'https://www.iana.org/assignments/language-subtag-registry/language-subtag-registry';
$iana_lang_subtags_json = 'iana_lang_subtags.json';
$update = false; if(isset($argv[1])) $update = true;
$langs = new stdClass;
$langs->metadata = new stdClass;
$uri = $iana_lang_subtags_file;