Skip to content

Instantly share code, notes, and snippets.

View darron's full-sized avatar
🎯
Focusing

darron froese darron

🎯
Focusing
View GitHub Profile
require 'rubygems'
# sudo gem install whois # http://www.ruby-whois.org/
require 'whois'
# From your named configuration files:
# egrep -r zone * | cut -d ' ' -f 2 | cut -d '"' -f 2 | sort | uniq > domains.txt
File.open("domains.txt", "r") do |infile|
while (line = infile.gets)
puts "Domain: #{line}"
egrep -r zone * | cut -d ' ' -f 2 | cut -d '"' -f 2 | sort | uniq > domains.txt
function __construct() {
- @session_start();
+ if ((defined('IN_NTERCHANGE') && IN_NTERCHANGE) || (defined('GLOBAL_SESSION_COOKIE') && GLOBAL_SESSION_COOKIE == true)) {
+ @session_start();
+ } elseif (defined('GLOBAL_SESSION_COOKIE') && GLOBAL_SESSION_COOKIE == false) {
+ // Do nothing.
+ } else {
+ // Default behaviour
+ @session_start();
+ }
[root@ginaz sbin]# ab -n 1000 -c 10 http://site/
This is ApacheBench, Version 2.0.41-dev <$Revision: 1.141 $> apache-2.0
Copyright (c) 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Copyright (c) 1998-2002 The Apache Software Foundation, http://www.apache.org/
Benchmarking site (be patient)
Completed 100 requests
Completed 200 requests
Completed 300 requests
Completed 400 requests
root@varnish:~# ab -n 10000 -c 100 http://varnish/
This is ApacheBench, Version 2.3 <$Revision: 655654 $>
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Licensed to The Apache Software Foundation, http://www.apache.org/
Benchmarking varnish (be patient)
Completed 1000 requests
Completed 2000 requests
Completed 3000 requests
Completed 4000 requests
backend default {
.host = "backendsite";
.port = "80";
.probe = {
.url = "/probe.html";
.timeout = 10 s;
.interval = 30 s;
.window = 10;
.threshold = 8;
.initial = 10;
backend default {
.host = "backendhost";
.port = "80";
.probe = {
.url = "/probe.html";
.timeout = 10 s;
.interval = 30 s;
.window = 10;
.threshold = 8;
.initial = 10;
/* Set the backend / origin server. */
backend default {
.host = "hostname.of.website";
.port = "80";
/* Probe for healthiness of backend. */
/* After 8 passing requests, it marks it as available. */
.probe = {
.url = "/probe.html";
.timeout = 5 s;
.interval = 10 s;
<a href="http://calgarystampede.com/tickets"><img src="http://email.calgarystampede.com/signatures/horsepower.gif" width="500" height="69" alt="Calgary Stampede" /></a>
# Eblast Lists Data
email_insider_stats_uri = 'http://api.createsend.com/api/api.asmx/List.GetStats?ApiKey=' + CAMPAIGN_MONITOR_API_KEY + '&ListID=' + EMAIL_INSIDER
email_insider_stats = HTTParty.get(email_insider_stats_uri)
@email_insider_stats = email_insider_stats.first