Skip to content

Instantly share code, notes, and snippets.

View MaaxGr's full-sized avatar
📄
Coding

Max MaaxGr

📄
Coding
View GitHub Profile
@mayankmkh
mayankmkh / PrettyPrint.kt
Last active October 7, 2024 21:14
Pretty Print Kotlin Data Class
fun Any.prettyPrint(): String {
var indentLevel = 0
val indentWidth = 4
fun padding() = "".padStart(indentLevel * indentWidth)
val toString = toString()
val stringBuilder = StringBuilder(toString.length)
@gabrieldewes
gabrieldewes / UploadResource.java
Created November 23, 2017 18:07
Uploading some binary file to http server
import java.io.*;
import java.net.HttpURLConnection;
import java.net.URL;
import java.net.URLConnection;
import java.nio.file.Files;
public class UploadResource {
// Uploading some binary file to http server