Skip to content

Instantly share code, notes, and snippets.

# $OpenBSD: sshd_config,v 1.104 2021/07/02 05:11:21 dtucker Exp $
# This is the sshd server system-wide configuration file. See
# sshd_config(5) for more information.
# This sshd was compiled with PATH=/usr/bin:/bin:/usr/sbin:/sbin
# The strategy used for options in the default sshd_config shipped with
# OpenSSH is to specify options with their default value where
# possible, but leave them commented. Uncommented options override the
@4ch12dy
4ch12dy / NSTemporaryDirectory_return_nil.md
Created May 6, 2023 02:55
NSTemporaryDirectory return nil?

在测试一个插件的时候,发现在iOS14上启动就会触发崩溃。跟了一下,发现如下报错

*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '*** -[NSURL initFileURLWithPath:isDirectory:]: nil string parameter'

崩溃的堆栈:

frame #9: 0x0000000197c5ec7c libobjc.A.dylib`objc_exception_throw + 352
frame #10: 0x000000018545cfd0 Foundation`-[NSURL(NSURL) initFileURLWithPath:isDirectory:] + 604
frame #11: 0x000000018545cd68 Foundation`+[NSURL(NSURL) fileURLWithPath:isDirectory:] + 44
frame #12: 0x000000018547c5e0 Foundation`-[NSFileManager _URLForReplacingItemAtURL:error:] + 144
@4ch12dy
4ch12dy / calling_printf_osx.c
Created April 20, 2018 16:13 — forked from P1kachu/calling_printf_osx.c
Calling printf in OSX - The overkill way
#include <string.h>
#include <stdlib.h>
#include <unistd.h>
#include <mach-o/dyld.h>
#include <mach-o/nlist.h>
#include <mach-o/dyld_images.h>
#include <mach/mach_vm.h>
/* Dyld is the OSX Dynamic Linker
* /usr/include//mach-o/loader.h