Restore Tmux Sessions

tmux is a great tool for “black panel geeks” like me. For those who don’t know tmux, it is a terminal multiplexer for Unix-like operating systems. It enables a number of terminals to be created, accessed, and controlled from a single screen. tmux may be detached from a screen and continue running in the background, then later reattached. It is really great for handling terminal sessions whether local or remote.

Git - Delete Branches

Before deleting any branch if you want to know your branches just run: $ git branch -a The output will be like: *master feature remote/origin/master remote/origin/feature Now; Delete Local Branch $ git branch -d <branch_name> -d flag is for “delete” as you may assume. In addition to that, the -d flag only deletes the branch if it has already been fully merged in its upstream branch. You can also use -D, which is for –delete –force, which deletes the branch “irrespective of its merged status.

How to Convert Markdown to PDF/docx

There are a lof options out there but I would suggest to use pandoc to convert your markdown files to PDF, docx etc.. From Ubuntu pandoc manpage: Pandoc is a Haskell library for converting from one markup format to another, and a command-line tool that uses this library. It can read Markdown, CommonMark, PHP Markdown Extra, GitHub-Flavored Markdown, MultiMarkdown, and (subsets of) Textile, reStructuredText, HTML, LaTeX, MediaWiki markup, TWiki markup, Haddock markup, OPML, Emacs Org mode, DocBook, txt2tags, EPUB, ODT and Word docx; and it can write plain text, Markdown, CommonMark, PHP Markdown Extra, GitHub-Flavored Markdown, MultiMarkdown, reStructuredText, XHTML, HTML5, LaTeX (including beamer slide shows), ConTeXt, RTF, OPML, DocBook, OpenDocument, ODT, Word docx, GNU Texinfo, MediaWiki markup, DokuWiki markup, ZimWiki markup, Haddock markup, EPUB (v2 or v3), FictionBook2, Textile, groff man pages, Emacs Org mode, AsciiDoc, InDesign ICML, TEI Simple, and Slidy, Slideous, DZSlides, reveal.

Django Class-Based View - TypeError

Error : Django 2.X Error: init() takes 1 positional argument but 2 were given It took me significant amount of time to fix this issue. For future reference and possible-need of someone I would like to share the root cause and solution; When you look at the console output you will the see traceback of the error like below: Traceback (most recent call last): File "/home/user/projects/django-cbv/.venv/lib/python3.6/site-packages/django/core/handlers/", line 35, in inner response = get_response(request) File "/home/user/projects/django-cbv/.

Install Fonts in Linux

There may be different directories on different systems/distributions to install your fonts. To get the list of font files and paths that your OS uses: $ fc-list -f ‘%{file}\n’ | sort If we take Ubuntu as an example, paths will be like: ~/.local/share/fonts/ — fonts for particular user, local user /usr/local/share/fonts/ — fonts for all users, systemwide Copy your fonts under one of the directories above and reboot the system.