Skip to content

Instantly share code, notes, and snippets.

View marazmarci's full-sized avatar
🦆

Márton Maráz marazmarci

🦆
View GitHub Profile
@halyph
halyph / App.java
Created June 27, 2012 16:07
Read META-INF/MANIFEST.MF from jar file #java #manifest #read
Manifest mf = new Manifest();
mf.read(Thread.currentThread().getContextClassLoader().getResourceAsStream("META-INF/MANIFEST.MF"));
Attributes atts = mf.getMainAttributes();
System.out.println("Version: " + atts.getValue("Implementation-Version"));
System.out.println("Build: " + atts.getValue("Implementation-Build"));
@jbrown17
jbrown17 / rsa.java
Last active November 2, 2023 00:16
Quick, simple implementation of RSA encryption algorithm without external libraries
import java.awt.EventQueue;
import java.io.*;
import java.math.BigInteger;
import java.util.ArrayList;
import java.util.Random;
import java.util.Scanner;
/**
* Quick and dirty implementation of the RSA algorithm
@mikehearn
mikehearn / KotlinDuckTyping.kt
Created December 18, 2015 13:46
Kotlin duck typing / type classing fiddle
class A {
fun shout() = println("go team A!")
}
class B {
fun shout() = println("go team B!")
}
interface Shoutable {
fun shout()
@justincjahn
justincjahn / README.md
Last active January 16, 2024 20:15
Minecraft server(s) using systemd and screen.

Install

# Install dependencies
sudo yum install -y java-1.8.0-openjdk screen

# Create a new unprivileged user for minecraft
useradd -r -m -d /opt/minecraft minecraft

# Create the directory that will house our minecraft instances

sudo su --shell /bin/bash minecraft

@Paraphraser
Paraphraser / InfluxDB security under IOTstack.md
Last active December 24, 2022 02:45
Enabling authentication in InfluxDB for SensorsIot/IOTstack

Tutorial: Enabling authentication in InfluxDB

Assumptions:

  • you are running SensorsIot/IOTstack with InfluxDB as one of the containers
  • you want to enable authentication for your InfluxDB databases.

Note: This tutorial is specific to SensorsIot/IOTstack.

Definition:

@skidoodle
skidoodle / vpn.md
Last active December 31, 2023 01:40
VPN

You're probably reading this because you've asked what VPN service to use, and this is the answer.

/*
* Created by Attila Kruchió on 2022. 01. 09. 18:24
* attila.kruchio.dev@gmail.com
*
* Copyright (c) 2022.
* All rights reserved.
*/
package com.attila.kruchio.android.core.ext