Skip to content

Instantly share code, notes, and snippets.

View kawaz's full-sized avatar
🏠
Working from home

Yoshiaki Kawazu kawaz

🏠
Working from home
View GitHub Profile
@kawaz
kawaz / Dockerfile
Created August 2, 2019 03:37 — forked from jgamblin/Dockerfile
Apple_Blee 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 August 26, 2017 22:12 — forked from kazuho/setusergroups
setuidgid w. support for supplementary groups
#! /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 August 29, 2015 14:26 — forked from fxsjy/gist:3291755
Memcached in JavaScript based on Node.JS
//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