nginx tips: adding arbitrary output to a response

A while ago i wrote about how to use nginx as a proxy to do cookie based redirects. We use this functionality at work to provide easy access and view the progress of development of each developer.

I thought it would be nice to have the information, of which developers machine you currently have access to, right on the website. But i always disliked to put functionality to accomplish this inside the framework or even the app itself or have to install / modify some special configuration on each developers machine. I always wanted my proxy to do this kind of work. … And nginx can.

It’s the substitution module of nginx, that can replace arbitrary text in a http response. Nginx must be compiled with the option --with-http_sub_module configured.

The following rows show how to fill a variable $name with the name of the developer we are accessing the machine of. The statement sub_filter defines the search pattern as first parameter and the replace string as second parameter — very easy, isn’t it?

set $name ""
if ($http_cookie ~* "(; )?devredirect=([^;]+)") {
    set $name $2;
sub_filter      "</body>"       "<div style='position: fixed; 
    left: 0; top: 0; font-weight: bold; padding: 5px; color: #000; 
    background-color: rgb(235,58,0);'>devredirect: ${name}</div>

The following rows show the part of the proxy configuration with the inserted substitution filter:

server {
    listen          80;

    proxy_redirect          off;
    proxy_set_header        Host            $host;
    proxy_set_header        X-Real-IP       $remote_addr;
    proxy_set_header        X-Forwarded-For $proxy_add_x_forwarded_for;

    location / {
        set $name ""
        if ($http_cookie ~* "(; )?devredirect=([^;]+)") {
            set $name $2;
        sub_filter      "</body>"       "<div style='position: fixed; 
            left: 0; top: 0; font-weight: bold; padding: 5px; 
            color: #000; background-color: rgb(235,58,0);'>
            devredirect: ${name}</div></body>";

        if ($http_cookie ~* "(; )?devredirect=harald") {
            proxy_pass    ;

Apple discontinues the xserve

This is very, very disappointing: Apple discontinues the xserve. It will be available for order until 31th of january 2011. The recommendation of Apple is to buy the Mac mini Server edition or the Mac Pro in future. While the Mac Pro is a great product, i can’t imagine putting it in a 19″ rack: two Mac Pro on a shelf would take the place of 12 units — wow.

At ClipDealer we have two of the xserve. They are great machines and i will definitly miss the possibility to buy more of them.

R.I.P. xserve — i had a very good time with you.

How to Choose an Online Casino

Choosing an online casino can feel like a daunting task. There are hundreds of different options out there, each one telling you why they deserve your gambling dollars. However, doing a little research will show you that not all online casinos will offer you the same experience. Here are a few factors you may want to consider when choosing an online casino.


This may seem like an obvious point, but there’s often no better way to choose an online casino than by finding out which sites have the best reputations. Online casinos that have built strong reputations among your friends, get strong reviews from other sites, and which have stuck around for many years without any sorts of scandals or major issues are probably popular for a very good reason. It may not be the end all of choosing an online casino, but reputation is a great place to start.


Today, most casinos offer strong security features, but it’s still worth checking each site out just to be sure. Are all transactions on the site encrypted, and how strong is that encryption? Have there been any notable security leaks at the site in the past? A trustworthy site should be able to answer these questions honestly without making you feel nervous about playing there.

Deposit and Withdrawal Methods

There are dozens of different ways to fund an online casino account, but not all casino sites allow you to utilize every method. If you have a specific way you’d like to fund your account – be it with a credit card, a bank wire, a traditional paper check or some other method – it’s best to make sure that the casino you choose has no problem with this, and that your chosen method allows you to deposit the amount of money you’d like to play with.

Similarly, take a look at what withdrawal methods will be available to you when you cash out your winnings. You’ll also want to see if there are any withdrawal restrictions, and how long it will take to process your withdrawals.

Casino Games

This is quickly becoming less and less of a factor, but nonetheless, we recommend looking at the roster of games available to you on each site you’re considering. Some online casinos do still have notable omissions in their game lineup, which could include a game or two you’d like to play. Also, if you plan to use the instant play version of the casino, you’ll want to check out what games are offered in that version of the software; sometimes the game list is much longer in the downloadable software client than in the browser-based casino.


One of the biggest factors for most players when choosing an online casino is the casinos bonus offer. Comparing bonuses can be tricky; some online casinos offer players higher maximum bonus amounts, while others have impressive sounding matching percentages. Still others offer a series of bonuses that can give you a huge amount of value if you are willing to make multiple deposits into your account.

We also recommend taking a look at the terms and conditions of a casino’s bonus. This is especially important if you like playing certain games (especially table games); many casino bonuses will not allow you to play these games while you’re clearing your bonus, meaning you’re not going to be happy playing there. While some bonuses may look better than others based on numbers alone, any bonus you can clear is worth more than one you’ll never be able to claim.

Safety & Regulation of Online Casinos

As many people are concerned about Internet security, it’s no surprise that one of the biggest concerns players have when it comes to online casinos is the safety of gambling on the Internet. Thankfully, modern online casinos have many different safeguards in place that keep their customers safe. Here’s a rundown of a few of the most important features used to make sure your online casino experience is safe and reliable.

Random Number Generators

Random Number Generators (RNGs) are the driving force behind most online casino games. Since there isn’t a physical deck of cards, pair of dice or spinning wheel to determine the results each time you bet, a random number generator is used to pick cards, numbers, or other random factors in casino games.

RNGs use very complex methods to ensure the results are truly random and unpredictable. For instance, an RNG might use a combination of various inputs to develop a “seed” number, which is then fed into what’s known as a “pseudo-random” number generator which uses that seed to come up with the final result. The pseudo-random generator along would be close enough to random to be virtually impossible to exploit, but by using an essentially random input (weather readings, clock times, mouse movements, or some combination of many factors) to generate a new seed each time, truly random results are generated.

These RNGs ensure that games are played just as fairly as those in a real casino. In fact, these games are often even more “accurate” than their real world casino counterparts, as it’s much more difficult to tamper with a virtual deck or dice than the real thing! Over time, you’ll see that the results of an online roulette wheel or craps game come very close to what you’d expect based on the laws of probability.

Jurisdictions and Licensing

All reputable online gambling companies are licensed in a jurisdiction that provides oversight for online casino activities. Some of the better known jurisdictions offer online casino licensing include the Kahnawake Mohawk Territory in Canada and the Caribbean island nation of Antigua and Barbuda.

In addition, many major nations have begun requiring sites to obtain licenses from their own governments in order to operate in these markets. High profile legislative changes in France and Italy in the last two years are just two examples of countries taking the licensing burden upon themselves in order to provide the highest possible level of security to their citizens…and increase tax revenues at the same time.

Legality of Online Casinos

The legality of online casinos is a tricky subject to address, as laws vary greatly in different jurisdictions. In the United States, for instance, it would certainly be safe to say that operating an online casino is against the law; however, players have never been prosecuted for gambling on websites, and even in cases where the US government has determined that online gambling sites were illegal – such as in the recent case against PokerStars, Full Tilt Poker and Absolute Poker that rocked the online poker world – players were able to get their money returned to them, and no action was taken against those who played on the site.

In most parts of the world, playing on gambling websites, including online casinos, is unambiguously legal. However, there are many nations in which only certain sites are endorsed by local governments; for instance, France and Italy have recently introduced legislation that allows online gambling, but only on sites licensed by their respective governments.

As always, if you’re unsure about the laws in your jurisdiction, check to find out exactly what is permitted and what is not before you begin gambling online. In most cases, you’ll find that there are no prohibitions against online gambling; if there are, it’s likely the case that these laws are targeted at individuals and companies operating online gambling sites, and not players who choose to gamble on existing sites.

History of Online Casinos

Online casinos have now been a part of the gambling landscape for nearly 20 years. The first Internet-based casinos began operating around 1995 and 1996, after Microgaming developed the first online casino software platform that was safe and reliable enough for real money play. Sources differ on which online casino was the first to go into operation, but most point to either InterCasino (which began operation in early 1995) or GamingClub (which was established in 1994) as having the legitimate claim to being the first to take bets online.

The next few years saw an explosion of online casino options for players, as more and more entrepreneurs attempted to claim a stake in the burgeoning online gambling industry. By the turn of the 21st century, online casinos were a billion dollar industry.

In the last decade, online gamblers have seen a huge improvement in the quality and quantity of the gaming options available to them. Instant play and browser-based casino clients have opened Internet gambling to Mac, Linux and other users, while competition between major software providers has improved the graphical quality and overall reliability of casino software. Hundreds of different games are now available at most online casinos, and new games are released regularly, offering exciting new options for players tired of the same old casino games.

Best Casino Sites in 2018

Welcome to! Here, you’ll find all the information you need to pick the best casino sites for you. We’ve gone and reviewed countless online casino sites in an effort to find the best online casino sites available on the Internet.

There’s plenty of information for you to look over, but if you’re just looking for our picks for the best casino sites, we’ve picked ten that stand out from the rest! Here are our choices for the top ten casino sites in the world for 2018:

#1 Casino Site: Rome Casino

Rome Casino ( is open to all Americans and is rated by most as the world’s best casino site. Not only does it feature the smooth playing Top Game software and over 100 different casino games, but the graphic interface is one of the best around. You won’t find many casinos that can offer the same mix of style and substance you find at Rome.

Rome Casino also features one of the best online casino bonuses in the industry. By signing up for an account there today, you’ll be eligible to receive a 100% matching bonus of up to $1,000 on each of your first 10 deposits!

#2 Casino Site: Casino Titan

Casino Titan ( is our #2 favorite online casino, one that we never tire of playing at, and one we love recommending to others. USA players are more than welcome to play at Casino Titan, which is powered by the popular Real Time Gaming software.

Casino Titan features over 100 different games, including over 100 slots and all of your favorite table games and video poker machines. As an added bonus, new players are eligible for some amazing rewards. You can receive a 400% matching bonus of up to $1,000 on your first deposit, and several monthly bonuses, just by signing up for your Casino Titan account today!

#3 Casino Site: Win Palace Casino

Win Palace Casino ( is actually very similar to Casino Titan, as both use the same Real Time Gaming software to power their games. For the most part, you’ll see the same games here, and they’ll play the same way; the main difference between the two comes in the graphical department, as Win Palace has a more understated and clean style.

Americans are welcome to play at Win Palace Casino, just like at all of the real money casino sites on our list. You can take advantage of a 400% matching bonus of $1000 over your first deposits by signing up for a Win Palace Casino account right now!

Bitcoin Binary Options For Trading And Making Money

Binary options have been shared among traders who wish to have low risk. Applying the same logic to draw Bitcoin traders, some brokerage firms have started offering Bitcoin binary options. Some brokers provide competitive Bitcoin binary options trading features that traders trust when they are trading.

Reading reviews and news from around the world you can find out which are the brokerage firms that are offering exclusive Bitcoin binary options. Also, as there are various reasons behind such popularity like the reliability, attractive offers, excellent customer care, etc. you should look for the most exciting offers as well that are being offered by brokers.

Admitting the fact that when a trader is opening a trading account with a Bitcoin binary options broker, the first reason that comes to mind is that this brokerage firm is registered and licensed entity. Following the same principle, you should open a trading account with brokerage firms that are receiving higher reviews points and make the decision accordingly.

Making Great Profits from Trading Bitcoin Binary Options

If you read reviews, you will come to know that though there are hundreds of binary options brokers that traders can find out on the internet, finding the one that they can rely upon is the one they should choose. Portals like Live Bitcoin News guide you find out which are the brokerage firms that are offering binary options and help you make great returns.

Bitcoin binary options trading is now available for Bitcoin traders and helping them make profitable trading are brokerage firms. Some Bitcoin binary options trading providers welcome the traders on as they can make money completely hassle-free by forecasting short-term Bitcoin exchange rate fluctuations.

Professional Bitcoin Trading With Binary Options

As it has been mentioned above Bitcoin binary options brokers create a user-friendly, easy-to-understand and straightforward interface and a smart trading mode that lets traders hedge their positions; traders have the excellent prospect for significant returns. Nevertheless, as has been mentioned above the unique selling proposition of brokerage firm always is a user-friendly trading platform.

Lastly, trading Bitcoin binary options with the reliable broker is one of the greatest and unique experiences for any trader. You should select the broker that offers the shortest expiry time at 30 Seconds as well as 1 and 2 Minute options and helps traders make money.

Bitcoin trading has emerged as one of the most popular trading methods; however, out of various types of trading Bitcoin binary options are the one that traders ask a lot.