start new:
tmux
start new with session name:
tmux new -s myname
/* | |
* This program is free software: you can redistribute it and/or modify | |
* it under the terms of the GNU General Public License as published by | |
* the Free Software Foundation, either version 3 of the License, or | |
* (at your option) any later version. | |
*/ | |
#include <arpa/inet.h> | |
#include <linux/if_packet.h> | |
#include <linux/ip.h> |
#!/bin/bash | |
# http://www.gentoo.org/proj/en/base/amd64/howtos/chroot.xml | |
USER=jmonteagudo | |
CHROOT=/chroot/precise-32 | |
# mount the usual suspects | |
mount -o bind /tmp $CHROOT/tmp/ | |
mount -t proc proc $CHROOT/proc/ | |
mount -t sysfs sys $CHROOT/sys/ | |
mount -o bind /dev $CHROOT/dev/ |
#ifndef __LIST_H | |
#define __LIST_H | |
/* This file is from Linux Kernel (include/linux/list.h) | |
* and modified by simply removing hardware prefetching of list items. | |
* Here by copyright, credits attributed to wherever they belong. | |
* Kulesh Shanmugasundaram (kulesh [squiggly] isis.poly.edu) | |
*/ | |
/* |
#!/bin/bash | |
if [ "$#" -ne 1 ] | |
then | |
echo "SERVER:RPORT:LPORT argument required" | |
exit 1 | |
fi | |
# parse parameters separated with ':' into bash array | |
PARAMS=(${1//:/ }) | |
SERVER="${PARAMS[0]}" |
// http://stackoverflow.com/questions/14300004/postgresql-equivalent-of-oracles-percentile-cont-function | |
var percentile_cont = function (data, percentile) { | |
var row = (percentile*(data.length -1)); | |
var crn = Math.ceil(row); | |
var frn = Math.floor(row); | |
var result = 0.0; | |
data.sort(function(a,b){return a-b}); | |
if ((crn == frn) && (frn == row)) { |
// derived from http://en.wikipedia.org/wiki/Algorithms_for_calculating_variance#Parallel_algorithm | |
function map() { | |
emit(1, // Or put a GROUP BY key here | |
{sum: this.value, // the field you want stats for | |
min: this.value, | |
max: this.value, | |
count:1, | |
diff: 0, // M2,n: sum((val-mean)^2) | |
}); |
Permission is hereby granted, free of charge, to any person obtaining a copy | |
of this software and associated documentation files (the "Software"), to deal | |
in the Software without restriction, including without limitation the rights | |
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
copies of the Software, and to permit persons to whom the Software is | |
furnished to do so, subject to the following conditions: | |
The above copyright notice and this permission notice shall be included in all | |
copies or substantial portions of the Software. |