Lost the root/admin password? You can reset it using the command-line. Recipe adapted from gitlab issue #308.
# start the console
sudo gitlab-rails console| wget --no-check-certificate --content-disposition https://github.com/joyent/node/tarball/v0.7.1 | |
| # --no-check-cerftificate was necessary for me to have wget not puke about https | |
| curl -LJO https://github.com/joyent/node/tarball/v0.7.1 |
| # Thanks to http://dev.enekoalonso.com/2011/08/09/uninstalling-brew-so-i-can-reinstall/ | |
| cd `brew --prefix` | |
| rm -rf Cellar | |
| brew prune | |
| rm -rf Library .git .gitignore bin/brew README.md share/man/man1/brew | |
| rm -rf ~/Library/Caches/Homebrew | |
| ruby -e "$(curl -fsSL https://raw.github.com/mxcl/homebrew/go)" |
| #!/bin/bash | |
| ## | |
| ## Simple logging mechanism for Bash | |
| ## | |
| ## Author: Michael Wayne Goodman <goodman.m.w@gmail.com> | |
| ## Thanks: Jul for the idea to add a datestring. See: | |
| ## http://www.goodmami.org/2011/07/simple-logging-in-bash-scripts/#comment-5854 | |
| ## Thanks: @gffhcks for noting that inf() and debug() should be swapped, | |
| ## and that critical() used $2 instead of $1 |
| # -*- mode: ruby -*- | |
| # vi: set ft=ruby : | |
| # Vagrantfile API/syntax version. Don't touch unless you know what you're doing! | |
| VAGRANTFILE_API_VERSION = "2" | |
| Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| | |
| # All Vagrant configuration is done here. The most common configuration | |
| # options are documented and commented below. For a complete reference, | |
| # please see the online documentation at vagrantup.com. |
Lost the root/admin password? You can reset it using the command-line. Recipe adapted from gitlab issue #308.
# start the console
sudo gitlab-rails consoleIn the below keyboard shortcuts, I use the capital letters for reading clarity but this does not imply shift, if shift is needed, I will say shift. So ⌘ + D does not mean hold shift. ⌘ + Shift + D does of course.
| Function | Shortcut |
|---|---|
| New Tab | ⌘ + T |
| Close Tab or Window | ⌘ + W (same as many mac apps) |
| Go to Tab | ⌘ + Number Key (ie: ⌘2 is 2nd tab) |
| Go to Split Pane by Direction | ⌘ + Option + Arrow Key |
| #!/usr/bin/env bash | |
| # | |
| # gh-dl-release! It works! | |
| # | |
| # This script downloads an asset from latest or specific Github release of a | |
| # private repo. Feel free to extract more of the variables into command line | |
| # parameters. | |
| # | |
| # PREREQUISITES | |
| # |
curl to get the JSON response for the latest releasegrep to find the line containing file URLcut and tr to extract the URLwget to download itcurl -s https://api.github.com/repos/jgm/pandoc/releases/latest \
| grep "browser_download_url.*deb" \
| cut -d : -f 2,3 \
| tr -d \" \| [alias] | |
| # Merge the current branch to another one, created back when I needed to merge into three branches before issuing a PR | |
| merge-to = "!f() { git checkout $1 && git merge $2 && git checkout $2; }; f" | |
| # Commit shorthand family: | |
| c = commit | |
| cm = commit -m | |
| cam = commit -am | |
| camp = "!f() { git commit -am \"$1\"; git push; }; f" | |
| ca = commit -a |