Skip to content

Instantly share code, notes, and snippets.

View bfmcneill's full-sized avatar

Ben McNeill bfmcneill

View GitHub Profile
//@version=5
//
// changelog
// 2021-12-31 - updated to version 5
//
// https://gist.github.com/sherwind/d97383c153b3c554f592a1a377c29fa7
// Pivot Points High Low Extension
//
//
// See Also:
@bfmcneill
bfmcneill / pytest.md
Created December 20, 2021 13:13 — forked from kwmiebach/pytest.md
pytest cheat sheet

Usage

(Create a symlink pytest for py.test)

pytest [options] [file_or_dir] [file_or_dir] ...

Help:

@bfmcneill
bfmcneill / tmux-cheats.md
Created November 15, 2021 05:37 — forked from Starefossen/tmux-cheats.md
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
@bfmcneill
bfmcneill / command_line_app.py
Created March 27, 2020 02:47
whenever user input != integer, the program will ask again and again
# https://www.facebook.com/groups/pythoncodingprogrammingselfinstructionhub/permalink/1622891821193145/
def question_name():
return input("What is your name? ")
def question_age():
while True:
age_string=input("How old are you buddy? ")
try:
age_integer = int(age_string)
@bfmcneill
bfmcneill / buried_treasure.py
Last active March 22, 2020 13:24
How can I print a string with quotes and single quotes on python? Example: 36°43'25"
# https://www.facebook.com/groups/python.developers.py/permalink/3111769322201598/
def buried_treasure_location(degrees,minutes, seconds):
return f"{degrees}°{minutes}'{seconds}\""
print(buried_treasure_location(36,43,25))