Skip to content

Instantly share code, notes, and snippets.

%sh
# Install Node.js + npm (example for Ubuntu-based environment)
sudo apt-get update && sudo apt-get install -y nodejs npm
# Or use nvm:
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.4/install.sh | bash
source ~/.nvm/nvm.sh
nvm install 18
nvm use 18
npm install -g @anthropic-ai/claude-code
@qyangq
qyangq / gist:ed0cde4b5cf125ef9392e251bb64e184
Created April 20, 2022 22:55
2PC for a coordinator between bank transactions
class Coordinator
{
UID id
Bank fromBank
Bank toBank
bool fromBankPrepared
bool toBankPrepared
bool committed
bool jobDone
SaxParser.h
class SaxParser
{
friend class apsdk::StreamSaxParser;
protected:
virtual bool endElement();
}
{
"$schema": "https://aka.ms/terminal-profiles-schema",
"copyFormatting": "none",
"copyOnSelect": false,
"defaultProfile": "{61c54bbd-c2c6-5271-96e7-009a87ff44bf}",
// Add custom keybindings to this array.
// To unbind a key combination from your defaults.json, set the command to "unbound".
// To learn more about keybindings, visit https://aka.ms/terminal-keybindings
"keybindings":
[
@qyangq
qyangq / gist:9a434fb46b9b12145cb935923edf2b24
Created June 16, 2021 21:35
Concurrent rollout envconfig generator
using System;
using System.Collections.Generic;
using System.Drawing;
using System.IO;
using System.Windows.Forms;
namespace ConcurVisual
{
static class Program
{