Skip to content

Instantly share code, notes, and snippets.

@pojntfx
pojntfx / main.sh
Last active May 16, 2025 03:04
Bluesky/AT Protocol: cURL API Interaction Cheatsheet
#!/bin/bash
# This script resolves a DID, retrieves an API key, fetches a user's feed,
# and posts a "Hello, world" message to the user's feed.
# Resolve DID for handle
HANDLE='felicitas.pojtinger.com'
DID_URL="https://bsky.social/xrpc/com.atproto.identity.resolveHandle"
export DID=$(curl -G \
--data-urlencode "handle=$HANDLE" \
@peterkracik
peterkracik / firebase-download-file.ts
Created June 26, 2020 05:16
Getting a file from bucket as a stream
import * as admin from 'firebase-admin';
admin.initializeApp({
credential: admin.credential.applicationDefault()
});
exports.downloadFile = httpRequest.onRequest((req, res) => {
const bucket = admin.storage().bucket('my_bucket'); // initialize storage as admin
const stream = bucket.file('path/to/file.jpg').createReadStream(); // create stream of the file in bucket
// pipe stream on 'end' event to the response
return stream
@indiesquidge
indiesquidge / advanced-react-notes.md
Last active January 19, 2024 15:57
Personal notes while working through Advanced React: https://courses.reacttraining.com/p/advanced-react

Advanced React by React Training

Personal notes while working through Advanced React: https://courses.reacttraining.com/p/advanced-react

Granted this is a contrived example, but it's still something I took notice to: in those "Advanced React" videos I've been watching, Ryan Florence codes very slowly, and does not make one quick change and jump back to the browser to see what changed.

He stops and thinks. He asks himself (or the viewer) questions. He wonders what

@Jonalogy
Jonalogy / handling_multiple_github_accounts.md
Last active June 14, 2025 07:07
Handling Multiple Github Accounts on MacOS

Handling Multiple Github Accounts on MacOS

The only way I've succeeded so far is to employ SSH.

Assuming you are new to this like me, first I'd like to share with you that your Mac has a SSH config file in a .ssh directory. The config file is where you draw relations of your SSH keys to each GitHub (or Bitbucket) account, and all your SSH keys generated are saved into .ssh directory by default. You can navigate to it by running cd ~/.ssh within your terminal, open the config file with any editor, and it should look something like this:

Host *
 AddKeysToAgent yes

> UseKeyChain yes

Tape vs Mocha

What is Mocha? Mocha is a feature-rich JavaScript test framework running on Node.js and in the browser.

What is Tape? Tape is a tap-producing test harness for node and browsers

Comparision

Features

Feature Tape Mocha
@standarderror
standarderror / index.html
Last active September 22, 2020 03:22
20141222 Dewey Decimal treemap
<!DOCTYPE html>
<meta charset="utf-8">
<title>DDC zoomable treemap</title>
<style>
#chart1 {
width: 960px;
height: 500px;
background: #ddd;
/* centre SVG horizontally */
@rxaviers
rxaviers / gist:7360908
Last active June 20, 2025 09:23
Complete list of github markdown emoji markup

People

:bowtie: :bowtie: πŸ˜„ :smile: πŸ˜† :laughing:
😊 :blush: πŸ˜ƒ :smiley: ☺️ :relaxed:
😏 :smirk: 😍 :heart_eyes: 😘 :kissing_heart:
😚 :kissing_closed_eyes: 😳 :flushed: 😌 :relieved:
πŸ˜† :satisfied: 😁 :grin: πŸ˜‰ :wink:
😜 :stuck_out_tongue_winking_eye: 😝 :stuck_out_tongue_closed_eyes: πŸ˜€ :grinning:
πŸ˜— :kissing: πŸ˜™ :kissing_smiling_eyes: πŸ˜› :stuck_out_tongue: