Skip to content

Instantly share code, notes, and snippets.

View suapapa's full-sized avatar

Homin Lee suapapa

View GitHub Profile
@suapapa
suapapa / esc_keyboard.ino
Created March 4, 2023 03:34
arduino: esc key only keyboard
#include <Keyboard.h>
#define PIN_ESC_INPUT 8
char lastPress = 0;
char escKey = KEY_ESC;
void setup() {
pinMode(PIN_ESC_INPUT, INPUT_PULLUP);
pinMode(LED_BUILTIN, OUTPUT);
@suapapa
suapapa / heicToJpg.sh
Last active August 28, 2022 22:41 — forked from mrmcwake/heicToJpg.sh
Recursively converts .heic files to .jpg on linux for a specified root directory (coming from an iOS11 device over USB)
#!/bin/bash
# Recursively converts all HEIC files to JPG for the specified directory. Skips any files that have already
# been converted. Requires tifig, download latest release from github:
# https://github.com/monostream/tifig/releases and install at /usr/bin/tifig
# (or add the install location you choose to your $PATH)
#
# usage: ./heicToJpg.sh [RootDirectory]
#
rootDir=$1
if [ -z "$rootDir" ]
@suapapa
suapapa / xmas-tree.go
Last active December 14, 2020 13:47
xmas-tree
package main
import (
"image"
"image/color"
"log"
"math"
"math/rand"
"time"
package main
import (
"bufio"
"flag"
"fmt"
"log"
"os"
"path/filepath"
"regexp"
@suapapa
suapapa / sh1106.go
Last active June 9, 2020 10:39
example for github.com/sztanpet/sh1106
package main
import (
"image"
"image/draw"
"image/gif"
"log"
"os"
"time"
@suapapa
suapapa / record.go
Created April 19, 2020 08:20
raw audio recording with portaudio and golang
package main
import (
"encoding/binary"
"fmt"
"os"
"os/signal"
"time"
"github.com/gordonklaus/portaudio"
@suapapa
suapapa / extract_rtp.sh
Created November 6, 2019 09:15 — forked from lanuma/extract_rtp.sh
Extract RTP from pcap to raw and convert to wav
#!/bin/bash
pcap_file="voip.pcap"; #nama file pcap
audio_output="suara.wav"; #output audio
raw_file="suara.raw"; #nama raw file hasil extract
if [ $EUID -ne 0 ]; then
echo "This script must be run as root";
exit 1;
fi
<html>
<head></head>
<body>
<a href="{{ . }}">Kakao Login</a>
</body>
</html>
@suapapa
suapapa / euckr.go
Created March 28, 2017 11:30
encoding to euckr in go
package main
// https://github.com/gophercon/2016-talks/blob/master/MarcelVanLohuizen-TextSubrepo/slides.pdf
import (
"log"
"golang.org/x/text/encoding/korean"
"golang.org/x/text/transform"
)
@suapapa
suapapa / nmea_gpvtg_practice.go
Created March 28, 2017 10:38
go gps tacho-meter
package main
import (
"bufio"
"fmt"
"os"
nmea "github.com/adrianmo/go-nmea"
)