Skip to content

Instantly share code, notes, and snippets.

View esparta's full-sized avatar

Espartaco Palma esparta

View GitHub Profile
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@esparta
esparta / checker.py
Last active August 29, 2015 13:56
Checks a list of URLs ...
"""
URL Checker.
A basic tester for the URL
"""
from __future__ import print_function
import re
import requests
from colors import Colors
def test_url(url):
@esparta
esparta / 01.-Metrologos.md
Last active August 29, 2015 14:01
MetroLogos in development (using Vagrant)

These are the steps for a minimal development box for Metrologos.

Requirements

I'm going to use a virtual machine with VirtualBox using Vagrant, so you must install them beforehand. Also, it will need the hashicorp/precise32 box (will be downloaded if not present), if you want to use other debian-compatible, change the Vagranfile according.

As we are going to install ubuntu packages, you'll need some kind of internet access (if a 33.6 Kbps dial-up it's OK for you, it's OK for me)

Instructions

#!/bin/bash
set -o errexit
# Author: David Underhill
# Script to permanently delete files/folders from your git repository. To use
# it, cd to your repository's root and then run the script with a list of paths
# you want to delete, e.g., git-delete-history path1 path2
if [ $# -eq 0 ]; then
exit 0
@esparta
esparta / add-proxy.sh
Last active December 26, 2015 09:28
Apt-get behind proxy
#Add-apt-repository behind proxy
#---- Long Term Solution ---
#Set export variables onto .bashrc
sudo nano ~/.bashrc
#Add following lines
echo "export http_proxy=http://url:port" >> ~/.bashrc
echo "export https_proxy=http://url:port" >> ~/.bashrc
#Preserve environment variables
@esparta
esparta / importancia-SL-ciencia.md
Created July 31, 2014 18:36
La importancia del Software Libre en la Ciencia

La importancia del Software Libre en la Ciencia

©2014 Almar Klein

Science Para el primer post en este blog deseo escribir sobre algo que realmente importa. Al menos para mí. Traté de llegar al punto medular de lo que está detrás de lo que me dedico: ¿Cuáles son las razones fundamentales por las que amo tanto al Software Libre?

Keybase proof

I hereby claim:

  • I am esparta on github.
  • I am esparta (https://keybase.io/esparta) on keybase.
  • I have a public key whose fingerprint is 9DE8 0ED3 E52E E98C 7B48 C513 E267 187D 075D 3405

To claim this, I am signing this object:

@esparta
esparta / repair-apt.sh
Created October 24, 2013 00:24
Repair broken apt-get
##Howto: Repair Broken apt-get update on debian/ubuntu
sudo -i
apt-get clean
cd /var/lib/apt
mv lists lists.old
mkdir -p lists/partial
apt-get clean
apt-get update
@esparta
esparta / 00_README.md
Created July 16, 2019 17:59
How to make constants really 'private'

How to make constants really 'private'

There's a constant misunderstanding about how private method works...

For example, this DOES NOT make BAR a private constant:

class This
  private
@esparta
esparta / 00benchmark_for_pr577_dry_validations.md
Last active August 1, 2019 17:42
Benchmarks for PR #577 at dry-rb/validations

Proposal

ref: dry-rb/dry-validation#577

A small change on how to create the final values when requesting a complex hash. Instead of a ruby loop, have fetch_values call.

Case: works with a hash pointing to multiple values