Skip to content

Instantly share code, notes, and snippets.

View richyk1's full-sized avatar
💭
Studying

koolkid richyk1

💭
Studying
View GitHub Profile
@ChrisWellsWood
ChrisWellsWood / empty_rust_structs.md
Last active February 9, 2025 11:11
Initialising empty structs in Rust.

Initialising Empty Structs in Rust

In C/C++, you can initialise a struct without giving values for any of the fields:

struct Point {
  float x;
  float y;
  float z;
};
@kitduncan
kitduncan / mac-os-x-spotlight-fix.md
Created October 20, 2015 14:57
Fix broken Spotlight in Mac OS X

Turn off spotlight:

sudo mdutil -a -i off

Unload it:

sudo launchctl unload -w /System/Library/LaunchDaemons/com.apple.metadata.mds.plist

Load It:

sudo launchctl load -w /System/Library/LaunchDaemons/com.apple.metadata.mds.plist

Turn on spotlight again:

@zhujunsan
zhujunsan / Using Github Deploy Key.md
Last active July 26, 2025 13:40
Using Github Deploy Key

What / Why

Deploy key is a SSH key set in your repo to grant client read-only (as well as r/w, if you want) access to your repo.

As the name says, its primary function is to be used in the deploy process in replace of username/password, where only read access is needed. Therefore keep the repo safe from the attack, in case the server side is fallen.

How to

  1. Generate a ssh key
@Starefossen
Starefossen / tmux-cheats.md
Last active September 24, 2025 18:35
My personal tmux cheat sheet for working with sessions, windows, and panes. `NB` I have remapped the command prefix to `ctrl` + `a`.

Sessions

New Session

  • tmux new [-s name] [cmd] (:new) - new session

Switch Session

  • tmux ls (:ls) - list sessions
  • tmux switch [-t name] (:switch) - switches to an existing session