Skip to content

Instantly share code, notes, and snippets.

@touhonoob
touhonoob / plot.p
Created November 15, 2016 16:38 — forked from garethrees/plot.p
Graphing apache benchmark results with gnuplot
# Output to a jpeg file
set terminal jpeg size 1280,720
# Set the aspect ratio of the graph
set size 1, 1
# The file to write to
set output "timeseries.jpg"
# The graph title
@touhonoob
touhonoob / benchmark.sh
Created November 15, 2016 16:37 — forked from emersonmoretto/benchmark.sh
Apache bench + Gnuplot Script
#!/bin/bash
echo -e "\nbenchmark.sh -n<number of requests> -c<number of concurrency> <URL1> <URL2> ..."
echo -e "\nEx: benchmark.sh -n100 -c10 http://www.google.com/ http://www.bing.com/ \n"
## Gnuplot settings
echo "set terminal png
set output 'benchmark_${1}_${2}.png'
set title 'Benchmark: ${1} ${2}'
<div id="home" data-role="page">
<div role="main" class="ui-content">
<h1>Contract On</h1>
<div class="effect">
<div class="blackball"></div>
<div class="redball"></div>
<div class="greenball"></div>
<div class="blueball"></div>
</div>
</div>
<div id="home" data-role="page">
<div role="main" class="ui-content">
<h1>Contract On</h1>
<div class="effect">
<div class="blackball"></div>
<div class="redball"></div>
<div class="greenball"></div>
<div class="blueball"></div>
</div>
</div>
<?php
use Phalcon\DI as DI;
class Dummy {
private $test;
function getTest() {
return $this->test;
}
#! /bin/sh
#
# Based on Mike Miller's gwhitelist at:
# http://archive.mgm51.com/sources/gwhitelist.html
# Copyright (c) 2013 Mike Miller <[email protected]>
#
# Modified 2014 by Steve Jenkins <[email protected]> to format
# output for mod_remoteip on Apache with Google PageSpeed Service
#
# Permission to use, copy, modify, and distribute this software for any
#!/bin/sh
#
# /etc/rc.d/init.d/supervisord
#
# Supervisor is a client/server system that
# allows its users to monitor and control a
# number of processes on UNIX-like operating
# systems.
#
# chkconfig: - 64 36
<?php
/**
* Clean HTML string removing all element attributes and elements which are
* not in the provided whitelist (but keeping their allowed children).
*
* @see https://github.com/alixaxel/phunction/blob/master/phunction/HTML.php
* @param string $html to clean
* @param array $whitelist
*/
function clean_html($html, array $whitelist)
@touhonoob
touhonoob / jquery.xdomain.js
Created July 17, 2012 20:05 — forked from mathieucarbou/jquery.xdomain.js
jQuery CORS Plugin - transparently add CORS support for IE8+ in jQuery using XDomainRequest. Support cookies.
PROJECT MOVED TO https://github.com/Ovea/cors
/**
* https://gist.github.com/1114981
*
* By default, support transferring session cookie with XDomainRequest for IE. The cookie value is by default 'jsessionid'
*
* You can change the session cookie value like this, before including this script:
*
* window.SESSION_COOKIE_NAME = 'PHP_SESSION';