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 | |
THEROOTURL="http://www.domain.com" | |
THEPATHS="foo,bar,rar.htm,car.txt" | |
IFS="," | |
for THEPATH in $THEPATHS; do | |
echo "------------------------------------------------------------"; | |
echo "$THEROOTURL/$THEPATH"; | |
wget $THEROOTURL/$THEPATH --spider 2>&1 | grep "HTTP" |
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 | |
hash make 2>&- || { echo >&2 "I require make but it's not installed. Aborting."; exit 1; } | |
hash autoreconf 2>&- || { echo >&2 "I require aureconf but it's not installed. Aborting."; exit 1; } | |
hash unzip 2>&- || { echo >&2 "I require unzip but it's not installed. Aborting."; exit 1; } | |
hash svn 2>&- || { echo >&2 "I require svn but it's not installed. Aborting."; exit 1; } | |
function errorcheck(){ | |
if [ "$?" -gt 0 ]; 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
PS1="\[\e[0:32m\]\w \[\e[0;39m\]\$ " | |
if [ -f ~/.git-completion.bash ]; then | |
source ~/.git-completion.bash | |
PS1="\[\e[0:32m\]\w"'$(__git_ps1 " \[\e[1;30m\](%s)")'"\[\e[0;39m\]\$ " | |
fi | |
export CLICOLOR=1 | |
export ll='ls -al' |
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
$.fn.scrollCheck = function(options) { | |
var has_read_textarea = false; | |
textarea = $(this); | |
textarea.scroll(function() { | |
if ((textarea.scrollTop() + textarea.height()) >= (textarea[0].scrollHeight/2)) { | |
has_read_textarea = true; | |
} | |
}); | |
var textarea_timeout = window.setInterval(function() { | |
if (has_read_textarea !== false) { |
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
#!/usr/bin/env sh | |
## | |
# This is script with usefull tips taken from: | |
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx | |
# | |
# install it: | |
# curl -sL https://raw.github.com/gist/2108403/hack.sh | sh | |
# |
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
git log --pretty=format:'%s' --author=Luke | grep -v "Merge branch" | sort -u |
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
SELECT CONCAT('Mr. ', forename, ' ', surname, ' - ', jobTitle) FROM table; |
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
# @use --global flag to assign to home ~/.gitconfig instead of local ~/.git/config file | |
# For example | |
# Disable filemode changes. | |
# $ git config core.filemode false | |
# Disable filemode changes globally. | |
# $ git config --global core.filemode false |
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
sed 's/STRING_1/STRING_2/' input.file >> output.file |
OlderNewer