Skip to content

Instantly share code, notes, and snippets.

View shelane's full-sized avatar

Shelane French shelane

View GitHub Profile
@shelane
shelane / ask.sh
Created July 21, 2020 03:34
Bash General-Purpose Yes/No Prompt Function ("ask")
# This is a general-purpose function to ask Yes/No questions in Bash, either
# with or without a default answer. It keeps repeating the question until it
# gets a valid answer.
ask() {
# https://djm.me/ask
local prompt default reply
if [ "${2:-}" = "Y" ]; then
prompt="Y/n"
@shelane
shelane / git_create_orphan.sh
Created April 30, 2020 02:58 — forked from seanbuscay/git_create_orphan.sh
Create an orphan branch in a repo.
cd repository
git checkout --orphan orphan_name
git rm -rf .
rm '.gitignore'
echo "#Title of Readme" > README.md
git add README.md
git commit -a -m "Initial Commit"
git push origin orphan_name
@shelane
shelane / gist:653f0de69f9dca4eeb440bfe86e3cf55
Created March 13, 2019 22:14
DRUPAL bootstrap dropdown override
/*
* Bootstrap override
* make dropdown menus do dropdown on hover,
* and allow parent link to be clickable
*/
// place this in your styles
ul.nav li.dropdown:hover > ul.dropdown-menu{
display: block !important;
}
@shelane
shelane / .gitignore
Last active November 6, 2018 19:40 — forked from octocat/.gitignore
Some common .gitignore configurations
# git config --global core.excludesfile ~/.gitignore_global
# Compiled source #
###################
*.com
*.class
*.dll
*.exe
*.o
*.so