Skip to content

Instantly share code, notes, and snippets.

Avatar

Bert Belder piscisaureus

  • Amsterdam
View GitHub Profile
View gist:1636324
Kernel Flags:
PROC_THREAD : Process and Thread create/delete
LOADER : Kernel and user mode Image Load/Unload events
PROFILE : CPU Sample profile
CSWITCH : Context Switch
COMPACT_CSWITCH: Compact Context Switch
DISPATCHER : CPU Scheduler
DPC : DPC Events
INTERRUPT : Interrupt events
SYSCALL : System calls
View pub.key
-----BEGIN PGP PUBLIC KEY BLOCK-----
Version: GnuPG v1.4.7 (MingW32)
mQENBE/pEkoBCACtr5WCAklniyuawn8jLoU7iE5RJ3KjgRpp9Jp7oYczCXgjK3ta
SQwACbjYHN6mO/mW7povj6bpYjwQbRriIGOOQbM5stsi1iSOgl7M7LRQWEkOCFuI
pjnL/LEgrcO2fVskINf86MyXgBTfTW3szDp+WDDGHoXFis17B17wRkTNJMm6sJ+L
INLTsjLo++6aHjHmCYmY5jmP2kMfI3kiYkGMG6r3RaOEqq9TJc1cGFqNEdg46Gio
4NUkeiOE1lPoe1h0x0PIXn2AJmJt0bfuqVFAD4/5i9cfg990Ly3MnnydKV3ALuLQ
n2rwyY4DtnkDY7LONt1qDW/NzjAZz3DW7lTxABEBAAG0IkJlcnQgQmVsZGVyIDxi
ZXJ0YmVsZGVyQGdtYWlsLmNvbT6JATUEEwECAB8FAk/pEkoCGwMGCwkIBwMCBBUC
@piscisaureus
piscisaureus / pr.md
Created Aug 13, 2012
Checkout github pull requests locally
View pr.md

Locate the section for your github remote in the .git/config file. It looks like this:

[remote "origin"]
	fetch = +refs/heads/*:refs/remotes/origin/*
	url = git@github.com:joyent/node.git

Now add the line fetch = +refs/pull/*/head:refs/remotes/origin/pr/* to this section. Obviously, change the github url to match your project's URL. It ends up looking like this:

@bnoordhuis
bnoordhuis / pthread_chdir.c
Created Dec 6, 2012
OS X undocumented __pthread_chdir() and __pthread_fchdir() syscalls
View pthread_chdir.c
#include <stdio.h>
#include <stdlib.h>
#include <sys/syscall.h>
#include <unistd.h>
#include <fcntl.h>
#ifndef SYS___pthread_chdir
# define SYS___pthread_chdir 348
#endif
View machine-add-ca.sh
#!/bin/bash
while [[ $# -gt 1 ]]
do
case "$1" in
-f | --file)
file="$2"
shift 2
;;
-h | --hostname)
@danieleggert
danieleggert / GPG and git on macOS.md
Last active Oct 24, 2020
How to set up git to use the GPG Suite
View GPG and git on macOS.md

GPG and git on macOS

Setup

No need for homebrew or anything like that. Works with https://www.git-tower.com and the command line.

  1. Install https://gpgtools.org -- I'd suggest to do a customized install and deselect GPGMail.
  2. Create or import a key -- see below for https://keybase.io
  3. Run gpg --list-secret-keys and look for sec, use the key ID for the next step
  4. Configure git to use GPG -- replace the key with the one from gpg --list-secret-keys
View v8_callbacks_special_cases.txt
// Capture - remove by function pointer and data
void AddGCPrologueCallback(GCCallbackWithData callback, void* data = nullptr, GCType gc_type_filter = kGCTypeAll);
void RemoveGCPrologueCallback(GCCallbackWithData, void* data = nullptr);
void AddGCEpilogueCallback(GCCallbackWithData callback, void* data = nullptr, GCType gc_type_filter = kGCTypeAll);
void RemoveGCEpilogueCallback(GCCallbackWithData callback, void* data = nullptr);
void AddMicrotasksCompletedCallback(MicrotasksCompletedCallbackWithData callback, void* data = nullptr);
void RemoveMicrotasksCompletedCallback(MicrotasksCompletedCallbackWithData callback, void* data = nullptr) = 0;
You can’t perform that action at this time.