Skip to content

Instantly share code, notes, and snippets.

Avatar

Yoshiaki Kawazu kawaz

View GitHub Profile
@kawaz
kawaz / Dockerfile
Created Aug 2, 2019 — forked from jgamblin/Dockerfile
Apple_Blee Dockerfile
View Dockerfile
FROM ubuntu:18.04
RUN apt-get update && \
apt-get upgrade -y
RUN apt-get update && \
apt-get install -y \
bluetooth \
bluez \
cmake \
@kawaz
kawaz / setusergroups
Last active Aug 26, 2017 — forked from kazuho/setusergroups
setuidgid w. support for supplementary groups
View setusergroups
#! /usr/bin/perl
# https://gist.github.com/kawaz/3e423b0fc6eda643f1f5e11c8f5e0eca
use POSIX qw(setuid setgid);
use Unix::Groups qw(setgroups);
die "usage: setusergroups username child\n"
unless @ARGV >= 2;
my $username = shift @ARGV;
@kawaz
kawaz / gist:42968714c325366291ee
Last active Aug 29, 2015 — forked from fxsjy/gist:3291755
Memcached in JavaScript based on Node.JS
View gist:42968714c325366291ee
//author: Sun, Junyi (weibo.com/treapdb)
//usage: node --nouse-idle-notification --expose-gc --max-old-space-size=8192 memcached.js
var config ={
port: 11211,
max_memory: 300 // default 100M bytes
}
var net = require('net');
var LRU = function (max) { // this LRU implementaion is based on https://github.com/chriso/lru