Skip to content

Instantly share code, notes, and snippets.

View rockyzhang24's full-sized avatar
🎯
Focusing

Rocky Zhang rockyzhang24

🎯
Focusing
View GitHub Profile
@rockyzhang24
rockyzhang24 / README.md
Created April 12, 2023 22:23 — forked from tombigel/README.md
How to Change Open Files Limit on OS X and macOS Sierra (10.8 - 10.12)

How to Change Open Files Limit on OS X and macOS

This text is the section about OS X Yosemite (which also works for macOS Sierra) from https://docs.basho.com/riak/kv/2.1.4/using/performance/open-files-limit/#mac-os-x

The last time i visited this link it was dead (403), so I cloned it here from the latest snapshot in Archive.org's Wayback Machine https://web.archive.org/web/20170523131633/https://docs.basho.com/riak/kv/2.1.4/using/performance/open-files-limit/

Mac OS X

To check the current limits on your Mac OS X system, run:

@rockyzhang24
rockyzhang24 / colors.py
Created January 21, 2023 16:03 — forked from lilydjwg/colors.py
colors.py: show all kinds of terminal colors at a glance
#!/usr/bin/python3
from functools import partial
def colors16():
for bold in [0, 1]:
for i in range(30, 38):
for j in range(40, 48):
print(f'\x1b[{bold};{i};{j}m {bold};{i};{j} |\x1b[0m', end='')
print()
@rockyzhang24
rockyzhang24 / surfingkeys-conf.txt
Last active February 28, 2023 06:48
Surfingkeys settings
// Remove the map <C-f> (move the cursor to the beginning of the line) in Insert mode
api.iunmap('<Ctrl-f>');
// Go one tab left or right
api.map('[t', 'E');
api.map(']t', 'R');
// Remove a search engine alias
api.removeSearchAlias('b'); // Baidu
api.removeSearchAlias('e'); // Wikipedia
@rockyzhang24
rockyzhang24 / Open in Vim.workflow
Last active January 21, 2023 15:52
A macOS service: in Finder, open the selected files with vim in iTerm
on run {input, parameters}
if (count of input) > 0 then
tell application "iTerm"
activate
# Get the path of the target files.
set filesPathsToEdit to ""
set numItems to the count of items of input
repeat with x from 1 to numItems
set posixPath to quoted form of POSIX path of item x of input