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:
I hereby claim:
To claim this, I am signing this object:
TCPKeepAlive=yes | |
ServerAliveInterval=15 | |
ServerAliveCountMax=6 | |
Compression=yes | |
ForwardAgent=yes | |
NoHostAuthenticationForLocalhost=yes | |
# Github supports neither AE nor Encrypt-then-MAC. LOL | |
Host github.com | |
MACs [email protected],[email protected],[email protected],[email protected],hmac-sha2-512 |
#import <UIKit/UIKit.h> | |
IB_DESIGNABLE | |
@interface DMBorderLabel : UILabel | |
@property (nonatomic) IBInspectable CGFloat topInset; | |
@property (nonatomic) IBInspectable CGFloat bottomInset; | |
@property (nonatomic) IBInspectable CGFloat leftInset; | |
@property (nonatomic) IBInspectable CGFloat rightInset; |
#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" |
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; |
# Go files ignoring vendor lookup | |
pt --color -G "go$" --ignore "vendor/*" mylookup | less -r |
/* | |
The MIT License (MIT) | |
Copyright (c) 2016 Fabrice Aneche | |
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 |
from gpiozero import MotionSensor | |
from picamera import PiCamera | |
from datetime import datetime | |
from phue import Bridge | |
import subprocess | |
b = Bridge('192.168.xxx.xxx') | |
b.connect() | |
camera = PiCamera() | |
camera.rotation = 180 |