Skip to content

Instantly share code, notes, and snippets.

@gryf
gryf / tmux.md
Last active June 17, 2020 15:06 — forked from russelldb/tmux.md
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

@gryf
gryf / nbp-rates.py
Last active March 20, 2020 11:22 — forked from dulek/nbp-rates.py
Gets you average NBP rate for given date and currency.
#!/usr/bin/env python
"""
Get exchange rate from NBP service for USD (default) and provided day (or now)
"""
import argparse
from datetime import datetime
import requests
@gryf
gryf / is-thursday.py
Last active October 12, 2016 08:22 — forked from dulek/is-thursday.py
#!/usr/bin/env python
import argparse
from datetime import datetime
from pytz import common_timezones, timezone
parser = argparse.ArgumentParser(description="Tells you if it's Thursday "
"anywhere in the world.")
parser.add_argument('--all', action='store_true', default=False,
help='Print all timezones with Thursday.')
@gryf
gryf / bash_prompt.sh
Last active April 20, 2018 07:59 — forked from bradsokol/bash_prompt.sh
Set color bash prompt according to active virtualenv, Git, Mercurial or Subversion branch and return status of last command.
#!/bin/bash
#
# DESCRIPTION:
#
# Set the bash prompt according to:
# * the active virtualenv
# * the active nodejs virtualenv[1]
# * the branch/status of the current Git, Mercurial or Subversion repository
# * the return value of the previous command
# * one line prompt