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
aserrallerios / to-remember.txt
Last active Feb 7, 2020
Commands or other stuff that I need to remember from time to time
View to-remember.txt
* Run specific test in sbt:
testOnly test.class.name -- -z "Full test label"
View macos.txt
command + shift + period = show hidden files in open file dialogs
command + tab + option = restore minimized window
View output_example.txt
System Temperatures - Tue Aug 13 13:18:16 CEST 2019
System Load: 0.15, 0.22, 0.20
CPU Temperature:
dev.cpu.1.temperature: 37.0C
dev.cpu.0.temperature: 37.0C
HDD Temperature:
ada0: 35 C - WDC WD40EFRX-68N32N0 (WD-WCC7K1VYRPJ3)
ada1: 34 C - ST4000VN008-2DR166 (ZDH6FF4Q)
View gist:0b5a5eb2a2c3268a873522b247b380ed
jcmd <pid> VM.system_properties
jcmd <pid> VM.flags
jcmd <pid> VM.command_line
jcmd <pid> GC.run
@aserrallerios
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": {
"spinnaker.io/application": "${ execution['application'] }",
"spinnaker.io/cluster": "${execution['application']}",
"spinnaker.io/detail": "test",
"spinnaker.io/stack": "${execution['application']}"
@aserrallerios
aserrallerios / debug-args
Last active May 8, 2018
Remote JMX & debug JVM arguments
View debug-args
-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=5005
View jvm-memory.md

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

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)
View gist:6281b8445867e79c69e635c72a7a38cb
raspbian
=============
* raspi-config: extend filesystem
* reboot
* update, upgrade, rpi-update
* reboot
* dhcpcd.conf -> static ip
interface eth0
static ip_address=192.168.1.5/24
View UDPServer.java
import java.io.*;
import java.net.*;
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];
You can’t perform that action at this time.