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 / monitors.erl
Created June 29, 2018 03:16 — forked from ferd/monitors.erl
Monitor long scheduling, long gc, and busy distributed ports
F = fun(F) ->
receive
{monitor, Pid, long_schedule, Info} -> io:format(user, "monitor=long_schedule pid=~p info=~p~n", [Pid, Info]);
{monitor, Pid, busy_dist_port, Port} -> io:format(user, "monitor=busy_dist_port pid=~p port=~p~n" ,[Pid, Port]);
{monitor, Pid, long_gc, Info} -> io:format(user, "monitor=long_gc pid=~p info=~p~n", [Pid, Info])
end,
F(F)
end.
Setup = fun() -> register(temp_sys_monitor, self()), erlang:system_monitor(self(), [{long_schedule, 1000}, busy_dist_port, {long_gc, 1000}]), F(F) end.
recon:rpc(fun() -> spawn(Setup) end).
@jj1bdx
jj1bdx / getroot.c
Created January 23, 2019 15:05 — forked from hikalium/getroot.c
Compute (inaccurate) square root (2012)
#include <stdio.h>
#include <stdlib.h>
typedef struct MATH_BIGNUMBER {
unsigned int size_word; //value size in unsigned short(word).
unsigned short *value; //pointer to value array in unsigned short.
} MATH_BigNumber;
typedef union MATH_BIGNUMBER_WORK32 {
@jj1bdx
jj1bdx / cidr-cheat-sheet
Created March 25, 2019 09:22
CIDR SUBNET MASK CHEATSHEET & ICMP TYPE CODES
CIDR SUBNET MASK CHEATSHEET & ICMP TYPE CODES
https://oav.net/mirrors/cidr.html
_____________________________________________________________________________
Netmask Netmask (binary) CIDR Notes
_____________________________________________________________________________
255.255.255.255 11111111.11111111.11111111.11111111 /32 Host (single addr)
255.255.255.254 11111111.11111111.11111111.11111110 /31 Unuseable
255.255.255.252 11111111.11111111.11111111.11111100 /30 2 useable
255.255.255.248 11111111.11111111.11111111.11111000 /29 6 useable
@jj1bdx
jj1bdx / gist_to_github_repo.md
Created December 31, 2020 05:44 — forked from ishu3101/gist_to_github_repo.md
Transfer a gist to a GitHub repository

Transfer a gist to a GitHub repository

clone the gist

git clone https://gist.github.com/ishu3101/6fb35afd237e42ef25f9

rename the directory

mv 6fb35afd237e42ef25f9 ConvertTo-Markdown

change the working directory to the newly renamed directory

cd ConvertTo-Markdown

@jj1bdx
jj1bdx / Makefile
Created July 28, 2021 08:22 — forked from trueroad/Makefile
ipsj.cls を upLaTeX 用にしてみる(源ノ明朝・源ノ角ゴシックを使う)
#
# ipsj.cls を upLaTeX 用にしてみる(源ノ明朝・源ノ角ゴシックを使う)
# https://gist.github.com/trueroad/c44312923bf02226c2274388941d0453
#
# ipsj.cls は pLaTeX 専用のようなのですが、
# 試しに upLaTeX で使えるようにした up-ipsj.cls を作ってみました。
# upLaTeX なので pLaTeX では難しかった源ノ明朝・源ノ角ゴシックの利用が
# できるようになります。
#
# 無保証です。これを使った結果何が起きても責任は取りません。
@jj1bdx
jj1bdx / get-dslite-aftr-in-asahinet.md
Created March 14, 2022 05:01 — forked from stkchp/get-dslite-aftr-in-asahinet.md
ASAHIネットのDS-Liteの終端(AFTR)を取得するメモ

ASAHIネットのDS-Liteの終端(AFTR)を取得する

ASAHIネットがDS-Lite対応したので、 自宅の適当なLinuxルーターにて設定しようとして詰まったAFTR取得に関するメモ。

Linuxルーターを使ってる人向けのニッチなものだけど、情報として残しておく。

終端の情報公開について

@jj1bdx
jj1bdx / cbc.m3u
Created June 9, 2022 03:47 — forked from nevillepark/README.md
CBC radio stream URLs
#EXTM3U
#PLAYLIST:CBC Radio Streams
#EXTINF:-1,CBC Music (Atlantic)
https://cbcliveradio2-lh.akamaihd.net/i/CBCR2_HFX@382379/master.m3u8
#EXTINF:-1,CBC Music (Central)
https://cbcliveradio2-lh.akamaihd.net/i/CBCR2_WPG@385274/master.m3u8
@jj1bdx
jj1bdx / cbc-mp3.m3u
Created June 9, 2022 03:47 — forked from nevillepark/README.md
CBC MP3 stream urls
#EXTM3U
#PLAYLIST:CBC Radio Streams
#EXTINF:-1,CBC Music (Atlantic)
http://cbcmp3.ic.llnwd.net/stream/cbcmp3_cbc_r2_hfx
#EXTINF:-1,CBC Music (Central)
http://cbcmp3.ic.llnwd.net/stream/cbcmp3_cbc_r2_wpg
@jj1bdx
jj1bdx / disable all macos animations
Created October 23, 2023 05:30 — forked from j8/disable all macos animations
disable all macos animations for high performance
defaults write -g NSScrollViewRubberbanding -int 0
defaults write -g NSAutomaticWindowAnimationsEnabled -bool false
defaults write -g NSScrollAnimationEnabled -bool false
defaults write -g NSWindowResizeTime -float 0.001
defaults write -g QLPanelAnimationDuration -float 0
defaults write -g NSScrollViewRubberbanding -bool false
defaults write -g NSDocumentRevisionsWindowTransformAnimation -bool false
defaults write -g NSToolbarFullScreenAnimationDuration -float 0
defaults write -g NSBrowserColumnAnimationSpeedMultiplier -float 0
defaults write com.apple.dock autohide-time-modifier -float 0