Skip to content

Instantly share code, notes, and snippets.

@JeffPaine
JeffPaine / i3-cheat-sheet.md
Last active September 27, 2024 01:17
i3 Window Manager Cheat Sheet

i3 Window Manager Cheat Sheet

$mod refers to the modifier key (alt by default)

General

  • startx i3 start i3 from command line
  • $mod+<Enter> open a terminal
  • $mod+d open dmenu (text based program launcher)
  • $mod+r resize mode ( or to leave resize mode)
  • $mod+shift+e exit i3
@JeffPaine
JeffPaine / irssi-notes.md
Created February 25, 2015 17:53
General notes on the irssi IRC client

irssi Notes

General Commands

  • /disconnect disconnect from a server
  • /connect connect to a server e.g. /connect irc.corp.google.com
  • /join #test join the #test channel
  • /statusbar window remove time remove time from statusbar
  • /statusbar window reset reset statusbar to default
  • /ignore -channels #chan1,#chan2 * JOINS PARTS QUITS NICKS ignore joins, parts, etc on the listed channels
  • /c clear the window
@JeffPaine
JeffPaine / tmux-notes.md
Last active February 21, 2022 09:55
Notes on tmux.

tmux Notes

Settings

  • PREFIX :source-file <filename> Reload the tmux config from
  • unbind Remove a keybinding
  • set -g escape-time 0 tmux adds a delay to sending the escape key in case it is followed by escape sequences. This makes that delay zero. This is nice for using vim under tmux.

Copy / Paste

@JeffPaine
JeffPaine / vim-notes.md
Last active January 3, 2019 23:20
General vim notes.

Vim Notes

  • set list Shows invisible characters.
  • set listchars What invisibile characters should be set to, see :h listchars for complete list.

Key Remapping

  • map creates a key map that works in normal, visual, select and operator pending modes
  • map! creates a key map that works in insert and command-line mode.

Moved

Now located at https://github.com/JeffPaine/beautiful_idiomatic_python.

Why it was moved

Github gists don't support Pull Requests or any notifications, which made it impossible for me to maintain this (surprisingly popular) gist with fixes, respond to comments and so on. In the interest of maintaining the quality of this resource for others, I've moved it to a proper repo. Cheers!

@JeffPaine
JeffPaine / make_github_issue.py
Created July 19, 2012 17:24
Make an issue on github using API V3 and Python
import json
import requests
# Authentication for user filing issue (must have read/write access to
# repository to add issue to)
USERNAME = 'CHANGEME'
PASSWORD = 'CHANGEME'
# The repository to add this issue to
REPO_OWNER = 'CHANGEME'
@JeffPaine
JeffPaine / us_state_abbreviations.py
Last active June 30, 2024 01:33
A python list of all US state abbreviations.
# United States Postal Service (USPS) abbreviations.
abbreviations = [
# https://en.wikipedia.org/wiki/List_of_states_and_territories_of_the_United_States#States.
"AK", "AL", "AR", "AZ", "CA", "CO", "CT", "DE", "FL", "GA", "HI", "IA",
"ID", "IL", "IN", "KS", "KY", "LA", "MA", "MD", "ME", "MI", "MN", "MO",
"MS", "MT", "NC", "ND", "NE", "NH", "NJ", "NM", "NV", "NY", "OH", "OK",
"OR", "PA", "RI", "SC", "SD", "TN", "TX", "UT", "VA", "VT", "WA", "WI",
"WV", "WY",
# https://en.wikipedia.org/wiki/List_of_states_and_territories_of_the_United_States#Federal_district.
"DC",