Handy one-liners for sed
Mar. 23, 2001 - version 5.1 - compiled by Eric Pement [email protected]
Latest version of this file is usually at:
-
This file is also available in Portuguese at:
| The regex patterns in this gist are intended to match any URLs, | |
| including "mailto:[email protected]", "x-whatever://foo", etc. For a | |
| pattern that attempts only to match web URLs (http, https), see: | |
| https://gist.github.com/gruber/8891611 | |
| # Single-line version of pattern: | |
| (?i)\b((?:[a-z][\w-]+:(?:/{1,3}|[a-z0-9%])|www\d{0,3}[.]|[a-z0-9.\-]+[.][a-z]{2,4}/)(?:[^\s()<>]+|\(([^\s()<>]+|(\([^\s()<>]+\)))*\))+(?:\(([^\s()<>]+|(\([^\s()<>]+\)))*\)|[^\s`!()\[\]{};:'".,<>?«»“”‘’])) |
Mar. 23, 2001 - version 5.1 - compiled by Eric Pement [email protected]
Latest version of this file is usually at:
This file is also available in Portuguese at:
| /Library/Application\ Support/VMware\ Fusion/vmrun | |
| vmrun version 3.1.1 build-282344 | |
| Usage: vmrun [AUTHENTICATION-FLAGS] COMMAND [PARAMETERS] | |
| AUTHENTICATION-FLAGS | |
| -------------------- |
| #!/bin/bash | |
| if [ "$1" = "-h" -o "$1" = "--help" -o -z "$1" ]; then cat <<EOF | |
| appify v3.0.1 for Mac OS X - http://mths.be/appify | |
| Creates the simplest possible Mac app from a shell script. | |
| Appify takes a shell script as its first argument: | |
| `basename "$0"` my-script.sh |
| #!/bin/bash | |
| ROOT_UID=0 | |
| SUCCESS=0 | |
| E_USEREXISTS=70 | |
| # Run as root, of course. (this might not be necessary, because we have to run the script somehow with root anyway) | |
| if [ "$UID" -ne "$ROOT_UID" ] | |
| then | |
| echo "Must be root to run this script." | |
| exit $E_NOTROOT |
| [user] | |
| name = VonC | |
| email = [email protected] | |
| [core] | |
| ; just making sure those eol's stay as they are | |
| autocrlf = false | |
| ; see http://stackoverflow.com/a/22208863/6309 (Git/Bash is extremely slow in Windows 7 x64, until fix in msysgit 1.9.4) | |
| fscache = true | |
| [alias] | |
| ; from http://www.jukie.net/bart/blog/pimping-out-git-log, with author displayed |
| Lbl G | |
| ClrHome | |
| Disp " J.M.'S DRUGWAR"," SIMULATION",""," VERSION 2.00",""," JUST SAY NO." | |
| 2000→Z | |
| 5000→Y | |
| 0→V | |
| 100→K | |
| 1→B | |
| 2→N | |
| 0→I |
| # Modify this file accordingly for your specific requirement. | |
| # http://www.thegeekstuff.com | |
| # 1. Delete all existing rules | |
| iptables -F | |
| # 2. Set default chain policies | |
| iptables -P INPUT DROP | |
| iptables -P FORWARD DROP | |
| iptables -P OUTPUT DROP |
| #!/bin/sh | |
| # Credit to http://www.officeformachelp.com/office/install/remove-office/ | |
| osascript -e 'tell application "Remote Desktop Connection" to quit' | |
| osascript -e 'tell application "Microsoft Document Connection" to quit' | |
| osascript -e 'tell application "Microsoft Messenger" to quit' | |
| osascript -e 'tell application "Microsoft Communicator" to quit' | |
| osascript -e 'tell application "Microsoft Outlook" to quit' | |
| osascript -e 'tell application "Microsoft Excel" to quit' |
| yum groupinstall "Development Tools" |