Skip to content

Instantly share code, notes, and snippets.

@melonamin
melonamin / calude.md
Created June 12, 2025 19:38
Claude Code usage tips and tricks
  • Write ultra-precise prompts — state edge cases, implicit assumptions, and concrete examples; Claude can’t guess them.
  • Ask Claude to “ultrathink” when deeper multi-step reasoning is needed.
  • Use planning mode (Shift+Tab twice) or another model for high-level design before coding.
  • Delegate with the Task tool — spawn specialist sub-agents (design, research, etc.) to tackle parts in parallel.
  • Make Claude RTFM first — link docs or start a research Task so it learns the latest best practices before scaffolding.
  • Start new threads often — run /clear to reset context and cut drift when you switch topics.
  • Restart with --resume to branch without losing work.
  • Use claude --dangerously-skip-permissions" to avoid constant prompts, but 1) it's probably better run in a container 2) mind the limits, it will eat them fast
  • Dictate long prompts with voice-to-text; Claude copes well with messy transcripts.
  • Stage early, stage often — git add after each good turn to simplify rollbacks.
@squarism
squarism / iterm2.md
Last active December 5, 2025 14:15
An iTerm2 Cheatsheet

In the below keyboard shortcuts, I use the capital letters for reading clarity but this does not imply shift, if shift is needed, I will say shift. So + D does not mean hold shift. + Shift + D does of course.

Tabs and Windows

Function Shortcut
New Tab + T
Close Tab or Window + W (same as many mac apps)
Go to Tab + Number Key (ie: ⌘2 is 2nd tab)
Go to Split Pane by Direction + Option + Arrow Key
#include <vector>
#include <algorithm>
#include <iterator>
#include <iostream>
#include <sys/time.h>
void event(std::vector<char> &v, std::vector<unsigned long long> &sp, std::vector<unsigned long long> &ep)
{
char pre_val(0), cur_val(0);
unsigned long long pos(0);
#include <vector>
#include <algorithm>
#include <iostream>
#include <sys/time.h>
#include <cstdlib>
using namespace std;
int main()
{
@shivallan
shivallan / MinMax
Last active August 29, 2015 14:19
#include <vector>
#include <cstdlib>
#include <algorithm>
#include <iostream>
#include <sys/time.h>
using namespace std;
std::pair<int, int> minimax (std::vector<long long> &v)
{
@shivallan
shivallan / NoZeros
Last active August 29, 2015 14:19
#include <vector>
#include <cstdlib>
#include <algorithm>
#include <iostream>
#include <sys/time.h> // for gettimeofday()
//#include <cstdint> C++11 Standart only
using namespace std;
void nozero (std::vector<long long> &v)
{