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
@drewbrokke
drewbrokke / git-fuzzy-checkout
Last active April 4, 2025 13:42
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 / fast-login.properties
Created March 17, 2020 22:21
Fast portal startup properties
####### SPEED UP LOGIN #######
captcha.check.portal.create_account=false
captcha.check.portal.send_password=false
company.security.strangers.verify=false
live.users.enabled=true
setup.wizard.enabled=false
terms.of.use.required=false
users.last.name.required=false
users.reminder.queries.enabled=false
@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)
@drewbrokke
drewbrokke / .jack.json
Last active February 13, 2020 17:30
My `jack-cli` configuration
{
"$schema": "./.schema.jack.json",
"blacklistPatterns": [],
"commands": [
{
"command": "git -p diff [%SHA_RANGE%] --name-only | less",
"description": "View changed file names",
"foreground": true,
"key": "l"
},
# bash/zsh git prompt support
#
# Copyright (C) 2006,2007 Shawn O. Pearce <[email protected]>
# Distributed under the GNU General Public License, version 2.0.
#
# This script allows you to see repository status in your prompt.
#
# To enable:
#
# 1) Copy this file to somewhere (e.g. ~/.git-prompt.sh).
function openEditContactInformationWindow(title, entryId, fieldNames, baseRenderURL, baseEditURL, portletNamespace) {
var renderURL = new URL(baseRenderURL);
var renderURLSearchParams = renderURL.searchParams;
renderURLSearchParams.set(`${portletNamespace}entryId`, entryId);
var modalId = `${portletNamespace}editContactInformationModal`;
Liferay.Util.openWindow(
@drewbrokke
drewbrokke / setupcore
Created September 24, 2018 18:22
Set up changes to portal-impl and portal-kernel after making changes that affect API in those directories.
#!/bin/bash
error() {
echo "$1"
exit 1
}
log() {
echo "[setupcore] $1"
}
@drewbrokke
drewbrokke / markup.html
Last active June 1, 2018 21:32
How to put the header and button on the same row
<h3 class="sheet-subtitle">
<span class="autofit-padded-no-gutters autofit-row">
<span class="autofit-col autofit-col-expand">
<span class="heading-text">
Text goes here
</span>
</span>
<span class="autofit-col">
Button goes here