Skip to content

Instantly share code, notes, and snippets.

@fatihky
fatihky / programming 101.lua
Last active November 28, 2016 11:56
programlama programming programcilik 101 odevler odevleri
-- http://rosettacode.org/wiki/Category:Programming_Tasks
-- https://github.com/karan/Projects
-- http://www.dreamincode.net/forums/topic/78802-martyr2s-mega-project-ideas-list/
@fatihky
fatihky / db.go
Last active November 5, 2016 09:16
timeseries db with go
package main
import (
"fmt"
"time"
"sync"
"strconv"
// "sync/atomic"
"github.com/orcaman/concurrent-map"
)
@fatihky
fatihky / client.c
Created October 16, 2016 06:53
libev framer benchmark
#include <stdio.h>
#include <stdlib.h>
#include <malloc.h>
#include <time.h>
#include <assert.h>
#include <sys/wait.h>
#include <errno.h>
#include <assert.h>
#include <ctype.h>
#include <stdarg.h>
@fatihky
fatihky / sum_sse.c
Created October 15, 2016 20:31
sse ile sayi toplama - sum int array with sse simd - sse: 28ms, standard: 97ms
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
#include <assert.h>
#include <sys/wait.h>
#include <errno.h>
#include <assert.h>
#include <ctype.h>
#include <stdarg.h>
#include <arpa/inet.h>
@fatihky
fatihky / c_start.c
Last active October 19, 2016 17:39
c_start c start starting point for c empty c app sample c app
#include <stdio.h>
#include <time.h>
#include <assert.h>
#include <sys/wait.h>
#include <errno.h>
#include <assert.h>
#include <ctype.h>
#include <stdarg.h>
#include <arpa/inet.h>
#include <sys/stat.h>
@fatihky
fatihky / turbopfor-example.c
Last active July 4, 2016 20:34
turbopfor example
#define _LARGEFILE64_SOURCE 1
#define _FILE_OFFSET_BITS 64
#include <stdlib.h>
#include <string.h>
#include <malloc.h>
#include <stdio.h>
#include <math.h>
#include <getopt.h>
#include <sys/stat.h>
#include <x86intrin.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <errno.h>
#include <assert.h>
#include <signal.h>
#include <libmill.h>
#include <rocksdb/c.h>
#include <time.h>
#include <sys/time.h>
var influx = require('influx');
var assert = require('assert');
var client = influx({
//cluster configuration
/*hosts : [
{
host : 'localhost',
port : 8060, //optional. default 8086
protocol : 'http' //optional. default 'http'
var levelup = require('levelup');
var Promise = require('any-promise');
var co = require('co');
var levelPromisify = require('level-promisify');
var fsp = require('fs-promise');
var fs = require('fs');
var Emitter = require('events').EventEmitter;
var util = require('util');
var Measured = require('measured');
var histogram = new Measured.Histogram();
const net = require('net');
const Framer = require('./framer')
var m = Date.now();
var c = 0;
const BC = 200000;
function Client(socket) {
this.socket = socket;
this.list = [];
this.batchLen = 0;