Skip to content

Instantly share code, notes, and snippets.

Working or IDK

Albert Serrallé Ríos aserrallerios

Working or IDK
Block or report user

Report or block aserrallerios

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
aserrallerios /
Last active Aug 29, 2015
crypto auth java
import java.nio.charset.Charset;
import java.util.Arrays;
import javax.crypto.SecretKeyFactory;
import javax.crypto.spec.PBEKeySpec;
import org.apache.shiro.codec.Base64;
aserrallerios / gist:ab84100828cf2afa536a
Last active Aug 29, 2015
Bulk download from API with cURL
View gist:ab84100828cf2afa536a
echo "First parameter must be the CSV file containing the names and the ids separated by COMMAS"
echo "For example:
if [[ -z $1 ]]; then
View gist:852775c2c88d56e75b850eeced2660c5
ssh -i ~/.ssh/id_rsa_nq -C -N
class UDPServer
public static void main(String args[]) throws Exception
DatagramSocket serverSocket = new DatagramSocket(9876);
byte[] receiveData = new byte[1024];
byte[] sendData = new byte[1024];
View gist:6281b8445867e79c69e635c72a7a38cb
* raspi-config: extend filesystem
* reboot
* update, upgrade, rpi-update
* reboot
* dhcpcd.conf -> static ip
interface eth0
static ip_address=
View DefaultThreadFactory.scala
import java.util.concurrent.ThreadFactory
import java.util.concurrent.atomic.AtomicInteger
class DefaultThreadFactory(name: String) extends ThreadFactory {
final private val group = Thread.currentThread.getThreadGroup
final private val threadNumber = new AtomicInteger(1)
final private def threadName = s"pool-$name-thread-${threadNumber.getAndIncrement}"
def newThread(r: Runnable): Thread = {
val t = new Thread(group, r, threadName, 0)

Max memory = [-Xmx] + [-XX:MaxPermSize] + number_of_threads * [-Xss] + [-XX:MaxDirectMemorySize] + [-XX:MaxMetaspaceSize]

aserrallerios / debug-args
Last active May 8, 2018
Remote JMX & debug JVM arguments
View debug-args
aserrallerios / body.json
Created Jul 31, 2018
spinnaker expression language example
View body.json
"application_name": "${execution['application']}",
"config_url": "${ trigger.artifacts.?[type == 'app-config']. size() > 1 ? trigger.artifacts.?[type == 'app-config'].?[name matches 'dev-\\w+'].![reference][0] : trigger.artifacts.^[type == 'app-config'][reference] }",
"image": "${trigger.artifacts.^[type == 'docker'].reference}",
"namespace": "dev",
"raw_tags": {
"": "${ execution['application'] }",
"": "${execution['application']}",
"": "test",
"": "${execution['application']}"
View gist:0b5a5eb2a2c3268a873522b247b380ed
jcmd <pid> VM.system_properties
jcmd <pid> VM.flags
jcmd <pid> VM.command_line
jcmd <pid>
You can’t perform that action at this time.