Skip to content

Instantly share code, notes, and snippets.

View fumiyas's full-sized avatar
💭
> 突然の死 <

SATOH Fumiyasu fumiyas

💭
> 突然の死 <
View GitHub Profile
@fumiyas
fumiyas / getxattr.c
Last active September 2, 2018 13:21
macOS getxattr(2) is broken on SMB shares
/*
macOS getxattr(2) is broken on SMB shares:
* Cannot read xattr larger than 1048576 bytes.
* Fails by ERANGE (Result too large) if 'size' argument is smaller than
entire xattr size.
*/
#include <stdio.h>
#include <stdlib.h>
@fumiyas
fumiyas / finder-cp.bash
Last active May 10, 2018 11:32
Copy and remove a file or directory by macOS Finder application
#!/bin/bash
##
## Copy a file or directory by macOS Finder application
## Copyright (c) 2018 SATOH Fumiyasu @ OSS Technology Corp., Japan
##
## License: GNU General Public License version 3
##
set -u
@fumiyas
fumiyas / zmq-pull-string.c
Created March 18, 2018 08:14
ZeroMQ server to pull and output strings
/*
ZeroMQ server to pull and output strings
Copyright (C) 2018 SATOH Fumiyasu @ OSS Technology Corp., Japan
License: GNU General Public License version 3
*/
#include <stdio.h>
#include <stdlib.h>
#include <stdarg.h>
@fumiyas
fumiyas / dnsstubq.c
Last active October 1, 2021 10:10
Command-line DNS stub resolver
/*
Command-line DNS stub resolver
Copyright (C) 2018-2021 SATOH Fumiyasu @ OSS Technology Corp., Japan
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
@fumiyas
fumiyas / inspect.md
Last active November 24, 2017 07:26
デスクトップSSOが効かない問題のデバッグ
DSAMECAllbackhandler...[Ljavax.security.auth.callback.Callback;@13e342ec
amAuthWindowsDesktopSSO:11/24/2017 04:13:22:199 PM JST: Thread[ajp-bio-8009-exec-1,5,main]: TransactionId[5440a0f3-05f7-487c-8284-d52a52e82820-1565]
WindowsDesktopSSO params: 
principal: HTTP/[email protected]
keytab file: /opt/osstech/var/lib/tomcat/openam/private/[email protected]
realm : DOMAIN.EXAMPLE.CO.JP
kdc server: dc1.domain.example.co.jp
domain principal: false
Lookup user in realm:false
#!/bin/ksh
##
## AIX ldd(1) clone with shared objects (*.so) in archives (*.a) support
## Copyright (C) 2017 SATOH Fumiyasu @ OSS Technology Corp, Japan
##
##
##
## License: GNU General Public License version 3
##
@fumiyas
fumiyas / openssh-build-static.sh
Created October 4, 2017 09:20
Build OpenSSH with static linked zlib and OpenSSL libraries
#!/bin/sh
set -u
set -e
umask 0077
prefix="/opt/openssh"
top="$(pwd)"
root="$top/root"
build="$top/build"
@fumiyas
fumiyas / README.md
Last active May 8, 2017 09:07
RPM: Macros and SPEC to detect "from/to" package version in scriptlet

RPM %trigger* is broken:

  • %triggerin -- %{name} < %{version}-%{release} is always triggered on upgrade · Issue #209 · rpm-software-management/rpm
    rpm-software-management/rpm#209
Moved. See https://github.com/fumiyas/ansible-hack/blob/master/bin/ansible-setup-local.bash
#!/bin/bash
##
## RHEL binutils ld(1) wrapper to do chrpath(1) hacks
## Copyright (c) 2016 SATOH Fumiyasu @ OSS Technology Corp.
## <http://www.OSSTech.co.jp/>
##
## License: GNU General Public License version 3 or later
##
set -u