Skip to content

Instantly share code, notes, and snippets.

View dvelez-jimenez's full-sized avatar

Daniel Velez Jimenez dvelez-jimenez

View GitHub Profile
{
"qna": [
{
"qid": "QnABot.002",
"q": [
"Como uso el robot PyR"
],
"a": "Cree y administre sus preguntas y respuestas utilizando la interfaz de usuario del Diseñador de contenido de Q y A Bot. Los usuarios finales hacen preguntas utilizando la interfaz de usuario web de Lex, que admite voz o chat, o utilizando dispositivos de Alexa para la interacción de voz con manos libres.",
"r": {
"title": "",
@dvelez-jimenez
dvelez-jimenez / git-log.md
Created February 4, 2019 23:59
Git log format

Usualmente realizo un comentario en un ticket en Jira con los commits asociados y un enlace a la interfaz web del git (Gitlab en este caso)

Me canse de hacerlo manualmente, así que:

git log --pretty=format:'[%h|https://{your-git-url-for-commit.com}/%h] - %s <%an>'

Ahora para no escribir eso todas las veces

Creo un alias.

@dvelez-jimenez
dvelez-jimenez / ObjectUtil.java
Last active February 5, 2019 00:01
Magia negra de injeccion de parametros usando reflection by Airon
import java.lang.reflect.Field;
import java.util.map;
public class ObjectUtil {
public static void injectFromMap(Object t1, Map<String, String> props) throws IllegalArgumentException, IllegalAccessException{
Class<? extends Object> c = t1.getClass();
Field[] fields = t1.getClass().getDeclaredFields();
for(Field field: fields){
String fullName = c.getName() + "." + field.getName();
@dvelez-jimenez
dvelez-jimenez / match-all.action
Created February 23, 2012 00:27
Privoxy bypass OFw update.
#############################################################################
# $Id: match-all.action,v 1.3 2010/03/27 18:48:38 fabiankeil Exp $
#
# This file contains the actions that are applied to all requests and
# may be overruled later on by other actions files. Less experienced
# users should only edit this file through the actions file editor.
#
#############################################################################
{+change-x-forwarded-for{block} \
}