Skip to content

Instantly share code, notes, and snippets.

I don’t want to work forever :)

Kengo Sawatsu KengoSawa2

I don’t want to work forever :)
View GitHub Profile
josephg / main.c
Created August 26, 2017 08:20
kqueue network & file example
View main.c
#include <sys/socket.h>
#include <sys/un.h>
#include <sys/event.h>
#include <netdb.h>
#include <assert.h>
#include <unistd.h>
#include <fcntl.h>
#include <stdio.h>
#include <errno.h>
DaisukeMiyamoto / zabbix_rtx1210.xml
Last active January 25, 2023 10:16
zabbix template for YAMAHA RTX1210 by SNMP agent v2
View zabbix_rtx1210.xml
<?xml version="1.0" encoding="UTF-8"?>
View ryzen-problem-repro
export LANG=C
for ((i=0;1;i++)) ; do
if make -j16 >/dev/null 2>>log.txt ; then
echo "$i: $(date): OK" >>log.txt
echo "$i: $(date): NG" >>log.txt
pudquick /
Last active August 27, 2020 05:10
Calling statfs from python on OS X via ctypes for inspecting filesystem information
from ctypes import CDLL, Structure, c_uint32, c_int64, c_uint64, c_char, create_string_buffer, byref, c_ubyte, c_int16, c_int64, c_int32
# when _DARWIN_FEATURE_64_BIT_INODE is not defined
class statfs32(Structure):
_fields_ = [
("f_otype", c_int16),
("f_oflags", c_int16),
("f_bsize", c_int64),
("f_iosize", c_int64),
("f_blocks", c_int64),
A simple example pyside app that demonstrates dragging and dropping
of files onto a GUI.
- This app allows dragging and dropping of an image file
that this then displayed in the GUI
- Alternatively an image can be loaded using the button
- This app includes a workaround for using pyside for dragging and dropping
voluntas / webrtc.rst
Last active September 21, 2023 12:36
WebRTC コトハジメ
View webrtc.rst
voluntas / webrtc_conf_ja.rst
Last active September 20, 2017 03:08
WebRTC Conference Japan で話してきた
fereria /
Last active December 9, 2020 15:52
## -*- coding: utf-8 -*-
import sys
from PySide import QtCore, QtGui
from PySide.QtUiTools import QUiLoader
import remitools.lib.qt as remiQt
t-nissie /
Last active June 6, 2016 02:37
Mac OS Xとかでファイルとディレクトリの拡張属性xattrを再帰的にすべて消す高速なPythonスクリプト
#!/usr/bin/env python
# recursively removes all extended attributes (xattr) from
# all files and directories under the current or given directory.
# In the latest Mac OS X, you can do the same thing with "xattr -rc".
# See a help of xattr with "xattr -h".
# Author: Takeshi NISHIMATSU
# Gist:
# Example1$
# Example2$ ../foo
# Example3$ ~/foo
mkropat /
Last active July 27, 2023 14:23
Python wrapper around the SHGetKnownFolderPath Windows Shell function
import ctypes, sys
from ctypes import windll, wintypes
from uuid import UUID
class GUID(ctypes.Structure): # [1]
_fields_ = [
("Data1", wintypes.DWORD),
("Data2", wintypes.WORD),
("Data3", wintypes.WORD),
("Data4", wintypes.BYTE * 8)