Skip to content

Instantly share code, notes, and snippets.


Yoander Valdés Rodríguez yoander

View GitHub Profile
yoander /
Last active Jan 9, 2020
Python script to pretty print XML files
import os
import re
import HTMLParser as parser
import xml.dom.minidom as minidom
import sys
# Read de file name from standard input
filename = sys.argv[1]
View xmlpp.php
#!/usr/bin/env php
// Check the scripts is called with arguments
if (empty($argv[1])) {
die('You must specify a file!');
// Set the file name
$file = $argv[1];
yoander / file1.json
Last active Aug 4, 2016
For testing GithubGet wordpress plugin
View file1.json
"firstName": "John",
"lastName": "Smith",
"isAlive": true,
"age": 25,
"job": "Software Developer"
"address": {
"streetAddress": "21 2nd Street",
"city": "New York",
"state": "NY",
yoander / phpMyAdminConfig.php
Last active May 30, 2016
phpMyAdmin Configuration file
View phpMyAdminConfig.php
/* vim: set expandtab sw=4 ts=4 sts=4: */
* phpMyAdmin sample configuration, you can use it as base for
* manual configuration. For easier setup you can use setup/
* All directives are explained in Documentation.html and on phpMyAdmin
* wiki <>.
* @package phpMyAdmin
yoander / anonymous-class.php
Last active Aug 7, 2016
New features of PHP 7
View anonymous-class.php
define('PLAYERS', [
'1' => ['Garry Kasparov', 2851],
'2' => ['Anatoly Karpov', 2780],
'3' => ['Magnus Carlsen', 2882],
'4' => ['Bobby Fischer', 2785]
interface PlayerDetailsInterface
View gnu-manifesto.html
<strong>GNU Manifesto</strong><br/>
GNU, which stands for Gnu's Not Unix, is the name for the complete Unix-compatible software system which I am writing so that I can give it away free to everyone who can use it.<br/> Richard Stallman.
View en.gitconfig
proxy = http://user:pwd@proxy-url:proxy-port
# Useful if your proxy only allows known user agent
useragent = Mozilla/4.0
# Uncomment bellow line if your Repo provider provides
# a non root certificate for example a self generated
# certificate but be cautios your source must be a
# trusted source
# sslVerify = false
# This save your Repo credentials on ~/.git-credentials
View data.xml
<?xml version="1.0" encoding="UTF-8"?>
<Company>Ac Mattis LLC</Company>
<Address>Ap #823-8881 Adipiscing Avenue</Address>
<Country>Puerto Rico</Country>
<Phone>(444) 834-6922</Phone>
<Geo>5.84145, -13.30146</Geo>
awk '$1 !~ /(^#)|^$/ && $3 !~ /(none|swap)/ && $2 != "/" {print $2} END {print "/proc\n/run\n/var/run\n/dev"}' /etc/fstab > /tmp/du-exclude.txt && sudo du -sh -X /tmp/du-exclude.txt /*
View dirs.txt
gnu linux/debian
gnu linux/ubuntu