Skip to content

Instantly share code, notes, and snippets.

View hanksudo's full-sized avatar
:octocat:
Follow your passion.

Hank Wang hanksudo

:octocat:
Follow your passion.
View GitHub Profile
@ryu1
ryu1 / HowToDisableESET.MD
Last active May 13, 2022 06:36
ESET セキュリティソフトの有効/無効

ESET セキュリティソフトの有効/無効

ときおり、邪魔になるセキュリティソフトを一時的に無効にしたいときに使用する.

Disable

$ sudo killall esets_gui
$ sudo launchctl unload /Library/LaunchDaemons/com.eset.esets_daemon.plist
$ sudo launchctl unload /Library/LaunchDaemons/com.eset.esets_pidmapper.plist
$ sudo launchctl unload /Library/LaunchDaemons/com.eset.remoteadministrator.agent_daemon.plist
@shu-yusa
shu-yusa / create_jwt.sh
Last active March 21, 2024 14:57
Generate private and public keys, and create JWT and JWKs
#!/bin/sh
## Requires openssl, nodejs, jq
header='
{
"kid": "12345",
"alg": "RS256"
}'
payload='
{
"iss": "https://example.com",
@tclementdev
tclementdev / libdispatch-efficiency-tips.md
Last active April 26, 2024 10:15
Making efficient use of the libdispatch (GCD)

libdispatch efficiency tips

The libdispatch is one of the most misused API due to the way it was presented to us when it was introduced and for many years after that, and due to the confusing documentation and API. This page is a compilation of important things to know if you're going to use this library. Many references are available at the end of this document pointing to comments from Apple's very own libdispatch maintainer (Pierre Habouzit).

My take-aways are:

  • You should create very few, long-lived, well-defined queues. These queues should be seen as execution contexts in your program (gui, background work, ...) that benefit from executing in parallel. An important thing to note is that if these queues are all active at once, you will get as many threads running. In most apps, you probably do not need to create more than 3 or 4 queues.

  • Go serial first, and as you find performance bottle necks, measure why, and if concurrency helps, apply with care, always validating under system pressure. Reuse

@oliveratgithub
oliveratgithub / emojis.json
Last active April 26, 2024 22:35
Emoji-list with emojis, names, shortcodes, unicode and html entities [massive list]
{
"emojis": [
{"emoji": "👩‍👩‍👧‍👧", "name": "family: woman, woman, girl, girl", "shortname": ":woman_woman_girl_girl:", "unicode": "1F469 200D 1F469 200D 1F467 200D 1F467", "html": "👩‍👩‍👧‍👧", "category": "People & Body (family)", "order": ""},
{"emoji": "👩‍👩‍👧‍👦", "name": "family: woman, woman, girl, boy", "shortname": ":woman_woman_girl_boy:", "unicode": "1F469 200D 1F469 200D 1F467 200D 1F466", "html": "👩‍👩‍👧‍👦", "category": "People & Body (family)", "order": ""},
{"emoji": "👩‍👩‍👦‍👦", "name": "family: woman, woman, boy, boy", "shortname": ":woman_woman_boy_boy:", "unicode": "1F469 200D 1F469 200D 1F466 200D 1F466", "html": "👩‍👩‍👦‍👦", "category": "People & Body (family)", "order": ""},
{"emoji": "👨‍👩‍👧‍👧", "name": "family: man, woman, girl, girl", "shortname": ":man_woman_girl_girl:", "unicode": "1F468 200D 1F469 200D 1F467 200D 1F467", "html": "👨‍👩&z
@ruanbekker
ruanbekker / cheatsheet-elasticsearch.md
Last active April 24, 2024 00:11
Elasticsearch Cheatsheet : Example API usage of using Elasticsearch with curl
@joshbuchea
joshbuchea / semantic-commit-messages.md
Last active April 26, 2024 15:48
Semantic Commit Messages

Semantic Commit Messages

See how a minor change to your commit message style can make you a better programmer.

Format: <type>(<scope>): <subject>

<scope> is optional

Example

Git Cheat Sheet

Commands

Getting Started

git init

or

@celeryclub
celeryclub / Setting up headless Raspberry Pi OS on macOS.md
Last active April 12, 2024 06:31
Setting up headless Raspberry Pi OS on macOS

Download the latest Raspberry Pi OS Lite image from https://www.raspberrypi.com/software/operating-systems/ (2022-04-04 at the time of this writing).

Insert your microSD card. Use Raspberry Pi Imager to burn the image to your microSD card. Make to select "Set username and password" in the config before starting. Name the user pi and select your own password.

Ensure the disk is mounted again, then enable SSH.

$ touch /Volumes/boot/ssh