Skip to content

Instantly share code, notes, and snippets.

Avatar
:electron:
Hacking

Arturo Volpe aVolpe

:electron:
Hacking
View GitHub Profile
@aVolpe
aVolpe / check_ram.js
Last active Mar 29, 2021
Check the ram of a jvm process using nashron (given only a jre)
View check_ram.js
function addUrlToClasspath(pathName) {
var/*java.net.URLClassLoader*/
sysloader = /*(java.net.URLClassLoader) */ java.lang.ClassLoader.getSystemClassLoader();
var/*java.lang.Class*/ sysclass = java.net.URLClassLoader.class;
var ClassArray = Java.type("java.lang.Class[]");
var parameters = new ClassArray(1);
parameters[0] = java.net.URL.class;
var/*java.lang.reflect.Method*/ method = sysclass.getDeclaredMethod("addURL", parameters);
method.setAccessible(true);
var ObjectArray = Java.type("java.lang.Object[]");
View generate_rows.py
#!/usr/bin/python3
import sys
import re
def get_file_data(file_name):
cleaned = file_name \
.replace('PERDOMO2016_1', 'PERDOMO_2016_1') \
.replace('SOSARIELLA_216', 'SOSARIELLA_2016') \
.replace('221.035', '221035') \
@aVolpe
aVolpe / NumeroALetras.ts
Last active Aug 21, 2019 — forked from alfchee/NumeroALetras.js
Código en JavaScript que convierte números a letras, bastante útil para formularios de documentos contables y similares
View NumeroALetras.ts
/*************************************************************/
// NumeroALetras
// The MIT License (MIT)
//
// Copyright (c) 2015 Luis Alfredo Chee
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
@aVolpe
aVolpe / poi.sql
Last active Mar 21, 2019
senadores del py
View poi.sql
INSERT INTO poi(name,afiliation,phone,email,type) VALUES
('AFARA MACIEL, JUAN EUDES','A.N.R.','414-5248',NULL,'SENADOR'),
('ALVARENGA DE ORTEGA, HERMELINDA','P.L.R.A','414-5156','hermelindasensei@hotmail.com','SENADOR'),
('AMARILLA GUIRLAND, DIONISIO OSWALDO','P.L.R.A','414-5135','damarill@economistas.com','SENADOR'),
('APURIL SANTIVIAGO, GILBERTO ANTONIO','PPH','414-5082',NULL,'SENADOR'),
('ARÉVALO FERNÁNDEZ, MARIO MARTÍN','A.N.R.','414-5215','martinarevalo68@gmail.com','SENADOR'),
('ARRÚA DE DOLINSKY, GEORGIA MARÍA','PPQ','414-5049',NULL,'SENADOR'),
('BACCHETTA CHIRIANI, ENRIQUE FAUSTO','A.N.R.','414-5288','ebachetta@senado.gov.py','SENADOR'),
('BAJAC DE PENNER, MARÍA EUGENIA BEATRÍZ','P.L.R.A','414-5146',NULL,'SENADOR'),
('BARRIOS FERNÁNDEZ, ANTONIO CARLOS','A.N.R.','414-5238',NULL,'SENADOR'),
@aVolpe
aVolpe / scrap.bash
Created Mar 7, 2019
Scrap IPS db by 'Cédula'
View scrap.bash
#!/bin/bash
# Usage:
#
# bash scrap.bash 100000 200000
START=$1
END=$2
View SchemaGeneratorDemo.java
import com.github.fluent.hibernate.cfg.scanner.EntityScanner;
import org.hibernate.SessionFactory;
import org.hibernate.boot.Metadata;
import org.hibernate.boot.MetadataSources;
import org.hibernate.boot.registry.StandardServiceRegistryBuilder;
import org.hibernate.cfg.AvailableSettings;
import org.hibernate.cfg.Configuration;
import org.hibernate.dialect.PostgreSQL94Dialect;
@aVolpe
aVolpe / IonicMocks.ts
Created Dec 7, 2018
Simple mocks for ionic
View IonicMocks.ts
export class MockLoading {
public visible: boolean;
constructor(props: any) {
Object.assign(this, props);
this.visible = false;
}
present() {
this.visible = true;
@aVolpe
aVolpe / create_all.sh
Created Nov 20, 2017
Push a folder full of git repositories to a new created projects in gitlab
View create_all.sh
#!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 Mar 30, 2020
Build a angular-cli project with maven
View package.json
{...
"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 Sep 13, 2016
EmbeddedGist allows a gist to be embedded in a React application
View EmbeddedGist.js
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 = {