This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# The various escape codes that we can use to color our prompt. | |
export RED="\[\033[0;31m\]" | |
export YELLOW="\[\033[0;33m\]" | |
export GREEN="\[\033[0;32m\]" | |
export BLUE="\[\033[0;34m\]" | |
export LIGHT_RED="\[\033[1;31m\]" | |
export LIGHT_GREEN="\[\033[1;32m\]" | |
export WHITE="\[\033[1;37m\]" | |
export LIGHT_GRAY="\[\033[0;37m\]" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# | |
# DESCRIPTION: | |
# | |
# Set the bash prompt according to: | |
# * the branch/status of the current git repository | |
# * the branch of the current subversion repository | |
# * the return value of the previous command | |
# | |
# USAGE: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /bin/sh | |
proxy=$PROXY | |
if [ "$1" == "on" ]; then | |
echo "exporting proxy" | |
export http_proxy=$proxy | |
export https_proxy=$proxy |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
IDEA='' | |
PROJECT_DIR='' | |
function main() { | |
openIdea "$@" | |
} | |
function openIdea() { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# set the command prefix to ` | |
set -g prefix "`" | |
unbind-key C-b | |
bind-key "`" send-prefix | |
set -g default-shell /bin/bash | |
set -g default-command bash | |
set -g status-fg white | |
set -g status-bg black |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- Idempotently add the tasks.id column | |
SET @table_name = 'tasks'; | |
SET @column_name = 'id'; | |
SET @preparedStatement = (SELECT IF( | |
( | |
SELECT COUNT(*) FROM INFORMATION_SCHEMA.COLUMNS | |
WHERE table_name = @table_name | |
AND column_name = @column_name | |
AND data_type = 'BIGINT' | |
) > 0, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# | |
# Author: Stefan Buck | |
# License: MIT | |
# https://gist.github.com/stefanbuck/ce788fee19ab6eb0b4447a85fc99f447 | |
# | |
# | |
# This script accepts the following parameters: | |
# | |
# * owner |