I hereby claim:
- I am akhenakh on github.
- I am akh (https://keybase.io/akh) on keybase.
- I have a public key whose fingerprint is C4E6 D698 01D7 45F5 B6DC B48F 258B 18A5 DF33 C30B
To claim this, I am signing this object:
#!/bin/sh | |
freebsd-update fetch | |
freebsd-update install | |
portsnap fetch update | |
portmaster -a | |
pkg clean |
I hereby claim:
To claim this, I am signing this object:
#import "NBUnitsNumberFormatter.h" | |
@implementation NBUnitsNumberFormatter | |
- (NSString *)stringForObjectValue:(id)value; { | |
if (![value isKindOfClass:[NSNumber class]]) { | |
return nil; | |
} | |
return [self stringForFloat:[value floatValue]]; | |
} |
#!/bin/bash | |
# using macports install: | |
# port install gcc5 rocksdb leveldb | |
export CC=/opt/local/bin/gcc-mp-5 | |
export CXX=/opt/local/bin/g++-mp-5 | |
export LEDISTOP=$(pwd) | |
export LEDISROOT="${LEDISROOT:-${LEDISTOP/\/src\/github.com\/siddontang\/ledisdb/}}" | |
# LEDISTOP sanity check | |
if [[ "$LEDISTOP" == "${LEDISTOP/\/src\/github.com\/siddontang\/ledisdb/}" ]]; then | |
echo "WARNING: LEDISTOP($LEDISTOP) does not contain src/github.com/siddontang/ledisdb" |
# 2012 Fabrice Aneche. https://gist.github.com/2996326 | |
# Gevent rewrite with requests | |
# | |
# Copyright 2011 The greplin-tornado-ses Authors. | |
# | |
# Licensed under the Apache License, Version 2.0 (the "License"); | |
# you may not use this file except in compliance with the License. | |
# You may obtain a copy of the License at | |
# | |
# http://www.apache.org/licenses/LICENSE-2.0 |
from werkzeug.routing import NumberConverter, ValidationError | |
class NegativeFloatConverter(NumberConverter): | |
regex = r'\-?\d+\.\d+' | |
num_convert = float | |
def __init__(self, map, min=None, max=None): | |
NumberConverter.__init__(self, map, 0, min, max) | |
app.url_map.converters['float'] = NegativeFloatConverter |
void checksum(uint8_t *buf, int length, uint8_t *dstbuf, int *retlength) { | |
uint16_t sum = 0; | |
// then calculate checksum | |
for (int i=3;i<length-1;i++) { | |
sum+= buf[i]; | |
} | |
sum = CFSwapInt16HostToBig(sum); | |
uint8_t right = (sum >> 8) & 0xff; | |
uint8_t checksum = 0xFF - right; |
pkg install bison flex leveldb protobuf gmake ruby ruby-gems bzr mercurial valgrind | |
export CC=clang | |
export GOROOT=/home/akh/dev/gosrc | |
export CGO_CFLAGS="-I/usr/local/include" | |
export CGO_LDFLAGS="-L/usr/local/lib" | |
git clone https://github.com/influxdb/influxdb.git | |
./configure --with-flex=/usr/local/bin/flex --with-bison=/usr/local/bin/bison | |
# edit Makefile to change the SHELL path to /usr/local/bin/bash |
import json | |
import datetime | |
import re | |
DATE_FORMAT = '%Y-%m-%d %H:%M:%S' | |
def datetime_parser(entry): | |
for k, v in entry.items(): | |
if isinstance(v, basestring) and re.search("^[0-9]{4}-[0-9]{2}-[0-9]{2} [0-9]{2}:[0-9]{2}:[0-9]{2}$", v): | |
try: | |
entry[k] = datetime.datetime.strptime(v, DATE_FORMAT) |
# Contributor: Andreas Baumann <abaumann at yahoo dot com> | |
pkgname=snowball-c | |
pkgver=20140401 | |
pkgrel=1 | |
pkgdesc="Snowball rule-based stemming algorithms (shared lib + stemwords executable)" | |
arch=('i686' 'x86_64', 'armv6h') | |
url='http://snowball.tartarus.org/' | |
license=('BSD') | |
makedepends=() |