Skip to content

Instantly share code, notes, and snippets.

@mmkathurima
mmkathurima / custom_table.css
Last active May 12, 2024 08:50
Simple table plugin with pure JavaScript. Allows sorting, filtering, searching, pagination, hiding of columns, exporting to clipboard, csv and excel.
table, th, td {
border: 1px solid;
}
table {
margin: 0;
width: 100%;
table-layout: fixed;
}
@mmkathurima
mmkathurima / ShellControl.java
Last active February 5, 2023 10:14
Basic shell control created using JavaFX. Can be embedded into Swing and JavaFX applications. Emulates a command line UI. To process commands, use the `onEnter` functional interface.
import javafx.beans.value.ChangeListener;
import javafx.beans.value.ObservableValue;
import javafx.event.EventHandler;
import javafx.scene.control.TextArea;
import javafx.scene.input.KeyEvent;
import java.util.ArrayList;
import java.util.function.Consumer;
public class ShellControl extends TextArea {
@mmkathurima
mmkathurima / notebook.html
Last active July 18, 2022 16:17
Basic command prompt notebook
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css" rel="stylesheet">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js" type="text/javascript"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.5.2/js/bootstrap.min.js" type="text/javascript"></script>
</head>
@mmkathurima
mmkathurima / Height calculator meme.vb
Last active February 5, 2023 10:18
Height calculator meme in classic Visual Basic.
Imports Microsoft.VisualBasic
Module HeightCalc
Public Sub Main(args As String())
Dim getHeight As String = InputBox("Input your height in cm", "Height calculator tool")
MsgBox("Your height is " & getHeight & "cm!")
End Sub
End Module