Skip to content

Instantly share code, notes, and snippets.

View kumichou's full-sized avatar

Eric Hankinson kumichou

  • Covered Insurance
  • Hiram, OH
  • 14:59 (UTC -04:00)
View GitHub Profile
@kumichou
kumichou / bump-version-from-git.ps1
Last active July 9, 2020 01:19
Powershell script that will bump version numbers in C# AssemblyInfo files, commit them, and tag the commit.
[CmdletBinding()]
Param(
[Parameter(Mandatory=$True,Position=1)]
[string]$bumpKind
)
function getVersion() {
$tag = Invoke-Expression "git describe --tags --always 2>&1"
$tag = $tag.Split('-')[0]
@kumichou
kumichou / LICENSE
Created June 25, 2018 14:52
This license applies to all public gists https://gist.github.com/kumichou
MIT License
Copyright (c) 2018 Eric Hankinson
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
sudo apt-get install unzip
wget -N http://chromedriver.storage.googleapis.com/2.24/chromedriver_linux64.zip
unzip chromedriver_linux64.zip
chmod +x chromedriver
sudo mv -f chromedriver /usr/local/share/chromedriver
sudo ln -s /usr/local/share/chromedriver /usr/local/bin/chromedriver
sudo ln -s /usr/local/share/chromedriver /usr/bin/chromedriver

Keybase proof

I hereby claim:

  • I am kumichou on github.
  • I am kumichou (https://keybase.io/kumichou) on keybase.
  • I have a public key whose fingerprint is ADAB 5062 C603 314C 51D4 5B6F F9DF AE60 0790 3A79

To claim this, I am signing this object:

#!/usr/bin/env bash
#
# Opt-in for custom prompt through by setting:
# rvm_ps1=1
# in either /etc/rvmrc or $HOME/.rvmrc
#
# Then in order to set your prompt you simply do the following for example
#
# Examples:
@kumichou
kumichou / virtualenv-auto-activate.sh
Last active August 31, 2016 19:11 — forked from codysoyland/virtualenv-auto-activate.sh
Updating to deactivate virtualenv is we're not within a project
#!/bin/bash
# virtualenv-auto-activate.sh
#
# Installation:
# Add this line to your .bashrc or .bash-profile:
#
# source /path/to/virtualenv-auto-activate.sh
#
# Go to your project folder, run "virtualenv .venv", so your project folder
# has a .venv folder at the top level, next to your version control directory.
#!/usr/bin/env bash
BLACK='\033[0;30m'
DARK_GRAY='\033[1;30m'
BLUE='\033[0;34m'
LIGHT_BLUE='\033[1;34m'
GREEN='\033[0;32m'
LIGHT_GREEN='\033[1;32m'
CYAN='\033[0;36m'
LIGHT_CYAN='\033[1;36m'
@kumichou
kumichou / rebuild_available_apt_packages.sh
Created July 21, 2014 19:36
Sometimes the APT cache gets corrupted and both apt-get and aptitude won't install or update packages. If you want to rebuild that list, this is the script for you!
#!/usr/bin/env bash
mv /var/lib/dpkg/available /root/available-corrupted
touch /var/lib/dpkg/available
sh -c 'for i in /var/lib/apt/lists/*_Packages; do dpkg --merge-avail "$i"; done'
@kumichou
kumichou / run.sh
Created June 24, 2014 18:36
Ever wanted to see how to do something simple like catch Ctrl-C in a BASH script? I'll illustrate how to start two different Python "apps" that would normally take over the terminal and stop them both
#!/usr/bin/env bash
CWD=`pwd`
function cleanup {
echo "You pressed Ctrl-C, time to exit the Python Services";
ps aux | grep myservice2 | grep -v grep | awk '{print $2}' | xargs kill -9;
ps aux | grep myservice1 | grep -v grep | awk '{print $2}' | xargs kill -9;
exit 1;
}
@kumichou
kumichou / update-jenkins-to-latest.sh
Created February 3, 2014 02:28
Simple Bash update script to update a Jenkins install on OS X
#!/bin/bash
# This script is meant for OS X Jenkins installs where the install PKG was originally used
cd /Applications/Jenkins
sudo launchctl unload /Library/LaunchDaemons/org.jenkins-ci.plist
sudo mv jenkins.war jenkins-$(date +"%Y%m%d%H%M").war
sudo curl -L -o jenkins.war http://mirrors.jenkins-ci.org/war/latest/jenkins.war