Skip to content

Instantly share code, notes, and snippets.

View freyacodes's full-sized avatar
🏳️‍⚧️

Freya Arbjerg freyacodes

🏳️‍⚧️
View GitHub Profile
@freyacodes
freyacodes / theme.css
Created September 28, 2019 21:31
Mastodon deep dark theme
Adapted from: https://userstyles.org/styles/153362/mfc-mastodon-flat-css
/*------------------------------------------------------------------------------
* MISC TWEAKS
*
* Miscellaneous tweaks that are more like extensions of the theme,
* rather than subsets or features. These could ostensibly be their
* own user-styles, and are only bundled in here for convenience.
* Or, they are not supported in all browsers. They may be removed
* without significantly affecting or compromising the theme.
import java.awt.Color
import java.io.File
import javax.imageio.ImageIO
import kotlin.math.roundToInt
const val N = 1.0
fun main(args: Array<String>) {
val img = ImageIO.read(File(args[0]))
val map = Array(img.width) { arrayOfNulls<Vector>(img.height) }
@freyacodes
freyacodes / Dockerfile
Created October 19, 2018 23:57
Teamcity Java 11 agent
FROM jetbrains/teamcity-agent
RUN apt update && apt install wget && \
wget -c https://download.java.net/java/ga/jdk11/openjdk-11_linux-x64_bin.tar.gz && \
tar -xvf openjdk-11_linux-x64_bin.tar.gz && \
rm openjdk-11_linux-x64_bin.tar.gz && \
mkdir -p /usr/lib/jvm/jdk-11 && \
mv jdk-11*/* /usr/lib/jvm/jdk-11/ && \
update-alternatives --install "/usr/bin/java" "java" "/usr/lib/jvm/jdk-11/bin/java" 1020 && \
update-alternatives --install "/usr/bin/javac" "javac" "/usr/lib/jvm/jdk-11/bin/javac" 1020 && \
curl -L https://github.com/docker/compose/releases/download/1.21.0/docker-compose-`uname -s`-`uname -m` -o /usr/local/bin/docker-compose && \
###FredBoat Individual Contributor License Agreement
Thank you for your interest in contributing to open source software projects (“Projects”) made available by Frederik Mikkelsen or his affiliates (“Frederik Mikkelsen”). This Individual Contributor License Agreement (“Agreement”) sets out the terms governing any source code, object code, bug fixes, configuration changes, tools, specifications, documentation, data, materials, feedback, information or other works of authorship that you submit or have submitted, in any form and in any manner, to Frederik Mikkelsen in respect of any of the Projects (collectively “Contributions”).
You agree that the following terms apply to all of your past, present and future Contributions. Except for the licenses granted in this Agreement, you retain all of your right, title and interest in and to your Contributions.
**Copyright License.** You hereby grant, and agree to grant, to Frederik Mikkelsen a non-exclusive, perpetual, irrevocable, worldwide, fully-paid, royalty-fr
@freyacodes
freyacodes / scratch.java
Created January 16, 2018 16:34
Normal int, volatile int, and AtomicInteger thread safety comparison
import java.util.concurrent.atomic.AtomicInteger;
public class scratch extends Thread {
public static int x = 0;
public static volatile int y = 0;
public static AtomicInteger z = new AtomicInteger(0);
public static void main(String[] args) {
for (int i = 0; i < 1000; i++) {
### Keybase proof
I hereby claim:
* I am frederikam on github.
* I am fre_d (https://keybase.io/fre_d) on keybase.
* I have a public key ASBYMeR7pBoNbww46D_1TMcOcJyhUhebtEuPO0vFKYZEZwo
To claim this, I am signing this object: