Skip to content

Instantly share code, notes, and snippets.

YAMAMOTO Masaya pandax381

Block or report user

Report or block pandax381

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View proxy.pac
function FindProxyForURL(url, host){
return "SOCKS5; DIRECT";
pandax381 / ipmond.c
Created May 17, 2019
Detect add/delete IP address to interface on Linux
View ipmond.c
#include <stdio.h>
#include <string.h>
#include <unistd.h>
#include <errno.h>
#include <signal.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <arpa/inet.h>
#include <linux/rtnetlink.h>
#include <linux/if.h>
pandax381 /
Last active Apr 18, 2019
Trace reuse TCP connection in TIME_WAIT state
from __future__ import print_function
from bcc import BPF
from socket import inet_ntop, ntohs, AF_INET, AF_INET6
from struct import pack
b = BPF(text="""
#include <uapi/linux/ptrace.h>
#include <net/sock.h>
pandax381 / image
Created Jul 10, 2018
View image
# -*- shell-script -*-
local mnt="$1"
local_device_setup "${ROOT}" "usb storage"
pandax381 /
Last active Jun 25, 2018
arduino-esp32 に mruby を組み込む手順


$ export ARDUINO_ESP32_ROOT=$HOME/Documents/Arduino/hardware/espressif/esp32
$ mkdir mruby
$ cd mruby
$ git clone
$ cd mruby 
$ git checkout 1.4.1
pandax381 / arduino-esp-mruby.ino
Created Jun 21, 2018
mruby on arduino-esp32
View arduino-esp-mruby.ino
#include <stdint.h>
#include "sdkconfig.h"
#include "mruby.h"
#include "mruby/irep.h"
#include "mruby/compile.h"
#include "mruby/error.h"
#include "mruby/string.h"
const uint8_t mrbcode[] = {
View nsswitch.conf
# /etc/nsswitch.conf
# Example configuration of GNU Name Service Switch functionality.
# If you have the `glibc-doc-reference' and `info' packages installed, try:
# `info libc "Name Service Switch"' for information about this file.
passwd: compat
group: compat
shadow: compat
gshadow: files
pandax381 / softfloat_test2.c
Created Aug 17, 2017
Berkeley SoftFloat test 2
View softfloat_test2.c
#include <stdio.h>
#include "softfloat.h"
main (void) {
float32_t a = {0x3F800000};
float32_t b = {0x40000000};
float32_t c = f32_add(a, b);
fprintf(stderr, "0x%x (%ld) + 0x%x (%ld) = 0x%x (%ld)\n",
pandax381 / softfloat_test.c
Last active Aug 17, 2017
Berkeley SoftFloat test
View softfloat_test.c
#include <stdio.h>
#include "softfloat.h"
main (void) {
float32_t a = ui32_to_f32(0x3F800000); /* 1.0 */
float32_t b = ui32_to_f32(0x40000000); /* 2.0 */
float32_t c = f32_add(a, b);
fprintf(stderr, "0x%lx + 0x%lx = 0x%lx\n",
pandax381 / float_test.c
Created Aug 17, 2017
simple float test
View float_test.c
#include <stdio.h>
#include <stdint.h>
main (void) {
float a = 1.0;
float b = 2.0;
float c = a + b;
fprintf(stderr, "sizeof(float): %d\n", sizeof(float));
You can’t perform that action at this time.