Skip to content

Instantly share code, notes, and snippets.

#!/bin/bash
# Allow toggling components to install and update based off flags
updateconsul=1
updatedocker=1
updatedockermachine=1
updatedockercompose=1
updatedockerswarm=1
consulversion="0.5.2"
@plastic
plastic / gist:9508072
Last active August 29, 2015 13:57
regex for hashtag
#([\W|\w][^\s]+)
// using with PHP
preg_replace("/#([\W|\w][^\s]+)/", "<a href=\"http://search.twitter.com/search?q=$1\">#$1</a>", $tweetText);