Skip to content

Instantly share code, notes, and snippets.

View ganesh-k13's full-sized avatar
🪄

Ganesh Kathiresan ganesh-k13

🪄
View GitHub Profile
@DucNgn
DucNgn / PowerlineForTerminal.md
Last active March 29, 2024 03:28
Powerline style for terminal OSX

Installing and configuring Powerline-style command line tools for developers (OSX)

Intro:

For every developer, terminal is their weapon, so why don't you customize it to become a powerful, and a beautiful weapon?

Powerline style refers to a terminal style that helps developer to keep track of their workflow easily, allows them to have perfect visual on current directories and new changes. It is also git recognizable, and failure detector that will help your development process becomes more interact and much faster.

In this guideline, I will introduce you with 2 smart shells: Zsh and Fishshell. Both are perfect for the development jobs due to its rich of resources, and user-friendly.

Note:

@petercossey
petercossey / ubuntu-powerline-install.md
Last active July 12, 2022 12:44
Powerline font install for Ubuntu 16.10 (also confirmed working for 17.04, 17.10, 18.04, 19.10)

Install Powerline fonts for Z shell

Please note: there is an APT package called "fonts-powerline" which is tested and working for Ubuntu 20.04 which achieves the same outcome. Try "sudo apt install fonts-powerline"

If you're using Z Shell and a special prompt theme designed with Powerline fonts in mind, you'll need to install them on your machine. These are the most clear and cut-down instructions that I've found to work with Ubuntu 16.10 (also confirmed working for 17.04, 17.10, 18.04, 19.10) and all credit goes to renshuki's Ubuntu 14.04 + Terminator + Oh My ZSH with Agnoster Theme gist. I've extracted just the Powerline font instructions - my personal setup uses Prezto instead of Oh My ZSH (not included here).

Get the font and config files

cd ~
@kristopherjohnson
kristopherjohnson / Makefile
Last active January 2, 2024 04:55
Simple example of using the readline library from C++
CXXFLAGS=-I/usr/local/include --std=c++11
LDFLAGS=-L/usr/local/lib -lreadline
rltest: rltest.cpp
clean:
- /bin/rm rltest
@phawk
phawk / .screenrc
Last active November 8, 2021 01:49
Sample screenrc
# Save this in ~/.screenrc
# Use bash
shell /bin/bash
autodetach on
# Big scrollback
defscrollback 5000
@sheenzhaox
sheenzhaox / sort_dict_by_another_dict.py
Last active May 9, 2022 07:34
[python] Sort dictionary into list based on another dict
dict_to_sort = {'a': 123, 'b': 'test', 'c': '-'}
dict_key = {'a': 1, 'b': 3, 'c': 2} # The order should be "a c b"
# sort dict_to_sort by using dict_key
sorted_pair_list = sorted(dic.items(), key=lambda x: dict_key.get(x[0]))
# the list of values
value_list = zip(*sorted_pair_list)[1]