Skip to content

Instantly share code, notes, and snippets.

View bonniesimon's full-sized avatar
Confused , Frustrated and Caffeinated.☕

Bonnie Simon bonniesimon

Confused , Frustrated and Caffeinated.☕
View GitHub Profile
@8parth
8parth / revert_destroy_all.rb
Last active December 6, 2024 21:58
revert back accidently deleted Model.destroy_all in rails console
Model.destroy_all
# if you haven't performed any other action after accidently deleting all records from Model,
# then _ would grab last response generated by Model.destroy_all
destroyed_records = _
destroyed_records.each do |destroyed_record|
Model.create(destroyed_record.attributes)
end
@vasanthk
vasanthk / System Design.md
Last active June 23, 2025 07:41
System Design Cheatsheet

System Design Cheatsheet

Picking the right architecture = Picking the right battles + Managing trade-offs

Basic Steps

  1. Clarify and agree on the scope of the system
  • User cases (description of sequences of events that, taken together, lead to a system doing something useful)
    • Who is going to use it?
    • How are they going to use it?
@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

@0xadada
0xadada / README.md
Last active August 5, 2022 16:48
VIM movement, keyboard commands and shortcuts