Category: Web

  • Dynamic DNS With CloudFlare – Ubiquiti EdgeRouter

    This tutorial will walk you through the process of setting up Dynamic DNS with CloudFlare on the Ubiquiti EdgeRouter (or really any form of Linux). Please see [[ddns-using-libcloud-edgerouter|here]] if you need to accomplish this using [[https://libcloud.apache.org/|LibCloud]], or [[dynamic-dns-with-ubiquiti-edgerouter|here]] if you are using a supported provider. === The Steps === # First, we will need to […]

  • Python CloudFlare API Library

    I have just recently started experimenting with [[https://www.cloudflare.com/|CloudFlare’s]] services & API. In order to migrate my current framework, I required the ability to work with this API via Python. [[http://libcloud.apache.org/|Apache’s Libcloud]] does not have a CloudFlare driver, and the requirements for building a supported driver require quite a bit more time than rolling a library […]

  • Performance Metrics – Apache vs Nginx

    We just deployed [[http://wiki.nginx.org/Main|Nginx]] as a forward proxy for our production server. Before deploying, we took some page load benchmarks so that we could get an idea of what we improved with this change. The benchmarking was a simple python script that opened 100 concurrent threads (3 times to spot outliers) to a list of […]

  • Dynamic DNS Using LibCloud – EdgeRouter

    This tutorial is aimed for users with a dynamic IP, and a DNS host that does not support DynDNS. Basically, we will push our new IP every time that it changes. The steps outlined in this tutorial will work with the providers listed in [[https://ci.apache.org/projects/libcloud/docs/dns/supported_providers.html#provider-matrix|Apache’s documentation]], but I have only actually tested with Rackspace. === […]

  • Fix incorrect client IP for WordPress behind reverse proxy

    If you are running WordPress behind a reverse proxy, you will need to add the below code to the top of `wp-config.php`: {{{ // Alter `REMOTE_ADDR` header to `HTTP_X_FORWARDED_FOR` if it exists. if($_SERVER[‘HTTP_X_FORWARDED_FOR’]) { $xaddr = explode(‘,’,$_SERVER[‘HTTP_X_FORWARDED_FOR’]); $_SERVER[‘REMOTE_ADDR’] = $xaddr[0]; } }}}

  • Flush DNS Cache in OSX, Linux, and Windows

    =Windows (Prior To Vista)= # Click `Start`->`Run`, type `cmd`, then hit the `Enter` key # In command prompt, type `ipconfig /flushdns`, then hit the `Enter` key =Windows (Vista and Later)= # Click the `Start Orb` # Type `cmd`, then hit the `Enter` key # In command prompt, type `ipconfig /flushdns`, then hit the `Enter` key […]

  • Download YouTube Videos using KeepVid

    This tutorial is designed to walk through the steps of downloading a YouTube video as an mp4, flv, 3gp, webm, or mp3 file. **Note that [[http://www.youtube.com/static?gl=US&template=terms|Youtube’s TOS]] prohibits the downloading of content (as of 5-22-2013):** >Content is provided to you AS IS. You may access Content for your information and personal use solely as intended […]

  • SPAM Identification Techniques

    **Below are a set of rules to live by when trying to determine whether an email should be considered spam/fraudulent and disregarded:** * Commercial emails will always contain a header or footer indicating what company sent you the email * There will be a visible and operable unsubscribe mechanism present in all commercial emails * […]

  • Apache Reverse Proxy w/ URL Rewrite & REMOTE_USER Header

    Here is a sample Location block for setting up Apache as an authentication proxy for a remote Trac install. It sets a REMOTE_USER header so that Trac does not need to worry about authentication, and rewrites the URL for the remote URL Schema. {{{ lang=xml line=1 RewriteEngine On #< Allows Rewritin the URL with regexes […]

  • WordPress Setup – Ubuntu 12.10

    Requires a configured web server 1. WordPress was surprisingly simple to setup: apt-get install wordpress 2. Symlink wordpress to web directory ln -s /usr/share/wordpress /var/www/wordpress 3. Run setup script. (-n seems to be the database to create and the final option is the domain) /usr/share/doc/wordpress/examples/setup-mysql -n wordpress domain.com 4. Permissions chown -R www-data /usr/share/wordpress \ […]