Skip to content

Instantly share code, notes, and snippets.

View ferdiebergado's full-sized avatar

ferdie bergado ferdiebergado

View GitHub Profile
@ferdiebergado
ferdiebergado / tsproj.sh
Last active January 22, 2024 08:06
Shell script to scaffold a typescript project with bun and vite
#!/usr/bin/env sh
PROJ_DIR="$HOME/Projects/typescript/BUN"
PROJ=${1:-bun-vite-proj$(date +'%s')}
test -z $(command -v unzip) && sudo dnf install unzip
test -z $(command -v bun) && curl -fsSL https://bun.sh/install | bash
source ~/.bashrc
@ferdiebergado
ferdiebergado / notify-send.lua
Last active December 8, 2023 05:11
mpv script for sending notifications on track change
local mp = require("mp")
local utils = require("mp.utils")
local msg = require("mp.msg")
local home = os.getenv("HOME")
-- local mpv_cache = home .. "/.cache/mpv"
local mpv_cache = "/tmp"
local title = ""
local origin = ""
local thumbnail = home .. "/Pictures/icons/Guyman-Helmet-Music-512.png"
@ferdiebergado
ferdiebergado / tsnew.sh
Last active January 12, 2024 02:29
My shell script to scaffold a new typescript project; usage: tsnew.sh [path]
#!/usr/bin/env bash
AUTHOR="Ferdinand Saporas Bergado <ferdiebergado@gmail.com> (https://github.com/ferdiebergado/)"
LICENSE=MIT
ROOT_DIR=src
OUT_DIR=out
### PROJECT ###
PROJECT_DIR=${1:-./tsproj}
@ferdiebergado
ferdiebergado / create_express_app.sh
Last active October 2, 2022 10:44
Bash script to scaffold a new express typescript application
#!/bin/bash
# define license details
AUTHOR="Ferdinand Saporas Bergado"
EMAIL=ferdiebergado@gmail.com
LICENSE=MIT
# declare dependencies
DEPS=(express dotenv)
DEV_DEPS=(typescript \@types/node @types/express nodemon ts-node jest ts-jest @types/jest supertest @types/supertest @faker-js/faker)