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
#!/usr/bin/env bash | |
#OpenSSL requires the port number. | |
#ws.seur.com | |
#SERVER=80.65.15.72:443 | |
SERVER=54.187.119.242:443 | |
DELAY=1 | |
ciphers=$(openssl ciphers 'ALL:eNULL' | sed -e 's/:/ /g') | |
echo Obtaining cipher list from $(openssl version). |
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("io.vertx:vertx-core:3.3.3") | |
import io.vertx.core.Vertx | |
def schedulerId | |
def vertx = Vertx.vertx() | |
(1..10).each { it -> | |
vertx.setTimer(2000, { | |
println """ | |
Hola, este es ${schedulerId} |
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
import java.io.FileInputStream; | |
import java.io.FileNotFoundException; | |
import java.io.IOException; | |
import java.io.InputStream; | |
import java.util.zip.ZipEntry; | |
import java.util.zip.ZipFile; | |
class AndroidXMLDecompress { | |
// decompressXML -- Parse the 'compressed' binary form of Android XML docs | |
// such as for AndroidManifest.xml in .apk files |
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 nire.verticles; | |
@groovy.transform.Field HANDLER_NAME = "nire.handlers.AsignarEjercicio" | |
def eb = vertx.eventBus() | |
println "Will listen at ${HANDLER_NAME}" | |
eb.consumer(HANDLER_NAME) { message -> | |
def worker = new DummyWorker() | |
worker.processElement(message.body().msg) |
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 updateSetContent(hashkey, userKey, hashvalue, user){ | |
def options = this.questions[hashkey].options | |
def valuesArray = hashvalue.split(',') | |
options.each{ option -> | |
def existia = jedis.sismember(userKey, option.value) | |
def existe = valuesArray.find{ it == option.value } | |
//si el usuario la marco como respuesta, y no existia |
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 user = componentManager.jiraAuthenticationContext.getLoggedInUser() | |
def campoCelula = componentManager.customFieldManager.customFieldObjects.find { it.fieldName.endsWith('lula IT') } | |
def celula = issue.getCustomFieldValue(campoCelula) | |
def jql = """ | |
project = 'TICKETBIS' | |
and '${campoCelula.name}' = '${celula}' | |
and status = 'En Pruebas' | |
and assignee is null | |
""" | |
def searchService = componentManager.getSearchService() |
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='redis.clients', module='jedis', version='2.1.0') | |
import redis.clients.jedis.* | |
import java.util.concurrent.ExecutorService | |
import java.util.concurrent.Executors | |
import java.util.concurrent.Callable | |
/** | |
* | |
*/ |
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
public String generarSitemapCategorias(categoria) { | |
def categorias = [] as Set | |
def descendientes = this.redisInstance.zrange( "categoria:${categoria}:descendientes", 0, -1) | |
def categoriasYEventos = [:] | |
this.redisInstance.withPipeline { pipe -> | |
categoriasYEventos = descendientes.findResults { | |
[id: it, zcard: pipe.zcard("categoria:${it}:eventos")] | |
} | |
} | |
categorias = categoriasYEventos.findResults { if (it.zcard.get() > 0) it.id } |
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
/** | |
Uso: | |
- Llamar: | |
groovy updatelogs.groovy [svn url] [PREFIJO] [revinicial] [revfinal] > updatelogs.sh | |
- Revisar el script updatelogs.sh generado | |
- Lanzar: |
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='redis.clients', module='jedis', version='2.1.0') | |
import redis.clients.jedis.* | |
def poolconfig = new JedisPoolConfig() | |
def conn = (new JedisPool(poolconfig, "localhost", Protocol.DEFAULT_PORT, 0 /* Protocol.DEFAULT_TIMEOUT */, null, 0)).getResource() | |
def setupRestricciones(connx) { | |
[31276:1369774800001, /* Scores should be consistant with target zset's internal scores (categoria:78:eventos) */ | |
38000:1412456400000, | |
37909:1369776600000].each { k, v -> connx.zadd('tmp:restricciones', v, k.toString()) } |