Lists the plugins (I use vim-lsp): https://github.com/MaskRay/ccls/wiki/Editor-Configuration
Example shortcuts and a list of commands: https://github.com/prabirshrestha/vim-lsp
Install plug first: https://github.com/junegunn/vim-plug
| # put in ~/.config/karabiner/karabiner.json under complex_modifications.rules and restart karabiner-elements | |
| { | |
| "description": "Change left_command to return_or_enter if pressed alone (keep as modifier with other keys)", | |
| "manipulators": [ | |
| { | |
| "type": "basic", | |
| "from": { | |
| "key_code": "left_command", | |
| "modifiers": { |
Lists the plugins (I use vim-lsp): https://github.com/MaskRay/ccls/wiki/Editor-Configuration
Example shortcuts and a list of commands: https://github.com/prabirshrestha/vim-lsp
Install plug first: https://github.com/junegunn/vim-plug
| # Change the prefix to C-t. | |
| unbind C-b | |
| set -g prefix C-t | |
| # Default shell. | |
| set-option -g default-shell /bin/zsh | |
| # set -g default-shell $SHELL | |
| # Make clipboard copy/paste work. | |
| # set -g default-command "reattach-to-user-namespace -l ${SHELL}" |
| diff --git a/readkmem/main.c b/readkmem/main.c | |
| index bd0f398..f8aa47b 100644 | |
| --- a/readkmem/main.c | |
| +++ b/readkmem/main.c | |
| @@ -324,7 +324,7 @@ readkmem(void *buffer, mach_vm_address_t target_addr, size_t size) | |
| kern_return_t kr = mach_vm_read_overwrite(g_kmem_source.kernel_port, target_addr, size, (mach_vm_address_t)buffer, &outsize); | |
| if (kr != KERN_SUCCESS) | |
| { | |
| - ERROR_MSG("mach_vm_read_overwrite failed!"); | |
| + ERROR_MSG("mach_vm_read_overwrite failed! kr: %d", kr); |
| from idaapi import * | |
| from idc import * | |
| TRACE_FILE = AskFile(0, "*.txt", "Select trace file") | |
| if not TRACE_FILE: | |
| Warning("Failed to select trace file") | |
| else: | |
| HIGHLIGHT = AskLong(0, "Choose action: 0 = clear, 1 = highlight") |
Start debugserver:
tty0 # debugserver localhost:8000 main
Start tracing:
tty1 $ lldb
tty1 (lldb) command script import trace.py
Start debugserver.
tty0$ sudo debugserver localhost:8000 main
Run the script in lldb. Note that the second pc line is incorrect (pc: 0xffffffffffffffff).
tty1$ lldb --version
lldb version 10.0.0 (https://github.com/llvm/llvm-project.git revision a7e9059967c4bff83ae6c3b595828bbbc8aaf82e)
clang revision a7e9059967c4bff83ae6c3b595828bbbc8aaf82e
| #!/usr/bin/env python | |
| # min-heap | |
| # Construct a heap from an array respecting the shape property. | |
| def build_heap(A): | |
| n = len(A) | |
| # Implicit cast to int. | |
| for i in reversed(range(n / 2)): | |
| heapify(A, n, i) |
| {-# LANGUAGE BangPatterns, CPP, MagicHash, UnboxedTuples #-} | |
| module Main where | |
| import Control.Monad (forM_) | |
| import GHC.Enum | |
| import GHC.Types | |
| import GHC.Prim | |
| import GHC.Word |
| customOptions :: Options | |
| customOptions = defaultOptions | |
| { fieldLabelModifier = tail | |
| , constructorTagModifier = map toLower | |
| , unwrapUnaryRecords = True | |
| } | |
| data Auth = Auth | |
| { _username :: String | |
| , _password :: String |