Skip to content

Instantly share code, notes, and snippets.

View 134130's full-sized avatar

JiHwan Oh 134130

View GitHub Profile
@kaleksandrov
kaleksandrov / global-protect.sh
Last active May 9, 2025 23:06
Simple script that starts and stops GlobalProtect.app on Mac OSX.
#!/bin/bash
case $# in
0)
echo "Usage: $0 {start|stop}"
exit 1
;;
1)
case $1 in
start)
@latant
latant / rmi-example.kt
Created March 9, 2020 22:59
An example using Java RMI with Kotlin
import java.io.Serializable
import java.rmi.Remote
import java.rmi.RemoteException
import java.rmi.registry.LocateRegistry
import java.rmi.server.UnicastRemoteObject
class Person(val name: String, val age: Int): Serializable
interface HelloService : Remote {
@Throws(RemoteException::class)
@m-radzikowski
m-radzikowski / script-template.sh
Last active May 10, 2025 08:56
Minimal safe Bash script template - see the article with full description: https://betterdev.blog/minimal-safe-bash-script-template/
#!/usr/bin/env bash
set -Eeuo pipefail
trap cleanup SIGINT SIGTERM ERR EXIT
script_dir=$(cd "$(dirname "${BASH_SOURCE[0]}")" &>/dev/null && pwd -P)
usage() {
cat <<EOF
Usage: $(basename "${BASH_SOURCE[0]}") [-h] [-v] [-f] -p param_value arg1 [arg2...]
@iwanhae
iwanhae / main.go
Created November 5, 2023 06:51
Kubernetes API Audit PoC
package main
import (
"compress/gzip"
"context"
"crypto/tls"
"errors"
"fmt"
"io"
"log"