Skip to content

Instantly share code, notes, and snippets.

@knappologi
knappologi / removeåäö
Created March 6, 2020 07:37
sed command to remove every line with åäö from a textfile, first param is the og txt, second is outputfile
#!/bin/bash
sed '/å/d ; /ä/d ; /ö/d' $1 > $2
@knappologi
knappologi / Installera JavaFx för Eclipse och Intellij
Last active April 1, 2019 18:56
Installera Java, Eclipse och JavaFx
----------- Eclipse -----------
-------------------------------
1. Uppdatera Eclipse till senaste versionen
2. Hämta JDK 12 https://www.oracle.com/technetwork/java/javase/downloads/jdk12-downloads-5295953.html och installera
3. Hämta JavaFx 11 https://gluonhq.com/products/javafx/
4. Zippa upp JavaFx och placera mappen på lämplig plats,
@knappologi
knappologi / GenerateCatName!
Last active March 31, 2019 20:33
CatNameGenerator
// Generate a new cat name for your cat, based on its favorite food!
public static String catNameGenerator(String catsFavoriteFood) {
String[] catTitle = {"Mister/Miss/Mrs", "Lord", "Big", "Little", "King/Queen", "Captain", "Doctor", "Kitty", "Sweet", "Senior"};
String [] cuteNames = {"Pumpkin", "Steve", "Jellybean", "Monster", "Summer", "(of) Doom", "(of) Dreams", "Kibble", "Cinnamon"};
if (catsFavoriteFood.equals(null) || catsFavoriteFood.isEmpty()) {
return "Mister/Miss/Mrs Fluffypaw";
}
if (catsFavoriteFood.length() < 3) {
return "Captain Whiskers";
@knappologi
knappologi / dockerinstallhowto.txt
Last active November 23, 2018 09:48
How to download & install docker for Windows ¯\_(ツ)_/¯
-- Steps to download and install Docker on Windows
# DOCKER TOOLBOX
# 1. download from below
https://docs.docker.com/toolbox/overview/#whats-in-the-box
# 2. Go to install page for instructions and read
https://docs.docker.com/toolbox/toolbox_install_windows/
# 3. Check if virtualization is enable, through Task manager: ctrl+alt+delete -> task manager -> performance