Skip to content

Instantly share code, notes, and snippets.

View rafaeleyng's full-sized avatar

Rafael rafaeleyng

View GitHub Profile
@rafaelsteil
rafaelsteil / asana_comment_formatting.js
Last active August 1, 2024 11:53
Asana quote reply and code formatting - TamperMonkey script
// ==UserScript==
// @name Asana quote reply style
// @namespace http://tampermonkey.net/
// @version 2024-07-17
// @description Turn comments that start with `>` into "quote reply" style like Github
// @author Rafael Steil
// @match https://app.asana.com/*
// @icon https://www.google.com/s2/favicons?sz=64&domain=asana.com
// @grant none
// ==/UserScript==
@lboulard
lboulard / xkb.md
Last active December 6, 2024 18:34
XKB settings for US keyboard
@posener
posener / go-table-driven-tests-parallel.md
Last active April 10, 2025 16:19
Be Careful with Table Driven Tests and t.Parallel()

Be Careful with Table Driven Tests and t.Parallel()

We Gophers, love table-driven-tests, it makes our unittesting structured, and makes it easy to add different test cases with ease.

Let’s create our table driven test, for convenience, I chose to use t.Log as the test function. Notice that we don't have any assertion in this test, it is not needed to for the demonstration.

func TestTLog(t *testing.T) {
	t.Parallel()
@480
480 / gist:3b41f449686a089f34edb45d00672f28
Last active January 23, 2025 16:11
MacOS X + oh my zsh + powerline fonts + visual studio code terminal settings

MacOS X + oh my zsh + powerline fonts + visual studio code (vscode) terminal settings

Thank you everybody, Your comments makes it better

Install oh my zsh

http://ohmyz.sh/

sh -c "$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
@chrisveness
chrisveness / crypto-aes-gcm.js
Last active March 14, 2025 21:33
Uses the SubtleCrypto interface of the Web Cryptography API to encrypt and decrypt text using AES-GCM (AES Galois counter mode).
/**
* Encrypts plaintext using AES-GCM with supplied password, for decryption with aesGcmDecrypt().
* (c) Chris Veness MIT Licence
*
* @param {String} plaintext - Plaintext to be encrypted.
* @param {String} password - Password to use to encrypt plaintext.
* @returns {String} Encrypted ciphertext.
*
* @example
* const ciphertext = await aesGcmEncrypt('my secret text', 'pw');
@steve-jansen
steve-jansen / README.md
Last active December 13, 2024 23:29
Stop and start Symantec Endpoint Protection on OS X

This script enables you stop and start Symantec Endpoint Protection on OS X

Installation

sudo curl https://gist.githubusercontent.com/steve-jansen/61a189b6ab961a517f68/raw/sep -o /usr/local/bin/sep
sudo chmod 755 /usr/local/bin/sep
sudo chown root:staff /usr/local/bin/sep