Skip to content

Instantly share code, notes, and snippets.

View thomasgroch's full-sized avatar

Thomas Dev thomasgroch

View GitHub Profile
@thomasgroch
thomasgroch / README.md
Created February 13, 2020 01:00 — forked from marchelbling/README.md
git hooks

Git hooks for better pivotal integration:

  • pre-commit:
    • prevents commiting on a branch that is not suffixed by an issue number. Some special branches (develop, master) and hotfixes are not constrained
    • lints modified python files and exits upon non correctly formatted modules
    • other formats (js, scss) have pending code that is not currently called as the workflow for front code is not clear
  • prepare-commit-msg: prepend issue number to commit message if it's missing and if it is set in the branch name (see pre-commit hook)
  • post-checkout: [optional] automatically update submodules when checkouting a branch (requires to define the AUTO_SUBMODULE_UPDATE environment variable)

For easy setup:

@thomasgroch
thomasgroch / README.md
Created February 13, 2020 01:00 — forked from tiagojdf/README.md
git hooks

Git hooks for better pivotal integration:

  • pre-commit:
    • prevents commiting on a branch that is not suffixed by an issue number. Some special branches (develop, master) and hotfixes are not constrained
    • lints modified python files and exits upon non correctly formatted modules
    • other formats (js, scss) have pending code that is not currently called as the workflow for front code is not clear
  • prepare-commit-msg: prepend issue number to commit message if it's missing and if it is set in the branch name (see pre-commit hook)
  • post-checkout: [optional] automatically update submodules when checkouting a branch (requires to define the AUTO_SUBMODULE_UPDATE environment variable)

For easy setup:

@thomasgroch
thomasgroch / EncryptedHomeFolder.md
Created February 12, 2020 03:54 — forked from chetstone/EncryptedHomeFolder.md
Encrypted APFS Home Folder on Mac OSX

Encrypted APFS Home Folder on Mac OSX

Note: This is an update of Will Haley's excellent post to use APFS instead of CoreStorage.

I'll add to Will's warning below that this is a complex process on MacOS because the OS has a lot of assumptions on where things are. I

@thomasgroch
thomasgroch / docker-functions.sh
Created February 12, 2020 03:48 — forked from jcortejoso/docker-functions.sh
docker-functions.sh
#!/bin/bash
# bash wrappers for docker run commands
#
# Helper Functions
#
docker_dcleanup(){
docker rm $(docker ps --filter status=exited -q 2>/dev/null) 2>/dev/null
docker rmi $(docker images --filter dangling=true -q 2>/dev/null) 2>/dev/null
}
# where $BARE_DOTFILES directory is a git bare repository.
BARE_DOTFILES=$HOME/.bare-dotfiles
BARE_DOTFILES_BACKUP=$HOME/.bare-dotfiles-bkp
BARE_DOTFILES_TMP=$HOME/.bare-dotfiles-tmp
[[ ! -e .gitmodules ]] && git clone --depth 1 --branch bare --separate-git-dir=$BARE_DOTFILES https://gitlab.com/dwt1/dotfiles.git $BARE_DOTFILES_TMP && \
cp $BARE_DOTFILES_TMP/.gitmodules $HOME
rm -rf $BARE_DOTFILES_TMP
[[ ! -e $BARE_DOTFILES ]] && git clone --jobs 10 --branch bare --bare https://gitlab.com/dwt1/dotfiles.git $BARE_DOTFILES
@thomasgroch
thomasgroch / ArchLinux-Refind-menuentry-manual.md
Last active February 4, 2020 18:01
Installing rEFInd Manually Using Mac OS X

####Manual ArchLinux Refind.conf Menu Entry

vim $esp/EFI/refind/refind.conf

menuentry "Arch Linux" {
        icon     /EFI/refind/icons/os_arch.png
        volume   Boot
        loader   /boot/vmlinuz-linux
 initrd /boot/initramfs-linux.img
@thomasgroch
thomasgroch / delete.sh
Created January 21, 2020 21:38
Terminal commands for deleting files
find . -name '.DS_Store' -print -delete
# Print out and delete all .DS_Store files in current working directory
find . -type d -name 'node_modules'
# Print a list of all 'node_modules' directories in current working directory
find . -type d -name 'node_modules' -prune -exec rm -rf '{}' +
# Delete all 'node_modules' directories in the current working directory
@thomasgroch
thomasgroch / ..setup.sh
Created January 20, 2020 18:26 — forked from ridingintraffic/..setup.sh
dotfiles!
#!/bin/bash
#..setup.sh . double dots because gist, gets auto sorted (ugh)
# Hi im a penguin
if [ "Linux" = "$(uname -a | awk '{printf $1}')" ]
then
# this is handled is submodoules
#git clone https://github.com/magicmonty/bash-git-prompt.git ~/.bash-git-prompt --depth=1
#create symlinks
@thomasgroch
thomasgroch / create_perfect_gpg.sh
Last active November 27, 2019 19:25
my way to create gpg keys
# ref: http://irtfweb.ifa.hawaii.edu/~lockhart/gpg/gpg-cs.html
# https://alexcabal.com/creating-the-perfect-gpg-keypair
# https://incenp.org/notes/2015/using-an-offline-gnupg-master-key.html
# https://riseup.net/en/security/message-security/openpgp/best-practices#generate-a-revocation-certificate
# https://wiki.archlinux.org/index.php/GnuPG
# [sec] - The following is a secret key
# [ssb] - The following is a secret sub key
# The meaning of # after each of these is that the key is not usable, if say, you used the export subkeys option or if the key is otherwise taken "offline".
# The meaning of > is that the key is stored on something like a smart card.
# Setting up & Using GPG with terminal.
@thomasgroch
thomasgroch / pairup.sh
Created October 25, 2019 01:14 — forked from mfb2/pairup.sh
Pair-up script
#!/bin/bash
#############################
# ./pairup
# tmux pairing setup script
#############################
# Prerequisites:
# tmux
# ngrok