This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void TestCopy() | |
{ | |
BOOL cond = FALSE; | |
IFileOperation *FileOperation1 = NULL; | |
IShellItem *isrc = NULL, *idst = NULL; | |
BIND_OPTS3 bop; | |
SHELLEXECUTEINFOW shexec; | |
HRESULT r; | |
do { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void **find_sys_call_table(void *kernel_addr, int kernel_size) | |
{ | |
/* | |
Check for the system_call_fastpath() signature, hand-written piece of | |
assembly code from arch/x86/kernel/entry_64.S: | |
ja badsys | |
mov rcx, r10 | |
call sys_call_table[rax * 8] | |
mov [rsp + 20h], rax |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/osascript | |
on convertListToString(theList, theDelimiter) | |
set output to (item 1 of theList) | |
if (count theList) > 1 then | |
set theList to items 2 through (count theList) of theList | |
repeat with listItem in theList | |
set parsedItem to listItem | |
if space is in listItem then | |
set parsedItem to (quoted form of listItem) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
DEVELOPER_DIR=$(XCODE_VER=9; TMP_RET=$(ls "/Applications" | grep -E "Xcode-?${XCODE_VER}.*\.app" | head -n 1 | xargs -I {} echo "/Applications/{}/Contents/Developer"); [[ ${TMP_RET} ]] || TMP_RET=$(/usr/bin/xcrun xcode-select -p); echo $TMP_RET) eval echo '$DEVELOPER_DIR' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
extension Collection { | |
/// Returns the element at the specified index iff it is within bounds, otherwise nil. | |
subscript (safe index: Index) -> Element? { | |
return indices.contains(index) ? self[index] : nil | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
NSLog(@"RC: %ld", CFGetRetainCount((__bridge CFTypeRef)m_object)); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
local -r SAVED_OPTIONS=$(set +o) | |
source "script_that_modifies_shell_options.sh" | |
set +x; eval "${SAVED_OPTIONS}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
send_mixpanel_event() { | |
local token="<TOKEN>" | |
local distinct_id="<DISTINCT-ID>" | |
local time_now=$(date +%s) | |
local event | |
read -d '' event <<-EOF | |
{ | |
"event": "Install", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"title": "Home row cursor", | |
"rules": [ | |
{ | |
"description": "Change fn + H/J/K/L to Arrow Keys", | |
"manipulators": [ | |
{ | |
"type": "basic", | |
"from": { | |
"key_code": "h", |