Skip to content

Instantly share code, notes, and snippets.

View mantono's full-sized avatar

Anton Österberg mantono

View GitHub Profile
@mantono
mantono / Config.kt
Last active October 28, 2019 20:04
Configuration loading with Typesafe config in Kotlin
package com.mantono
/**
* implementation("com.typesafe:config:1.4.0")
* See https://github.com/lightbend/config
*/
import com.typesafe.config.ConfigFactory
import com.typesafe.config.Config as TypeSafeConfig
@s1monw1
s1monw1 / build.grade.kts
Created December 1, 2017 23:46
Blog Post Example Script
import org.gradle.kotlin.dsl.extra
import org.jetbrains.kotlin.gradle.dsl.Coroutines
import org.jetbrains.kotlin.gradle.plugin.KotlinPluginWrapper
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
val kotlinVersion = plugins.getPlugin(KotlinPluginWrapper::class.java).kotlinPluginVersion
val kotlinCoroutinesVersion = "0.19.3"
val vertxVersion = "3.5.0"
val nexusRepo = "http://x.x.x.x:8080/nexus/content/repositories/releases"
@klaaspieter
klaaspieter / ASS.md
Created June 22, 2017 07:59 — forked from anonymous/ASS.md
Acronyms Seriously Suck - Elon Musk

From time to time, Musk will send out an e-mail to the entire company to enforce a new policy or let them know about something that's bothering him. One of the more famous e-mails arrived in May 2010 with the subject line: Acronyms Seriously Suck:

There is a creeping tendency to use made up acronyms at SpaceX. Excessive use of made up acronyms is a significant impediment to communication and keeping communication good as we grow is incredibly important. Individually, a few acronyms here and there may not seem so bad, but if a thousand people are making these up, over time the result will be a huge glossary that we have to issue to new employees. No one can actually remember all these acronyms and people don't want to seem dumb in a meeting, so they just sit there in ignorance. This is particularly tough on new employees.

That needs to stop immediately or I will take drastic action - I have given enough warning over the years. Unless an acronym is approved by me, it should not enter the SpaceX glossary.

@mantono
mantono / arch_install_guide.sh
Last active September 24, 2017 12:31
Install Arch - Basic commands adjusted for my need
#!/bin/zsh
# Set Swedish keymap
loadkeys sv-latin1
# Verfiy that we are using UEFI
ls /sys/firmware/efi/efivars
# Check that internet works
ping archlinux.org
@mantono
mantono / gpg2_pass_ssh_github.txt
Last active January 26, 2023 12:25
GPG / SmartCard / Yubikey / pass in Ubuntu
# Ubuntu
sudo apt install libpam-yubico yubikey-personalization yubioath-desktop gnupg2 gnupg-agent pcscd libpcsclite1 opensc gpgsm
# Arch - https://wiki.archlinux.org/index.php/yubikey
pacman -S gnupg opensc yubico-c yubico-c-client yubico-pam yubikey-personalization yubikey-personalization-gui pcsc-tools
# Gentoo
# Use flag should be persisted in make.conf to keep this
USE="security-key smartcard" emerge yubikey-manager sys-auth/polkit sys-apps/dbus
@lukas-h
lukas-h / license-badges.md
Last active May 21, 2024 17:21
Markdown License Badges for your Project

Markdown License badges

Collection of License badges for your Project's README file.
This list includes the most common open source and open data licenses.
Easily copy and paste the code under the badges into your Markdown files.

Notes

  • The badges do not fully replace the license informations for your projects, they are only emblems for the README, that the user can see the License at first glance.

Translations: (No guarantee that the translations are up-to-date)

@cjaoude
cjaoude / gist:fd9910626629b53c4d25
Last active May 15, 2024 16:02
Test list of Valid and Invalid Email addresses
Use: for testing against email regex
ref: http://codefool.tumblr.com/post/15288874550/list-of-valid-and-invalid-email-addresses
List of Valid Email Addresses
email@example.com
firstname.lastname@example.com
email@subdomain.example.com
firstname+lastname@example.com
@Flafla2
Flafla2 / Perlin_Tiled.cs
Last active May 20, 2024 20:31
A slightly modified implementation of Ken Perlin's improved noise that allows for tiling the noise arbitrarily.
public class Perlin {
public int repeat;
public Perlin(int repeat = -1) {
this.repeat = repeat;
}
public double OctavePerlin(double x, double y, double z, int octaves, double persistence) {
double total = 0;
# Note: ~/.ssh/environment should not be used, as it
# already has a different purpose in SSH.
env=~/.ssh/agent.env
# Note: Don't bother checking SSH_AGENT_PID. It's not used
# by SSH itself, and it might even be incorrect
# (for example, when using agent-forwarding over SSH).
agent_is_running() {
@KonradIT
KonradIT / readme.md
Last active September 25, 2023 01:55
GoPro Studio for Linux