Skip to content

Instantly share code, notes, and snippets.

@shepik
shepik / btp-daemon-readme-google-translated.md
Created July 19, 2012 00:18
btp-daemon-readme-google-translated

General information

BTP - a system for analyzing the performance of Web applications. The idea is this: a web application measures the execution time of some interesting pieces of code (for example, queries to the database / cache / external services), and this time tells BTP. BTP handles the data and displays statistics on the interface. At the same time used to measure the normal code in your programming language, without requiring the use of any native extensions, so while we use the BTP from PHP, but nevertheless, BTP can be used with a pleasure programming language.

Links to all parts of the project:

 - Http://github.com/mambaru/btp-daemon/ - Demon  - Http://github.com/mambaru/btp-webui/ - Web-based interface  - Http://github.com/mambaru/btp-api/ - api

@shepik
shepik / param_call.php
Created July 1, 2012 19:07 — forked from beezee/param_call.php
PHP named parameter calling
<?php
$x = function($bar, $foo="9") {
echo $foo, $bar, "\n";
};
class MissingArgumentException extends Exception {
}
function call_user_func_named_array($method, $arr){
#include <vector>
#include <list>
#include <map>
#include <string>
using namespace std;
template <typename K, typename V>
struct mapper {
typedef typename K::value_type key_type;
@shepik
shepik / wcl.c
Created November 11, 2011 19:37 — forked from khayrov/wcl.c
fast wc -l
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <fcntl.h>
#include <sys/stat.h>
#include <sys/types.h>
#define BUF_SIZE 1048576