Skip to content

Instantly share code, notes, and snippets.

@htesgaard
htesgaard / update_git_repos.sh
Created July 31, 2018 10:24 — forked from douglas/update_git_repos.sh
Update all git repositories under a base directory
#!/bin/bash
# store the current dir
CUR_DIR=$(pwd)
# Let the person running the script know what's going on.
echo -e "\n\033[1mPulling in latest changes for all repositories...\033[0m\n"
# Find all git repositories and update it to the master latest revision
for i in $(find . -name ".git" | cut -c 3-); do
@htesgaard
htesgaard / gitBash_windows.md
Created December 6, 2017 09:40 — forked from evanwill/gitBash_windows.md
how to add more utilities to git bash for windows, wget, make

How to add more to Git Bash on Windows

Git for Windows is bundled with "Git Bash" terminal which is incredibly handy for unix-like commands on a windows machine. It is missing a few standard linux utilities, but it is easy to add ones that have a windows binary available. (Note: a portable alternative is Cmder, the full version comes bundled with Git Bash, notes here.)

The basic idea is that C:\Program Files\Git\mingw64\ is your / directory according to Git Bash (note: depending on how you installed it, the directory might be different. from the start menu, right click on the Git Bash icon and open file location. It might be something like C:\Users\name\AppData\Local\Programs\Git, the mingw64 in this directory is your root). If you go to that directory, you will find the typical linux root folder structure (bin, etc, lib and so on). If you are missing a utility, such as wget, track down a binary for

@htesgaard
htesgaard / ensure-cert-macos.sh
Created December 4, 2017 11:21 — forked from koop/ensure-cert-macos.sh
Ensures a certificate is in the macOS system keychain.
#!/bin/bash
# Usage
# $ ./install-cert-macos.sh "/path/to/cert"
CERT_PATH="$1"
# First, grab the SHA-1 from the provided SSL cert.
CERT_SHA1=$(openssl x509 -in "$CERT_PATH" -sha1 -noout -fingerprint | cut -d "=" -f2 | sed "s/://g")
# Next, grab the SHA-1s of any standard.dev certs in the keychain.
# Don't return an error code if nothing is found.
@htesgaard
htesgaard / git_cheetsheet.md
Last active October 31, 2017 12:13 — forked from hofmannsven/README.md
My simply Git Cheatsheet
@htesgaard
htesgaard / msys2-here-uninstall.reg
Last active April 4, 2017 07:49 — forked from elieux/msys2-here-uninstall.reg
MSYS2 here context menu items
Windows Registry Editor Version 5.00
[-HKEY_CURRENT_USER\Software\Classes\directory\shell\MSYS here]
[-HKEY_CURRENT_USER\Software\Classes\directory\shell\MINGW64 here]
[-HKEY_CURRENT_USER\Software\Classes\directory\shell\MINGW32 here]