Skip to content

Instantly share code, notes, and snippets.

View carvalhochris's full-sized avatar

Christopher Carvalho carvalhochris

View GitHub Profile
@andreyvit
andreyvit / tmux.md
Created June 13, 2012 03:41
tmux cheatsheet

tmux cheat sheet

(C-x means ctrl+x, M-x means alt+x)

Prefix key

The default prefix is C-b. If you (or your muscle memory) prefer C-a, you need to add this to ~/.tmux.conf:

remap prefix to Control + a

@roachhd
roachhd / PART-ONE.md
Last active August 26, 2025 17:23
Trello API - the full docs.

Getting Started — Trello documentation

Introduction

Trello provides a simple [RESTful][1] web API where each type of resource (e.g. a card, a board, or a member) has a URI that you can interact with.

For example, if you'd like to use the API to get information about the [Trello Development board][2], you'd use the following URI:

https://api.trello.com/1/boards/4d5ea62fd76aa1136000000c
@lopspower
lopspower / README.md
Last active September 27, 2026 09:43
Hexadecimal color code for transparency

Hexadecimal color code for transparency

Twitter

How to set transparency with hex value ?

For example, you want to set 40% alpha transparence to #000000 (black color), you need to add 66 like this #66000000.

All hex value from 100% to 0% alpha:

@keithrozario
keithrozario / memory.py
Last active August 28, 2023 10:43
Read file from s3.download_fileobj into memory
s3 = boto3.client('s3')
## Reading a JSON file in memory
with tempfile.TemporaryFile() as data:
s3.download_fileobj(bucket_name, 'tests/s3/key.json', data)
data.seek(0)
status = json.loads(data.read().decode('utf-8'))['status']
## Reading a CSV file in memory
with tempfile.TemporaryFile() as package_file:
@guvener
guvener / tw-background-hex.md
Created April 30, 2022 08:46
Tailwind background colors HEX codes
@deanmlittle
deanmlittle / anchor-setup.ts
Created November 30, 2023 15:33
Anchor setup with airdrop and log/confirm functions
const program = anchor.workspace.AnchorVault as Program<AnchorVault>;
const connection = anchor.getProvider().connection;
const signer = Keypair.generate();
const vault = PublicKey.findProgramAddressSync([Buffer.from("vault"), signer.publicKey.toBuffer()], program.programId)[0];
const confirm = async (signature: string): Promise<string> => {
const block = await connection.getLatestBlockhash();