This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mv -v ~/Library/Application\ Support/.lpxuserdata ~/.Trash |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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\"" | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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']) } ) | |
] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@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') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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" |
NewerOlder