Skip to content

Instantly share code, notes, and snippets.

View meinside's full-sized avatar
🤡
I hope my code makes more cents than my life.

Sungjin Han meinside

🤡
I hope my code makes more cents than my life.
View GitHub Profile
@meinside
meinside / README.md
Last active October 20, 2024 16:52
VSCode files for debugging a Raspberry Pi Pico application with Picoprobe (Debug Probe)
  • Files:

    • launch.json: .vscode/launch.json file in your project directory.
    • settings.json: .vscode/settings.json file in your project directory.
  • Environment Variables:

export PICO_SDK_PATH="<path-to-your-pico-sdk-directory>"
export OPENOCD_PATH="<path-to-your-openocd-directory>"
@meinside
meinside / backup_vaultwarden.sh
Created February 17, 2023 00:00
Backup script for Vaultwarden
#!/usr/bin/env bash
# backup_vaultwarden.sh
#
# Backups up `db.sqlite3` and `attachments` from vaultwarden.
#
# last update: 2023.02.16.
# XXXX: edit following values
VAULTWARDEN_WORKING_DIR="/home/me/my-files/vaultwarden"
@meinside
meinside / shift_srt.rb
Last active May 3, 2022 08:16
Shift times in a .srt file
#!/usr/bin/env ruby
# frozen_string_literal: false
# Shift times in given .srt file
#
# ./shift_srt.rb [SRT_FILEPATH] [MSECS_TO_SHIFT]
#
# ex: ./shift_srt.rb some_srt_file.srt 420
#
# created by [email protected]
@meinside
meinside / notify-ssh-login.sh
Last active May 3, 2022 08:08
Notify with pushbullet message on successful ssh logins
#!/bin/bash
#
# notify-ssh-login.sh
#
# Notifies successful ssh logins through pushbullet
#
# NOTE: this script will be run as root, so don't forget to put related config files under /root/.config/
#
#
# last update: 2019.06.05.
@meinside
meinside / notify-fail2ban.sh
Last active May 3, 2022 08:08
Notify with pushbullet message on fail2ban's ban actions
#!/bin/bash
#
# notify-fail2ban.sh
#
# Notifies on fail2ban's ban actions through pushbullet
#
# NOTE: this script will be run as root, so don't forget to put related config files under /root/.config/
#
# USAGE: $ ./notify-fail2ban.sh 8.8.8.8 ssh
#
@meinside
meinside / Dockerfile.golang
Last active November 7, 2018 11:26
Dockerfile for example
# Dockerfile for Golang application
#
# idea from: https://medium.com/@pierreprinetti/the-go-1-11-dockerfile-a3218319d191
#
#
# $ docker login
# $ docker build -t image-name .
# or
# $ docker build -t image-name --build-arg GO_VERESION=1.11 .
# or
@meinside
meinside / 2017-11-21-Simple-Sabotage-Field-Manual.md
Last active March 26, 2019 08:05
Simple Sabotage Field Manual (Korean)

Simple Sabotage Field Manual


간단한 사보타주 실전 매뉴얼, 1944, 전략사무국

간단한 사보타주 실전 매뉴얼

@meinside
meinside / transmission-complete-broadcast.sh
Last active August 29, 2019 04:59
Broacast transmission download complete message and remove it from the list.
#!/bin/bash
#
# transmission-complete-broadcast.sh
#
# last update: 2019.08.29.
#
# for broadcasting transmission download complete message
# through telegram-bot-remotecontrol
# (github.com/meinside/telegram-bot-remotecontrol)
#
@meinside
meinside / check_mail.sh
Last active February 16, 2017 09:21
Sample bash script for checking unread mails in the spool.
#!/usr/bin/env bash
#
# script for checking local mail
#
#
# * for running every one hour:
#
# $ crontab -e
#
# # m h dom mon dow command
@meinside
meinside / wol.sh
Last active May 26, 2020 04:47
Bash script for WOL.
#!/bin/sh
#
# script for waking up on lan
# XXX - mac address to wake up
MAC_ADDR="01:23:45:67:AB:CD"
WOL="/usr/bin/wakeonlan" # apt-get install wakeonlan
$WOL "$MAC_ADDR"