Skip to content

Instantly share code, notes, and snippets.

View Nuclearfossil's full-sized avatar

Ash Matheson Nuclearfossil

View GitHub Profile
@Nuclearfossil
Nuclearfossil / emacs_cheatsheet.md
Last active May 14, 2019 13:41
Emacs Cheat Sheet

A simple cheatsheet for Emacs

Legend

  C- = Ctrl + additional key
  M- = Alt + additional key(s)

Pane commands

   Key        | Description
@Nuclearfossil
Nuclearfossil / tmux_cheatsheet.md
Last active November 29, 2015 14:38
TMUX cheat-sheet

TMUX cheatsheet

Starting and connecting to tmux

To create an initial tmux instance:

 tmux

With a session name:

@Nuclearfossil
Nuclearfossil / early_vs_not
Last active August 29, 2015 14:24
early return
// The question is - which makes more sense in a general case:
// early outs or single entry/exit.
// Note mystringcopy() returns the number of characters actually copied. mystringcopy()
// should also be considered functionally irrelevant - this question is more about
// early outs vs single entry/exit.
const unsigned int fixedlength = 255;
bool destTest01(const char *const valueA,
const char *const valueB)
{
# looks for missing file in //branch and force syncs them.
p4 diff -sd //branch | p4 -x -sync -f
# run from a folder, tells you what the current changelist is.
p4 changes -m1 #have
[
// Fix End of line
{ "keys": ["super+right"], "command": "move_to", "args": {"to": "hardeol", "extend": false} }
// Fix Beginning of line
,{ "keys": ["super+left"], "command": "move_to", "args": {"to": "hardbol", "extend": false} }
// Fix end of line + select
,{ "keys": ["super+shift+right"], "command": "move_to", "args": {"to": "hardeol", "extend": true} }
// Fix beginning of line + select
,{ "keys": ["super+shift+left"], "command": "move_to", "args": {"to": "hardbol", "extend": true} }
// Home goes to beginning of line