Skip to content

Instantly share code, notes, and snippets.

View drewbrokke's full-sized avatar
🦆
work work work

Drew Brokke drewbrokke

🦆
work work work
View GitHub Profile
@khalidx
khalidx / node-typescript-esm.md
Last active July 3, 2024 18:04
A Node + TypeScript + ts-node + ESM experience that works.

The experience of using Node.JS with TypeScript, ts-node, and ESM is horrible.

There are countless guides of how to integrate them, but none of them seem to work.

Here's what worked for me.

Just add the following files and run npm run dev. You'll be good to go!

package.json

#!/bin/bash
# openFiles // opens all files between current branch and master
# openFiles branchName // opens all files between "branchName" and master
# openFiles commitHash // opens all files between "commitHash" and master
# openFiles commitHash1 commitHash2 // opens all files between "commitHash1" and "commitHash2"
function openFiles() {
HASH1="${1}"
#!/bin/bash
check_dependency fzf gsed pup || exit
DELIMITER=" : "
function getUsers() {
URL="${1}"
MARKUP="$(curl -s "https://github.com${URL}")"
@drewbrokke
drewbrokke / git-fuzzy-checkout
Last active March 30, 2023 07:01
Fast git checkout using `fzf`
#!/bin/bash
# Requires 'fzf'
# check_dependency fzf git || exit 1
HELP_TEXT="
git fuzzy-checkout
Check out branches quickly with the power of \`fzf\`.
Default view is local branches (HEADS).
@drewbrokke
drewbrokke / packages.md
Last active June 9, 2020 19:36
Low-to-NO-dependency NPM packages
@drewbrokke
drewbrokke / gm.bash
Last active October 22, 2020 15:47
Quickly `cd` to an OSGi module
# Running this will display a filterable list of modules
# Once you select one, you will navigate to it
# You can call it with an argument to be used as a pre-filter on the module list
# Requires 'fzf', I highly recommend it.
# https://github.com/junegunn/fzf
# In this case, 'fzf' is reading from stdin
# USAGE EXAMPLES
# gm (will present the full list of modules)
@tomhicks
tomhicks / plink-plonk.js
Last active July 16, 2024 02:59
Listen to your web pages
@drewbrokke
drewbrokke / README.md
Created February 28, 2018 17:14
Move language keys from one directory to another

moveLang

Usage

moveLang \
  -k "key-one key-two key-three" \
  -s modules/apps/foundation/contacts/contacts-web/src/main/resources/content \
  -t portal-impl/src/content
@drewbrokke
drewbrokke / nscript
Last active October 16, 2020 22:37
nscript - script management for the 22nd century
#!/bin/bash
NSCRIPT_SCRIPT_DIR="${NSCRIPT_SCRIPT_DIR:?Please set the "NSCRIPT_SCRIPT_DIR" environment variable. nscript will use it for storing shell scripts}"
if [[ ! -d "${NSCRIPT_SCRIPT_DIR}" ]]
then
echo "The NSCRIPT_SCRIPT_DIR value \"${NSCRIPT_SCRIPT_DIR}\" is not a valid directory."
exit 1
fi
@kenjiheigel
kenjiheigel / ci.xml
Last active October 10, 2018 17:24
Backend Test Results Generator
<?xml version="1.0"?>
<project basedir="." default="generate-backend-results" name="ci" xmlns:antelope="antlib:ise.antelope.tasks">
<import file="build-test.xml" />
<target name="prepare-classpath">
<gradle-execute dir="modules/test/jenkins-results-parser" task="jar" />
<copy todir="lib/development">
<fileset dir="tools/sdk/dist" includes="com.liferay.jenkins.results.parser*.jar" />