Skip to content

Instantly share code, notes, and snippets.

View perseoq's full-sized avatar
🐧
pingü

Rodrigo perseoq

🐧
pingü
View GitHub Profile
@perseoq
perseoq / grb.php
Created March 26, 2015 14:44
Agrega artículos de la CPEUM a la Base de Datos XML
<?php
class SimpleXMLExtended extends SimpleXMLElement {
public function addCDATA($cData) {
$node = dom_import_simplexml($this);
$node->formatOutput = true;
$no = $node->ownerDocument;
$node->appendChild($no->createCDATASection($cData));
}
}
$get_num = $_POST['numero'];
@perseoq
perseoq / gist:77a456509a8f47ff7716
Created June 22, 2015 23:24
Crear botón para hacer de un sitio, una homepage.
<a href="#" onClick="this.style.behavior='url(#default#homepage)';this.setHomePage('aqui la URL');">
d
</a>
@perseoq
perseoq / makeXML.php
Created January 13, 2016 16:04
Crear un archivo XML con CDATA con PHP
<?php
class SimpleXMLExtended extends SimpleXMLElement {
public function addCDATA($cData) {
$node = dom_import_simplexml($this);
$node->formatOutput = true;
$no = $node->ownerDocument;
$node->appendChild($no->createCDATASection($cData));
}
}
$get_num = $_POST['numero'];
@perseoq
perseoq / 0_reuse_code.js
Created March 16, 2016 06:17
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
Por app
~$ sudo trickle -d 200 -u 10 /ruta/app
Por wget
~$ wget --limit-rate=200k http://algo.com
sudo npm cache clean -f
sudo npm install -g n
sudo n stable
location ~ \.php$ {
try_files $uri =404;
fastcgi_pass unix:/var/run/php5-fpm.sock;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
@perseoq
perseoq / MKV to MP4 LINUX
Created June 15, 2016 23:40
MKV to MP4 LINUX libav-tools
sudo apt-get install libav-tools
avconv -i input.mkv -codec copy output.mp4
#!/usr/bin/env bash
URL="https://github.com/gkovacs/pdfocr.git"
INSTALL_DIR="/opt/pdfocr"
INSTALL_PREFIX="/usr/local"
if ! type git > /dev/null 2>&1; then
echo "'git' is not found. Install it with the command below and try again"
echo
echo " $ sudo apt-get install git"
echo
@perseoq
perseoq / acentos_espanol.tex
Created December 14, 2016 17:53
Acentos, Símbolo de grados, tilde de la Ñ para LATEX (Libro)
\documentclass[12pt,a4paper]{book}
\usepackage[latin1]{inputenc}
\usepackage[spanish]{babel}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{graphicx}
\usepackage{selinput}
\SelectInputMappings{
aacute={á},