download http directory

Here’s a quick note on how to download the contents of an http directory via command line.

Using lftp to download an HTTP directory

Forget wget, lftp is what you covet!

What is lftp?

LFTP is a sophisticated ftp/http client, and a file transfer program supporting a number of network protocols. Like BASH, it has . . . → Read More: download http directory

connectsock.c struct hostent has no member named h_addr compile error

Recently I was trying to compile connectsock.c from Internetworking With TCP/IP Volume III: Client-Server Programming and Applications, Linux/POSIX Socket Version (with D. Stevens), 2000. 0-13-032071-4

Compile Error

Solution? Modify the Make file!

Before:

After:

curl on windows with https

The easiest way to get curl on windows with HTTPS is to simply download and install the git package then add

as an environment variable to allow you to run curl from anywhere.

Don’t forget when running curl commands in a DOS prompt to use double quotes.

Example:

nginx code igniter remove index.php prefix

Objective

Remove the index.php prefix from your nginx code igniter instance.

Assumptions In your main nginx conf file you define how php is called (unix socket or ip:port) You will replace foo.example.com with whatever your domain name is The proper logging path will be defined per your system as opposed to the location i have . . . → Read More: nginx code igniter remove index.php prefix

passing bash variable to perl command in bash script

Recently I tried passing a bash variable to perl command in bash script, it didn’t end well.

Troy Engel from http://tacticalvim.wordpress.com/ was nice enough to point out the issue:

use sed instead of perl for what you need; it’s simpler, faster and uses the bash variables easily.

I set up a test script /home/someuser/test.sh to show:

. . . → Read More: passing bash variable to perl command in bash script

append text to end of file with cat

Overwrite File with multi-line text

Objective: Append multiline text with cat Examples Tell log rotate to start rotating the http log (this overwrites any existing file)

 

append text to end of file with cat

Q: What is this magical feature? A: Here Documents . . . → Read More: append text to end of file with cat

install geoip php centos

To install geoip php centos follow these steps

Install Steps

Verify Installation

git copy remote branch

git copy remote branch

Copy remote master branch to remote QA branch in git

Copy remote master branch to remote production branch in git

acrobat failed to connect to a DDE server fix

Problem

You are getting this error message when starting Adobe Acrobat X

Soultion

Modify this registry Key:

Change value “AcroViewA10″ to “AcroViewR10″

php mysql update variable

Goal: Update wordpress post with PHP cli