Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@jorgeuriarte
jorgeuriarte / LPX-Trial-Reset.sh
Created December 12, 2022 09:08 — forked from maxwellmlin/LPX-Trial-Reset.sh
Logic Pro X Trial Reset
mv -v ~/Library/Application\ Support/.lpxuserdata ~/.Trash
@jorgeuriarte
jorgeuriarte / DummyBean.java
Last active February 23, 2021 09:32
Bean cualificado en caliente... ejemplo de cómo tener "varios" beans del mismo tipo en el sistema, "ApplicationScoped" pero con distintas configuraciones, datasources o similares...
package gailen.test.cdi;
import io.quarkus.redis.client.RedisClient;
import lombok.extern.jbosslog.JBossLog;
import javax.enterprise.inject.Any;
import javax.enterprise.inject.Instance;
import javax.enterprise.inject.Produces;
import javax.enterprise.inject.spi.InjectionPoint;
import javax.inject.Inject;
@jorgeuriarte
jorgeuriarte / elasticsearch-cheatsheet.txt
Created February 17, 2019 19:41 — forked from stephen-puiszis/elasticsearch-cheatsheet.txt
Elasticsearch Cheatsheet - An Overview of Commonly Used Elasticsearch API Endpoints and What They Do
# Elasticsearch Cheatsheet - an overview of commonly used Elasticsearch API commands
# cat paths
/_cat/allocation
/_cat/shards
/_cat/shards/{index}
/_cat/master
/_cat/nodes
/_cat/indices
/_cat/indices/{index}
@jorgeuriarte
jorgeuriarte / gist:3fa0a0e1e83dc71c6923bf52d40a9f64
Created September 10, 2018 09:00 — forked from trodrigues/gist:1023167
Checkout only certain branches with git-svn
If you want to clone an svn repository with git-svn but don't want it to push all the existing branches, here's what you should do.
* Clone with git-svn using the -T parameter to define your trunk path inside the svnrepo, at the same time instructing it to clone only the trunk:
git svn clone -T trunk http://example.com/PROJECT
* If instead of cloning trunk you just want to clone a certain branch, do the same thing but change the path given to -T:
git svn clone -T branches/somefeature http://example.com/PROJECT
package com.evandti;
import java.io.IOException;
import javax.servlet.*;
import javax.servlet.http.Cookie;
import javax.servlet.http.HttpServletRequest;
import com.opensymphony.oscache.base.Cache;
import com.opensymphony.oscache.web.ServletCacheAdministrator;
@jorgeuriarte
jorgeuriarte / out.xml
Created June 7, 2017 08:59
Respuesta y petición SEUR / FR
<?xml version='1.0' encoding='ISO-8859-1'?>
<root><main>EL FICHERO INTEGRADO NO HA SUPERADO EL PROCESO DE VALIDACION</main>
<errorVal>
<codigo>5</codigo>
<descripcion>ECB NUMERACIÓN CORRECTA</descripcion>
<nombreCampo>cod_barras_ECB</nombreCampo>
<nombreCampo>numerador_etiq</nombreCampo>
</errorVal>
</erroresEnvio>
</root>
@jorgeuriarte
jorgeuriarte / ssh
Created May 15, 2017 09:30
Cambio de fondo para sesiones de terminal
#!/bin/sh
#
# Ponerlo en bin/ssh
#
HOSTNAME=`echo $@ | sed s/.*@//`
set_prod_settings() {
osascript -e "Tell application \"Terminal\" to set current settings of front window to settings set \"Red Sands\""
}
def profileInfo(username) {
final String TOK1 = 'window._sharedData = '
final String TOK2 = ';</script>'
def insta = "https://instagram.com/${username}".toURL().text
def text = insta.split(TOK1)[1].split(TOK2)[0]
def json = new groovy.json.JsonSlurper().parseText(text)
[username: username,
followers: json.entry_data.ProfilePage[0].user.followed_by.count,
media: json.entry_data.ProfilePage[0].user.media.nodes.collect( { item -> item.subMap(['code', 'date', 'caption', 'likes', 'comments']) } )
]
@Grab(group='org.modelcatalogue', module='spreadsheet-builder-poi', version='0.3.1')
@Grab(group='commons-codec', module='commons-codec', version='1.10')
@GrabExclude('org.codehaus.groovy:groovy-all')
import org.modelcatalogue.spreadsheet.api.Cell
import org.modelcatalogue.spreadsheet.builder.poi.PoiSpreadsheetBuilder
import org.modelcatalogue.spreadsheet.query.api.SpreadsheetCriteria
import org.modelcatalogue.spreadsheet.query.poi.PoiSpreadsheetCriteria
File file = new File('report.xlsx')
@jorgeuriarte
jorgeuriarte / Twitter API with Curl
Created December 9, 2016 20:55 — forked from apolloclark/Twitter API with Curl
Twitter API with Curl
# create an account, create an app
# @see https://apps.twitter.com/
# retrieve the access tokens
# @see https://dev.twitter.com/oauth/reference/post/oauth2/token
# create the file ~/twitter_api
nano ~/twitter_api
Authorization: OAuth oauth_consumer_key="XXXXXX", oauth_nonce="11111111", oauth_signature="XXXXXX", oauth_signature_method="HMAC-SHA1", oauth_timestamp="1450728725", oauth_token="99999-XXXXXX", oauth_version="1.0"