-
Install
colordiff
using Homebrew:brew install colordiff
-
Add function to your
~/.bash_profile
:
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 RGB16bit_list to (choose color) | |
-- convert choosen color to HEX | |
set the formatedColor to my RBG_to_HEX(RGB16bit_list) | |
set the clipboard to formatedColor | |
display dialog "HEX colour value (" & formatedColor & ") has been copied to the clipboard." with icon 1 buttons {"Dismiss"} default button {"Dismiss"} giving up after 10 | |
on RBG_to_HEX(RGB_values) | |
-- this subroutine was taken from "http://www.apple.com/applescript/sbrt/sbrt-04.html" | |
set the hex_list to {"0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "A", "B", "C", "D", "E", "F"} |
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 | |
# | |
# Remount a filesystem with new options by unmounting it first (with umount) | |
# and mounting it again. | |
# | |
# Used for filesystems that do not support the -o remount option (eg. NFS). | |
# | |
# Compatible with Linux/bash only. | |
# | |
# 2012-07-17 |
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
*~ | |
*.pyc | |
.vagrant | |
venv |
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 node | |
/** | |
* Takes specified Markdown files outputs them as HTML. | |
* | |
* Requires showdown: | |
* | |
* npm install showdown | |
* | |
* [email protected] |
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 | |
# | |
# Reduces the total number of Squiz CMS backups to the last X days', whilst | |
# also ensuring at least X number of backups always exist. | |
# | |
# In other words, we want only the last X number of days' backups unless the | |
# backups have failed, in which case we'd prefer to keep the old ones until | |
# the backup is running again. | |
# | |
# [email protected] |
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 -x | |
# | |
# Restores a slave node from the specified master and sets up recovery.conf | |
# with streaming replication. | |
# | |
# [email protected] | |
# 2012-01-24 | |
# | |
if [ -z "$1" -o "$1" == "--help" ]; then |
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 | |
# | |
# Show replication lag for one or more postgresql slaves in streaming replication. | |
# | |
# [email protected] | |
# 2012-01-09 | |
# | |
psql="which psql" | |
psql_extra_opts="" |
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 | |
# | |
# pgpool-II replication manager | |
# | |
# Interfaces with pgpool's pcp command-line tools to provide access to common functions for managing | |
# load-balancing and failover. | |
# | |
# [email protected] | |
# 2011-08-28 |
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 | |
# | |
# Do a ping and output results as CSV. | |
# | |
# [email protected] | |
# 2011-12-23 | |
# | |
if [ $# -lt 1 ]; then | |
echo "Usage: $0 [--add-timestamp] <ping host>" |