Skip to content

Instantly share code, notes, and snippets.

@tindzk
tindzk / wrap.rs
Last active July 25, 2024 19:49 — forked from sunshowers/wrap.rs
ratatui wrapping with textwrap
// MIT License
//
// Copyright (c) 2023 Oxide Computer Company
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
@tindzk
tindzk / ZipArchive.scala
Last active July 24, 2018 13:55 — forked from Swind/ZipArchive.scala
Unzip file
object ZipArchive {
def unZip(source: File, targetFolder: File): Unit = {
val zipFile = new ZipFile(source)
try
zipFile.entries.asScala.foreach { entry =>
val target = new File(targetFolder, entry.getName)
if (entry.isDirectory) target.mkdirs()
else {
target.getParentFile.mkdirs()
val in = zipFile.getInputStream(entry)
@tindzk
tindzk / Monokai.colorscheme
Last active November 23, 2015 23:22 — forked from wdullaer/Monokai.colorscheme
Monokai Konsole Colourscheme
[Background]
Color=40,40,40
[BackgroundIntense]
Color=40,40,40
[Color0]
Color=73,72,62
[Color0Intense]