Skip to content

Instantly share code, notes, and snippets.

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

Kenji Rikitake jj1bdx

🏠
Working from home
View GitHub Profile
@jj1bdx
jj1bdx / erlang-resources.md
Last active August 28, 2015 05:43 — forked from macintux/erlang-resources.md
Erlang online resources
@jj1bdx
jj1bdx / report.md
Last active August 29, 2015 02:17 — forked from koyhoge/report.md
エンジニアのための法律勉強会 #7『エンジニアと経営者が知っておきたい労働・請負・派遣の基礎知識とトラブル回避』 参加メモ

エンジニアのための法律勉強会 #7『エンジニアと経営者が知っておきたい労働・請負・派遣の基礎知識とトラブル回避』 参加メモ

イベントURL: https://coedo-dev.doorkeeper.jp/events/29764

@jj1bdx
jj1bdx / 000-forloop-c-lua-difference.md
Last active August 29, 2015 13:56
A big difference in the "for" loops between C and Lua

A big difference in the "for" loops between C and Lua

  • On C, the for statement expressions are evaluated each time in the loop.
  • On Lua, the for statement expressions are evaluated only once at the beginning of the loop.
  • So you can rewrite the exit condition in C during the execution of the loop body;
  • but in Lua you can't do that; all loop parameters in the numeric for are evaluated only once.
@jj1bdx
jj1bdx / erlang-17.0-rc2-wx-osx.md
Last active August 29, 2015 13:56
Installation of Erlang R16B03-1 and 17.0-rc2 to OS X 10.9.2 with Xcode and wxWidgets 3.0.0

Installation of Erlang R16B03-1 and 17.0-rc2 to OS X 10.9.2 with Xcode and wxWidgets 3.0.0

Installing wxWidgets

@jj1bdx
jj1bdx / patch-and-rebuild.md
Last active August 29, 2015 13:58
Apply FreeBSD base OpenSSL patch for 10.0 and later NOW (this Gist is for historic reference use only)

From FreeBSD-announce mailing list

(See http://lists.freebsd.org/pipermail/freebsd-announce/2014-April/001541.html)

FreeBSD port security/openssl have been patched on 2014-04-07 21:46:40 UTC (head, r350548) and 2014-04-07 21:48:07 UTC (branches/2014Q2, r350549).

FreeBSD base system have been patched on 2014-04-08 18:27:32 UTC (head, r264265), 2014-04-08 18:27:39 UTC (stable/10, r264266), 2014-04-08 18:27:46 UTC (releng/10.0, r264267). The update is available with

@jj1bdx
jj1bdx / CONTRIBUTING.md
Created April 25, 2014 03:08
GitHub CONTRIBUTING.md template

If you have found any problems and bugs on project name, submit an issue on the GitHub repository at https://the-project-url.examples.com/.

When you propose a pull request, send the diff with the next branch. The PR will be reviewed and the authors will decide whether it will be merged into the master branch.

If you do not want to use GitHub but have something to

@jj1bdx
jj1bdx / tai-detect.pl
Created June 2, 2014 03:55
tai-detect.pl: checks whether a system is running with TAI or leap-second-aware internal wall clock or not
#!/usr/bin/perl
# tai-detect.pl: detecting current time offset between
# the system unmodified time with gmtime() and
# the leap-second-aware time using Perl DateTime module
# by Kenji Rikitake <kenji.rikitake@acm.org>
# RCS $Id: tai-detect.pl,v 1.3 2008/09/16 08:16:48 kenji Exp kenji $
use strict;
use DateTime;
@jj1bdx
jj1bdx / stacksize.c
Created June 2, 2014 03:58
Get stacksize for each pthread
#include <pthread.h>
#include <stdio.h>
int main(int argc, char *argv[])
{
size_t stacksize;
pthread_attr_t attr;
pthread_attr_init(&attr);
pthread_attr_getstacksize (&attr, &stacksize);
printf("Default stack size = %zu\n", stacksize);
@jj1bdx
jj1bdx / Makefile
Created June 2, 2014 04:00
Make a GNUmakefile callable from both BSD Make and GNU Make
# See http://stackoverflow.com/questions/11775109/determine-if-makefile-is-executed-with-gmake
# and http://stackoverflow.com/questions/11775197/how-to-execute-gmake-make-from-a-bash-script-file
# for the GNUMAKE detection script
# If stock `make` is GNU Make, use `make`; otherwise use `gmake`
GNUMAKE=@`sh -c \
'if (make --version | grep "^GNU Make" 2>&1 >/dev/null); \
then echo make; else echo gmake; fi' 2>/dev/null`
TARGETMAKEFILE= ./name-of-the-target-Makefile
@jj1bdx
jj1bdx / aesencout.txt
Created June 2, 2014 04:05
AES CBC mode test script in Python
d0a02b3836451753d493665d33f0e8862dea54cdb293abc7506939276772f8d5021c19216bad525c8579695d83ba2684