Skip to content

Instantly share code, notes, and snippets.

@yoander
yoander / xmlpp.py
Last active January 9, 2020 03:19
Python script to pretty print XML files
#!/usr/bin/python
import os
import re
import HTMLParser as parser
import xml.dom.minidom as minidom
import sys
try:
# Read de file name from standard input
filename = sys.argv[1]
#!/usr/bin/env php
<?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
yoander / file1.json
Last active August 4, 2016 03:58
For testing GithubGet wordpress plugin
{
"firstName": "John",
"lastName": "Smith",
"isAlive": true,
"age": 25,
"job": "Software Developer"
"address": {
"streetAddress": "21 2nd Street",
"city": "New York",
"state": "NY",
@yoander
yoander / phpMyAdminConfig.php
Last active May 30, 2016 02:13
phpMyAdmin Configuration file
<?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 <http://wiki.phpmyadmin.net>.
*
* @package phpMyAdmin
@yoander
yoander / anonymous-class.php
Last active August 7, 2016 22:21
New features of PHP 7
<?php
define('PLAYERS', [
'1' => ['Garry Kasparov', 2851],
'2' => ['Anatoly Karpov', 2780],
'3' => ['Magnus Carlsen', 2882],
'4' => ['Bobby Fischer', 2785]
]);
interface PlayerDetailsInterface
<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.
[http]
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
@yoander
yoander / data.xml
Last active November 21, 2018 14:27
<?xml version="1.0" encoding="UTF-8"?>
<records>
<record>
<Name>Nicole</Name>
<Company>Ac Mattis LLC</Company>
<Address>Ap #823-8881 Adipiscing Avenue</Address>
<City>Fontanellato</City>
<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 /*
@yoander
yoander / dirs.txt
Last active November 7, 2016 19:08
gnu linux/debian
gnu linux/ubuntu
cms
commands
editors/vim
editors/geany
games
nosql
unix