Skip to content

Instantly share code, notes, and snippets.

@joyrexus
joyrexus / README.md
Last active February 24, 2024 15:16
collapsible markdown

collapsible markdown?

CLICK ME

yes, even hidden code blocks!

print("hello world!")
You can specify the underlying name for a C function the linker/compiler should actually use. If you use an existing
function's name, it will just let you refer to it with your prototype's name. If you define the function, it'll give
it that name. It even complains if a function of that name already exists. Tested with clang on a Mac, but AFAIK also
works in GCC. You can even use special characters in your function names, like you can do in assembly.
anonymous
anonymous / syncs.d
Created February 9, 2015 00:02
#!/usr/sbin/dtrace -q -s
/*
Overly spammy, mostly covered by the other probes (every "read" or "write" is a "request")
CFPreferencesServer$target:::request {
printf("REQUEST from pid %d at %Y ( domain: %s, user: %s, host: %s, container: %s, managed: %d)\n", arg0, walltimestamp, copyinstr(arg1) != NULL ? copyinstr(arg1) : "(NULL)" ?: "(NULL)", copyinstr(arg2) != NULL ? copyinstr(arg2) : "(NULL)", copyinstr(arg3) != NULL ? copyinstr(arg3) : "(NULL)", copyinstr(arg4) != NULL ? copyinstr(arg4) : "(NULL)", arg5);
}
*/
CFPreferencesServer$target:::write_rejected {
printf("REJECTED WRITE OF KEY %s request from pid %d for reason %s at %Y ( domain: %s, user: %s, host: %s, container: %s)\n", copyinstr(arg1) != NULL ? copyinstr(arg1) : "(NULL)", arg0, copyinstr(arg6) != NULL ? copyinstr(arg6) : "(NULL)", walltimestamp, copyinstr(arg2) != NULL ? copyinstr(arg2) : "(NULL)", copyinstr(arg3) != NULL ? copyinstr(arg3) : "(NULL)", copyinstr(arg4) != NULL ? copyinstr(arg4) : "(NULL)", copyinstr(arg5) != NULL ? copyinstr(arg5)
@magicznyleszek
magicznyleszek / jekyll-and-liquid.md
Last active January 12, 2024 03:46
Jekyll & Liquid Cheatsheet

Jekyll & Liquid Cheatsheet

A list of the most common functionalities in Jekyll (Liquid). You can use Jekyll with GitHub Pages, just make sure you are using the proper version.

Running

Running a local server for testing purposes:

@thepaul
thepaul / gist:1171296
Created August 25, 2011 17:54
"git find" command
[alias]
; "git find" should work exactly like your system find (BSD or GNU), except for
; two things: one, it will always ignore the current git directory; and two, if
; you don't supply any root paths to search, it defaults to searching from your
; git project toplevel.
;
; paul cannon <p@thepaul.org> 2011
find = "!_() { \
declare -a preargs; \
@thepaul
thepaul / .gitconfig
Created January 20, 2011 18:23
i <3 my git xlog
[alias]
xlog = log --graph --pretty=format:\"%C(yellow)%h%Creset %ad %s%C(cyan)%d%Creset %C(green)[%an]%Creset\" --date=short
@nevyn
nevyn / README.md
Created January 4, 2011 08:37
SPMediaKeyTap is a global event tap for the play/pause, prev and next keys on the keyboard. http://overooped.com/post/2593597587/mediakeys