Skip to content

Instantly share code, notes, and snippets.

View aaccioly's full-sized avatar

Anthony Accioly aaccioly

View GitHub Profile
@aaccioly
aaccioly / deploy_certificates.sh
Last active September 25, 2023 17:53
Script to deploy certificates generated with DNSroboCert to nginx-proxy
#!/usr/bin/env bash
#########################################################################################
# deploy_certificates.sh
#
# Copyright (c) 2023 Anthony Accioly <anthony@accioly.dev>
#
# SPDX-License-Identifier: MIT
#
# Description:
@aaccioly
aaccioly / game_base_generic_properties.worksheet.sc
Created March 18, 2023 21:07
Effective Programming in Scala - Week 1 challenge: Generic checkProperty function
enum Shape:
case Diamond, Squiggle, Oval
enum Color:
case Red, Green, Purple
enum Shading:
case Open, Striped, Solid
enum NumberType:
@aaccioly
aaccioly / CoroutinesPlayground.kt
Last active January 14, 2023 21:48
My version of Rock the JVM Kotlin Coroutines Tutorial: https://youtu.be/Wpco6IK1hmY and https://youtu.be/2RdHD0tceL4 (Gradle)
package com.rockthejvm.blog
import kotlinx.coroutines.*
import mu.KotlinLogging
import java.util.concurrent.Executors
// coroutine = "thread"
// parallel + concurrent apps
private val logger = KotlinLogging.logger {}
#!/bin/bash
# Extracts Artist;Album and Title from a CSV file exported by Mp3tag
if [ $# -ne 1 ]; then
echo usage: cleanMp3tagCSV file
exit 1
fi
ORIGINAL_FILE=$1
import java.math.BigDecimal;
import java.util.*;
import java.util.stream.Collectors;
import java.util.stream.IntStream;
/**
* Created by Anthony on 11/10/2014.
*/
public class Teste {
@aaccioly
aaccioly / Results
Last active August 29, 2015 13:58
Time functions benchmark
--------------------------------------------
System.nanoTime()
--------------------------------------------
Avg Time: 0.99
Max Time: 1.90
Min Time: 0.51
--------------------------------------------
System.currentTimeMillis()
--------------------------------------------
Avg Time: 1.00