Skip to content

Instantly share code, notes, and snippets.

View agarciadom's full-sized avatar

Antonio García-Domínguez agarciadom

View GitHub Profile
@dandelion-lowcode
dandelion-lowcode / java
Created December 11, 2023 12:08
Random EOL color
operation String getRandomColor() {
var seed = new Native("java.lang.Long")(self.hashCode().longValue());
var random = new Native("java.util.Random")(seed);
var h = random.nextFloat();
var s = random.nextFloat() * 0.5f;
var b = random.nextFloat() * 0.50f + 0.40f;
var color = Native("java.awt.Color").getHSBColor(h, s, b);
return "#" + color.getRed().toHex() + color.getGreen().toHex() + color.getBlue().toHex();
}
@kzar
kzar / Instructions.md
Last active December 2, 2021 03:39
My Thinkpad T450 Ubuntu set up

Ubuntu 15.04 (Vivid) has now been released and it fixes mostly all of the issues I had with my Thinkpad T450. I recommend doing a clean install of Ubuntu 15.04 and mostly avoiding all of the steps bellow!

My process for getting Ubuntu running really nicely on a Thinkpad T450 with all the hardware working. (I have my track pad disabled in the bios and only want to use the track point.)

Basic steps to get Ubuntu running nicely on the Thinkpad T450:

@sharwell
sharwell / pom.xml
Last active January 23, 2022 15:55
Maven pom.xml to support automatic code generation for ANTLR 4 grammar(s) during an Eclipse build. This configuration does not support (and is not intended for) building using Maven alone.
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>org.uiuc</groupId>
<artifactId>cchistory</artifactId>
<version>0.0.1-SNAPSHOT</version>
<name>CodeCompletionWithHistory</name>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>