Skip to content

Instantly share code, notes, and snippets.

View aVolpe's full-sized avatar
:electron:
Hacking

Arturo Volpe aVolpe

:electron:
Hacking
View GitHub Profile
@aVolpe
aVolpe / create_all.sh
Created November 20, 2017 16:56
Push a folder full of git repositories to a new created projects in gitlab
#!bin/bash
#set -x
for i in $(find $1 -type d -maxdepth 1);
do
NAME=`basename $i | sed -e 's/[a-z]*_//'`;
# Excluimos la carpeta principal
if [ "$NAME" == "repos" ]
then
continue # Skip rest of this particular loop iteration.
@aVolpe
aVolpe / package.json
Last active July 20, 2022 12:32
Build a angular-cli project with maven
{...
"scripts": {
"ng": "ng",
"start": "ng serve --proxy-config proxy.conf.json",
"clean": "rm -rf dist",
"build-prod": "yarn install && ng build -prod",
"build-dev": "yarn install && ng build -dev",
"test": "ng test",
"lint": "ng lint",
"e2e": "ng e2e"
@aVolpe
aVolpe / EmbeddedGist.js
Created September 13, 2016 22:58
EmbeddedGist allows a gist to be embedded in a React application
import React, { Component } from 'react';
class EmbeddedGist extends Component {
constructor(props) {
super(props);
this.gist = props.gist;
this.file = props.file;
this.stylesheetAdded = false;
this.state = {
@aVolpe
aVolpe / DigitGenerator.js
Last active November 28, 2016 14:10
Obtener el dígito verificador de la Secretaria de Estado de Tribulación del Paraguay
export default class DigitGenerator {
getDigitoVerificadorBase11 = (ruc) => {
return this.getDigitoVerificador(ruc, 11);
}
getDigitoVerificador = (ruc, base) => {
var k = 2;
@aVolpe
aVolpe / TestCounter.java
Created April 20, 2016 22:18
Desafio Owl
package test;
import java.util.Map;
import java.util.function.Function;
import java.util.stream.Collectors;
public class TestCounter {
public static void main(String[] args) {
@aVolpe
aVolpe / Dockerfile
Last active December 17, 2017 18:03
A example dockerfile to use pgFouine with postgresql 9.4
FROM postgres:9.4
MAINTAINER Arturo Volpe <arturovolpe@gmail.com>
ENV DB_NAME test
ENV DB_USER admin
ENV DB_PASS password
RUN apt-get update && apt-get install -y wget && wget --no-check-certificate --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | apt-key add -
RUN sh -c 'echo "deb http://apt.postgresql.org/pub/repos/apt/ precise-pgdg main" >> /etc/apt/sources.list.d/postgresql.list'
RUN apt-get update && apt-get install -y postgresql-9.3-postgis-2.1 -f
ADD setup-database.sh /docker-entrypoint-initdb.d/ # this scripts creates a database, is optional
@aVolpe
aVolpe / paraguay.json
Created February 10, 2016 22:34
GeoJson de los departamentos del Paraguay
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@aVolpe
aVolpe / scraper.py
Last active August 18, 2020 14:21
Extractor de información histórica de cotizaciones en Paraguay
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# Dependencias:
# - beautifulsoup4
import sys
import time
import urllib
import urllib.request
@aVolpe
aVolpe / test.py
Created January 25, 2016 19:54
Ejemplo de scraping con python para curso de open data
import urllib2
from bs4 import BeautifulSoup
e = urllib2.urlopen("http://es.wikipedia.org/wiki/Paraguay").read()
soup = BeautifulSoup(e, 'html.parser')
# Ejemplo de como imprimir todo
# print soup.prettify()
@aVolpe
aVolpe / service.bat
Created October 30, 2015 20:19
Jboss as service
---------------------------------------------------------------------------------------------------
@echo off
REM JBoss, the OpenSource webOS
REM
REM Distributable under LGPL license.
REM See terms of license at gnu.org.
REM
REM -------------------------------------------------------------------------
REM JBoss Service Script for Windows
REM -------------------------------------------------------------------------