Apache Redirect Web Traffic to Another Sub-domain (e.g. www) or HTTP to HTTPS Using the mod_rewrite module you can configure Apache to redirect web traffic from one sub-domain to another. Usually used to redirect a bare domain ( http://xensoft.com) to the www sub-domain (http://www.xensoft.com). First make sure you're loading the mod_rewrite module in your httpd.conf or
Best Practices Boot on Power Restore with a Mac Mini When Using Linux [http://www.amazon.com/gp/product/B007477COO/ref=as_li_ss_il?ie=UTF8&camp=1789&creative=390957&creativeASIN=B007477COO&linkCode=as2&tag=xen02-20] Apr 4, 2014 4 min read Off Topic Superman Almost Revealed Nuclear Secrets? [http://www.amazon.com/gp/product/B005NKGG50/ref=as_li_ss_il?ie=UTF8&camp=1789&creative=390957&creativeASIN=B005NKGG50&linkCode=as2&tag=xen02-20] Mar 29, 2014 1 min read CLI Adding a Little Color to Recursive diffs I have routine need to recursively diff two large directory trees with small changes sprinkled throughout. After staring at pages and pages of one diffed file after another it becomes easy to lose track of what two files' differences I'm looking at. An easy way to keep track of things OSX Disabling the Window Shadow for Screen Shots in OSX Usually a window Screen Shot in OSX comes with a huge (40px) border that provides an aesthetic shadow. Unfortunately it makes the Screen Shots huge! Further, while you can't shrink the size of the shadow (which would be nice) you can turn it off completely. On the command line run: Regex On-line Regex Checker and Visualizer This is a pretty cool tool [http://regex101.com]. Type in a Regular Expression and the text you're trying to match against and it'll show you what matches as well as explain the the expression. Off Topic Evertaster [http://www.amazon.com/gp/product/B008FR4QTG/ref=as_li_ss_il?ie=UTF8&camp=1789&creative=390957&creativeASIN=B008FR4QTG&linkCode=as2&tag=xen02-20] Add this book to the list of light fair. A quick fun read. Evertaster [http://www.amazon.com/gp/product/B008FR4QTG/ref=as_li_ss_tl? Off Topic Confessions of a D-list Supervillian [http://www.amazon.com/gp/product/B004WE0D3E/ref=as_li_ss_il?ie=UTF8&camp=1789&creative=390957&creativeASIN=B004WE0D3E&linkCode=as2&tag=xen02-20] Confessions of a D-List Supervillain [http://www.amazon.com/gp/product/B004WE0D3E/ref=as_li_ss_tl?ie=UTF8&camp=1789&creative=390957&creativeASIN=B004WE0D3E&linkCode= Off Topic Stardust: The Movie is Better than the Book [http://www.amazon.com/gp/product/B000FC13Y0/ref=as_li_ss_il?ie=UTF8&camp=1789&creative=390957&creativeASIN=B000FC13Y0&linkCode=as2&tag=xen02-20] Feb 1, 2014 2 min read Off Topic Abraham Lincoln: Vampire Hunter [http://www.amazon.com/gp/product/B00351DSCS/ref=as_li_ss_il?ie=UTF8&camp=1789&creative=390957&creativeASIN=B00351DSCS&linkCode=as2&tag=xen02-20] I've been making my way through a bunch of books on my new Kindle [http://www.amazon.com/gp/product/B00BTI6HBS/ref=as_li_ss_tl? Off Topic The Forever War [http://www.amazon.com/gp/product/0312536631/ref=as_li_tl?ie=UTF8&camp=1789&creative=390957&creativeASIN=0312536631&linkCode=as2&tag=xen02-20&linkId=Z7CG5GJMWHWLYIBF] The best and the brightest gathered and trained to fight off a mysterious alien threat. In some ways The Forever War [http://www.amazon.com/ Off Topic Tracy, CA: Home of the Millennium Falcons Millenium High School is in Tracy, CA and their mascot is the Falcon. They are the Millenium Falcons [http://www.maxpreps.com/high-schools/millennium-falcons-%28tracy,ca%29/home.htm] . Off Topic Maze Runner [http://www.amazon.com/gp/product/B002QE3CTY/ref=as_li_ss_il?ie=UTF8&camp=1789&creative=390957&creativeASIN=B002QE3CTY&linkCode=as2&tag=xen02-20] Coming to a movie theater near you. The Maze Runner [http://www.amazon.com/gp/product/B002QE3CTY/ref=as_li_ss_tl?ie=UTF8&camp=1789& RPM Use yum to Only Install Security Relevant Fixes If you use yum to manage your server's packages and you're trying to keep things stable then only installing security relevant fixes makes a lot of sense. The yum-plugin-security package adds a plugin that makes keeping track of these things a snap: yum -y install yum-plugin-security Then you can list MySQL Change a Tables Default Sort Order in MySQL When I say "default" what I mean is the order that rows will be returned if you provide no other explicit ordering via your SQL. Usually this order is just by when a row was inserted into the table. If INSERT's and DELETE's have jumbled a nicely ordered table you Perl Loop through Multiple Arrays in Perl at the Same Time Say you have more than one array that you want to loop through at the same time, pulling out the same row index from each per cycle through the loop. One way would need to loop over each index number: for my $I (0 .. $#arrayA) { my $firstVal = $arrayA[$I]; my CLI Simple CLI Based Timer Alias Here's a quick alias that will start up a timer and report the total time after a control-C. alias timer='which banner>/dev/null 2>&1;[ $? -eq 0 ]&&c=banner||c=echo;export ts=$(date +%s);p='\''$(date -u -d @"$(($(date +%s)-$ts))" +"%H.%M.%S")'\ OSX Speed Up Terminal Tab/Window Load Time on OSX Terminal uses /usr/bin/login to launch new shells, by default this prints out the last login time and the contents of /etc/motd. To look up the last login time login searches through the ASL (Apple System Log) database in /var/log/asl/ . These log files can be very CLI Setup a Remote Shell over ICMP (ping) There may be a tighter way to accomplish this, but these are the basic steps for setting up a remote shell over ICMP. remote First, on the remote system we setup some named pipes, and attach them to the STDIN and STDOUT (we also direct STDERR to STDIN) of a OSX Switching from MacPorts to Homebrew Decided I'd give Homebrew [http://brew.sh] a try - here's the process I used to switch over. Make a list of your ports for reference later: port installed > ports.txt Might be worth going through that list, clear out the dependency ports you can identify and leave a list E-Mail Search Mac Outlook 2011 Mail with Raw Queries You can gain a lot of control over searching your mail by using "Raw Queries" passed straight to the Spotlight Engine. To input a "Raw Query" go to "Advanced Find" - Shift-Command F. And switch the Query Type on the left side of the input box to "Raw Query", it's Best Practices Expand Shortened URLs Here's a requested article. Have you ever run into a shortened URL and have no idea where on the World Wide Web it will take you? There are URL expansion services that will untangle the web of possible redirects and show you ultimately where the shortened URL will take you: CLI Find IPs Accessing your Site Most List IPs that have made requests to an Apache server in ascending order based on the number of requests. { cat /var/log/httpd/access.log!(*.gz) & gzip -dc /var/log/httpd/access.log.*.gz; } \ | cut -d ' ' -f 1 | sort | uniq -c | sort -n 337 8.29.198.25 CLI Sort Human Readable File/Directory Sizes When using sort the -h or the longopt version --human-numeric-sort sort human readable numbers (e.g., 2K 1G) du -hd1 | sort -h 321M ./.ccache 508M ./build-perl-squeeze 862M ./7.6.1 Add -r to sort to get the largest listed first. CLI A Couple Ways to Return a Random Number on the Command Line Lets explore a couple ways to get random numbers on the command line. > Anyone who attempts to generate random numbers by deterministic means is, of course, living in a state of sin. John von Neumann $RANDOM Bash Internal $RANDOM is an internal Bash function (not a constant) that returns a ← Newer Posts Page 2 of 4 Older Posts →
Off Topic Superman Almost Revealed Nuclear Secrets? [http://www.amazon.com/gp/product/B005NKGG50/ref=as_li_ss_il?ie=UTF8&camp=1789&creative=390957&creativeASIN=B005NKGG50&linkCode=as2&tag=xen02-20] Mar 29, 2014 1 min read CLI Adding a Little Color to Recursive diffs I have routine need to recursively diff two large directory trees with small changes sprinkled throughout. After staring at pages and pages of one diffed file after another it becomes easy to lose track of what two files' differences I'm looking at. An easy way to keep track of things OSX Disabling the Window Shadow for Screen Shots in OSX Usually a window Screen Shot in OSX comes with a huge (40px) border that provides an aesthetic shadow. Unfortunately it makes the Screen Shots huge! Further, while you can't shrink the size of the shadow (which would be nice) you can turn it off completely. On the command line run: Regex On-line Regex Checker and Visualizer This is a pretty cool tool [http://regex101.com]. Type in a Regular Expression and the text you're trying to match against and it'll show you what matches as well as explain the the expression. Off Topic Evertaster [http://www.amazon.com/gp/product/B008FR4QTG/ref=as_li_ss_il?ie=UTF8&camp=1789&creative=390957&creativeASIN=B008FR4QTG&linkCode=as2&tag=xen02-20] Add this book to the list of light fair. A quick fun read. Evertaster [http://www.amazon.com/gp/product/B008FR4QTG/ref=as_li_ss_tl? Off Topic Confessions of a D-list Supervillian [http://www.amazon.com/gp/product/B004WE0D3E/ref=as_li_ss_il?ie=UTF8&camp=1789&creative=390957&creativeASIN=B004WE0D3E&linkCode=as2&tag=xen02-20] Confessions of a D-List Supervillain [http://www.amazon.com/gp/product/B004WE0D3E/ref=as_li_ss_tl?ie=UTF8&camp=1789&creative=390957&creativeASIN=B004WE0D3E&linkCode= Off Topic Stardust: The Movie is Better than the Book [http://www.amazon.com/gp/product/B000FC13Y0/ref=as_li_ss_il?ie=UTF8&camp=1789&creative=390957&creativeASIN=B000FC13Y0&linkCode=as2&tag=xen02-20] Feb 1, 2014 2 min read Off Topic Abraham Lincoln: Vampire Hunter [http://www.amazon.com/gp/product/B00351DSCS/ref=as_li_ss_il?ie=UTF8&camp=1789&creative=390957&creativeASIN=B00351DSCS&linkCode=as2&tag=xen02-20] I've been making my way through a bunch of books on my new Kindle [http://www.amazon.com/gp/product/B00BTI6HBS/ref=as_li_ss_tl? Off Topic The Forever War [http://www.amazon.com/gp/product/0312536631/ref=as_li_tl?ie=UTF8&camp=1789&creative=390957&creativeASIN=0312536631&linkCode=as2&tag=xen02-20&linkId=Z7CG5GJMWHWLYIBF] The best and the brightest gathered and trained to fight off a mysterious alien threat. In some ways The Forever War [http://www.amazon.com/ Off Topic Tracy, CA: Home of the Millennium Falcons Millenium High School is in Tracy, CA and their mascot is the Falcon. They are the Millenium Falcons [http://www.maxpreps.com/high-schools/millennium-falcons-%28tracy,ca%29/home.htm] . Off Topic Maze Runner [http://www.amazon.com/gp/product/B002QE3CTY/ref=as_li_ss_il?ie=UTF8&camp=1789&creative=390957&creativeASIN=B002QE3CTY&linkCode=as2&tag=xen02-20] Coming to a movie theater near you. The Maze Runner [http://www.amazon.com/gp/product/B002QE3CTY/ref=as_li_ss_tl?ie=UTF8&camp=1789& RPM Use yum to Only Install Security Relevant Fixes If you use yum to manage your server's packages and you're trying to keep things stable then only installing security relevant fixes makes a lot of sense. The yum-plugin-security package adds a plugin that makes keeping track of these things a snap: yum -y install yum-plugin-security Then you can list MySQL Change a Tables Default Sort Order in MySQL When I say "default" what I mean is the order that rows will be returned if you provide no other explicit ordering via your SQL. Usually this order is just by when a row was inserted into the table. If INSERT's and DELETE's have jumbled a nicely ordered table you Perl Loop through Multiple Arrays in Perl at the Same Time Say you have more than one array that you want to loop through at the same time, pulling out the same row index from each per cycle through the loop. One way would need to loop over each index number: for my $I (0 .. $#arrayA) { my $firstVal = $arrayA[$I]; my CLI Simple CLI Based Timer Alias Here's a quick alias that will start up a timer and report the total time after a control-C. alias timer='which banner>/dev/null 2>&1;[ $? -eq 0 ]&&c=banner||c=echo;export ts=$(date +%s);p='\''$(date -u -d @"$(($(date +%s)-$ts))" +"%H.%M.%S")'\ OSX Speed Up Terminal Tab/Window Load Time on OSX Terminal uses /usr/bin/login to launch new shells, by default this prints out the last login time and the contents of /etc/motd. To look up the last login time login searches through the ASL (Apple System Log) database in /var/log/asl/ . These log files can be very CLI Setup a Remote Shell over ICMP (ping) There may be a tighter way to accomplish this, but these are the basic steps for setting up a remote shell over ICMP. remote First, on the remote system we setup some named pipes, and attach them to the STDIN and STDOUT (we also direct STDERR to STDIN) of a OSX Switching from MacPorts to Homebrew Decided I'd give Homebrew [http://brew.sh] a try - here's the process I used to switch over. Make a list of your ports for reference later: port installed > ports.txt Might be worth going through that list, clear out the dependency ports you can identify and leave a list E-Mail Search Mac Outlook 2011 Mail with Raw Queries You can gain a lot of control over searching your mail by using "Raw Queries" passed straight to the Spotlight Engine. To input a "Raw Query" go to "Advanced Find" - Shift-Command F. And switch the Query Type on the left side of the input box to "Raw Query", it's Best Practices Expand Shortened URLs Here's a requested article. Have you ever run into a shortened URL and have no idea where on the World Wide Web it will take you? There are URL expansion services that will untangle the web of possible redirects and show you ultimately where the shortened URL will take you: CLI Find IPs Accessing your Site Most List IPs that have made requests to an Apache server in ascending order based on the number of requests. { cat /var/log/httpd/access.log!(*.gz) & gzip -dc /var/log/httpd/access.log.*.gz; } \ | cut -d ' ' -f 1 | sort | uniq -c | sort -n 337 8.29.198.25 CLI Sort Human Readable File/Directory Sizes When using sort the -h or the longopt version --human-numeric-sort sort human readable numbers (e.g., 2K 1G) du -hd1 | sort -h 321M ./.ccache 508M ./build-perl-squeeze 862M ./7.6.1 Add -r to sort to get the largest listed first. CLI A Couple Ways to Return a Random Number on the Command Line Lets explore a couple ways to get random numbers on the command line. > Anyone who attempts to generate random numbers by deterministic means is, of course, living in a state of sin. John von Neumann $RANDOM Bash Internal $RANDOM is an internal Bash function (not a constant) that returns a ← Newer Posts Page 2 of 4 Older Posts →
CLI Adding a Little Color to Recursive diffs I have routine need to recursively diff two large directory trees with small changes sprinkled throughout. After staring at pages and pages of one diffed file after another it becomes easy to lose track of what two files' differences I'm looking at. An easy way to keep track of things
OSX Disabling the Window Shadow for Screen Shots in OSX Usually a window Screen Shot in OSX comes with a huge (40px) border that provides an aesthetic shadow. Unfortunately it makes the Screen Shots huge! Further, while you can't shrink the size of the shadow (which would be nice) you can turn it off completely. On the command line run:
Regex On-line Regex Checker and Visualizer This is a pretty cool tool [http://regex101.com]. Type in a Regular Expression and the text you're trying to match against and it'll show you what matches as well as explain the the expression.
Off Topic Evertaster [http://www.amazon.com/gp/product/B008FR4QTG/ref=as_li_ss_il?ie=UTF8&camp=1789&creative=390957&creativeASIN=B008FR4QTG&linkCode=as2&tag=xen02-20] Add this book to the list of light fair. A quick fun read. Evertaster [http://www.amazon.com/gp/product/B008FR4QTG/ref=as_li_ss_tl?
Off Topic Confessions of a D-list Supervillian [http://www.amazon.com/gp/product/B004WE0D3E/ref=as_li_ss_il?ie=UTF8&camp=1789&creative=390957&creativeASIN=B004WE0D3E&linkCode=as2&tag=xen02-20] Confessions of a D-List Supervillain [http://www.amazon.com/gp/product/B004WE0D3E/ref=as_li_ss_tl?ie=UTF8&camp=1789&creative=390957&creativeASIN=B004WE0D3E&linkCode=
Off Topic Stardust: The Movie is Better than the Book [http://www.amazon.com/gp/product/B000FC13Y0/ref=as_li_ss_il?ie=UTF8&camp=1789&creative=390957&creativeASIN=B000FC13Y0&linkCode=as2&tag=xen02-20] Feb 1, 2014 2 min read Off Topic Abraham Lincoln: Vampire Hunter [http://www.amazon.com/gp/product/B00351DSCS/ref=as_li_ss_il?ie=UTF8&camp=1789&creative=390957&creativeASIN=B00351DSCS&linkCode=as2&tag=xen02-20] I've been making my way through a bunch of books on my new Kindle [http://www.amazon.com/gp/product/B00BTI6HBS/ref=as_li_ss_tl? Off Topic The Forever War [http://www.amazon.com/gp/product/0312536631/ref=as_li_tl?ie=UTF8&camp=1789&creative=390957&creativeASIN=0312536631&linkCode=as2&tag=xen02-20&linkId=Z7CG5GJMWHWLYIBF] The best and the brightest gathered and trained to fight off a mysterious alien threat. In some ways The Forever War [http://www.amazon.com/ Off Topic Tracy, CA: Home of the Millennium Falcons Millenium High School is in Tracy, CA and their mascot is the Falcon. They are the Millenium Falcons [http://www.maxpreps.com/high-schools/millennium-falcons-%28tracy,ca%29/home.htm] . Off Topic Maze Runner [http://www.amazon.com/gp/product/B002QE3CTY/ref=as_li_ss_il?ie=UTF8&camp=1789&creative=390957&creativeASIN=B002QE3CTY&linkCode=as2&tag=xen02-20] Coming to a movie theater near you. The Maze Runner [http://www.amazon.com/gp/product/B002QE3CTY/ref=as_li_ss_tl?ie=UTF8&camp=1789& RPM Use yum to Only Install Security Relevant Fixes If you use yum to manage your server's packages and you're trying to keep things stable then only installing security relevant fixes makes a lot of sense. The yum-plugin-security package adds a plugin that makes keeping track of these things a snap: yum -y install yum-plugin-security Then you can list MySQL Change a Tables Default Sort Order in MySQL When I say "default" what I mean is the order that rows will be returned if you provide no other explicit ordering via your SQL. Usually this order is just by when a row was inserted into the table. If INSERT's and DELETE's have jumbled a nicely ordered table you Perl Loop through Multiple Arrays in Perl at the Same Time Say you have more than one array that you want to loop through at the same time, pulling out the same row index from each per cycle through the loop. One way would need to loop over each index number: for my $I (0 .. $#arrayA) { my $firstVal = $arrayA[$I]; my CLI Simple CLI Based Timer Alias Here's a quick alias that will start up a timer and report the total time after a control-C. alias timer='which banner>/dev/null 2>&1;[ $? -eq 0 ]&&c=banner||c=echo;export ts=$(date +%s);p='\''$(date -u -d @"$(($(date +%s)-$ts))" +"%H.%M.%S")'\ OSX Speed Up Terminal Tab/Window Load Time on OSX Terminal uses /usr/bin/login to launch new shells, by default this prints out the last login time and the contents of /etc/motd. To look up the last login time login searches through the ASL (Apple System Log) database in /var/log/asl/ . These log files can be very CLI Setup a Remote Shell over ICMP (ping) There may be a tighter way to accomplish this, but these are the basic steps for setting up a remote shell over ICMP. remote First, on the remote system we setup some named pipes, and attach them to the STDIN and STDOUT (we also direct STDERR to STDIN) of a OSX Switching from MacPorts to Homebrew Decided I'd give Homebrew [http://brew.sh] a try - here's the process I used to switch over. Make a list of your ports for reference later: port installed > ports.txt Might be worth going through that list, clear out the dependency ports you can identify and leave a list E-Mail Search Mac Outlook 2011 Mail with Raw Queries You can gain a lot of control over searching your mail by using "Raw Queries" passed straight to the Spotlight Engine. To input a "Raw Query" go to "Advanced Find" - Shift-Command F. And switch the Query Type on the left side of the input box to "Raw Query", it's Best Practices Expand Shortened URLs Here's a requested article. Have you ever run into a shortened URL and have no idea where on the World Wide Web it will take you? There are URL expansion services that will untangle the web of possible redirects and show you ultimately where the shortened URL will take you: CLI Find IPs Accessing your Site Most List IPs that have made requests to an Apache server in ascending order based on the number of requests. { cat /var/log/httpd/access.log!(*.gz) & gzip -dc /var/log/httpd/access.log.*.gz; } \ | cut -d ' ' -f 1 | sort | uniq -c | sort -n 337 8.29.198.25 CLI Sort Human Readable File/Directory Sizes When using sort the -h or the longopt version --human-numeric-sort sort human readable numbers (e.g., 2K 1G) du -hd1 | sort -h 321M ./.ccache 508M ./build-perl-squeeze 862M ./7.6.1 Add -r to sort to get the largest listed first. CLI A Couple Ways to Return a Random Number on the Command Line Lets explore a couple ways to get random numbers on the command line. > Anyone who attempts to generate random numbers by deterministic means is, of course, living in a state of sin. John von Neumann $RANDOM Bash Internal $RANDOM is an internal Bash function (not a constant) that returns a ← Newer Posts Page 2 of 4 Older Posts →
Off Topic Abraham Lincoln: Vampire Hunter [http://www.amazon.com/gp/product/B00351DSCS/ref=as_li_ss_il?ie=UTF8&camp=1789&creative=390957&creativeASIN=B00351DSCS&linkCode=as2&tag=xen02-20] I've been making my way through a bunch of books on my new Kindle [http://www.amazon.com/gp/product/B00BTI6HBS/ref=as_li_ss_tl?
Off Topic The Forever War [http://www.amazon.com/gp/product/0312536631/ref=as_li_tl?ie=UTF8&camp=1789&creative=390957&creativeASIN=0312536631&linkCode=as2&tag=xen02-20&linkId=Z7CG5GJMWHWLYIBF] The best and the brightest gathered and trained to fight off a mysterious alien threat. In some ways The Forever War [http://www.amazon.com/
Off Topic Tracy, CA: Home of the Millennium Falcons Millenium High School is in Tracy, CA and their mascot is the Falcon. They are the Millenium Falcons [http://www.maxpreps.com/high-schools/millennium-falcons-%28tracy,ca%29/home.htm] .
Off Topic Maze Runner [http://www.amazon.com/gp/product/B002QE3CTY/ref=as_li_ss_il?ie=UTF8&camp=1789&creative=390957&creativeASIN=B002QE3CTY&linkCode=as2&tag=xen02-20] Coming to a movie theater near you. The Maze Runner [http://www.amazon.com/gp/product/B002QE3CTY/ref=as_li_ss_tl?ie=UTF8&camp=1789&
RPM Use yum to Only Install Security Relevant Fixes If you use yum to manage your server's packages and you're trying to keep things stable then only installing security relevant fixes makes a lot of sense. The yum-plugin-security package adds a plugin that makes keeping track of these things a snap: yum -y install yum-plugin-security Then you can list
MySQL Change a Tables Default Sort Order in MySQL When I say "default" what I mean is the order that rows will be returned if you provide no other explicit ordering via your SQL. Usually this order is just by when a row was inserted into the table. If INSERT's and DELETE's have jumbled a nicely ordered table you
Perl Loop through Multiple Arrays in Perl at the Same Time Say you have more than one array that you want to loop through at the same time, pulling out the same row index from each per cycle through the loop. One way would need to loop over each index number: for my $I (0 .. $#arrayA) { my $firstVal = $arrayA[$I]; my
CLI Simple CLI Based Timer Alias Here's a quick alias that will start up a timer and report the total time after a control-C. alias timer='which banner>/dev/null 2>&1;[ $? -eq 0 ]&&c=banner||c=echo;export ts=$(date +%s);p='\''$(date -u -d @"$(($(date +%s)-$ts))" +"%H.%M.%S")'\
OSX Speed Up Terminal Tab/Window Load Time on OSX Terminal uses /usr/bin/login to launch new shells, by default this prints out the last login time and the contents of /etc/motd. To look up the last login time login searches through the ASL (Apple System Log) database in /var/log/asl/ . These log files can be very
CLI Setup a Remote Shell over ICMP (ping) There may be a tighter way to accomplish this, but these are the basic steps for setting up a remote shell over ICMP. remote First, on the remote system we setup some named pipes, and attach them to the STDIN and STDOUT (we also direct STDERR to STDIN) of a
OSX Switching from MacPorts to Homebrew Decided I'd give Homebrew [http://brew.sh] a try - here's the process I used to switch over. Make a list of your ports for reference later: port installed > ports.txt Might be worth going through that list, clear out the dependency ports you can identify and leave a list
E-Mail Search Mac Outlook 2011 Mail with Raw Queries You can gain a lot of control over searching your mail by using "Raw Queries" passed straight to the Spotlight Engine. To input a "Raw Query" go to "Advanced Find" - Shift-Command F. And switch the Query Type on the left side of the input box to "Raw Query", it's
Best Practices Expand Shortened URLs Here's a requested article. Have you ever run into a shortened URL and have no idea where on the World Wide Web it will take you? There are URL expansion services that will untangle the web of possible redirects and show you ultimately where the shortened URL will take you:
CLI Find IPs Accessing your Site Most List IPs that have made requests to an Apache server in ascending order based on the number of requests. { cat /var/log/httpd/access.log!(*.gz) & gzip -dc /var/log/httpd/access.log.*.gz; } \ | cut -d ' ' -f 1 | sort | uniq -c | sort -n 337 8.29.198.25
CLI Sort Human Readable File/Directory Sizes When using sort the -h or the longopt version --human-numeric-sort sort human readable numbers (e.g., 2K 1G) du -hd1 | sort -h 321M ./.ccache 508M ./build-perl-squeeze 862M ./7.6.1 Add -r to sort to get the largest listed first.
CLI A Couple Ways to Return a Random Number on the Command Line Lets explore a couple ways to get random numbers on the command line. > Anyone who attempts to generate random numbers by deterministic means is, of course, living in a state of sin. John von Neumann $RANDOM Bash Internal $RANDOM is an internal Bash function (not a constant) that returns a