1. Random Color for iTerm Tabs

    Add following in $HOME/.zshrc

    function color {
      case $1 in
        random)
          t=$((( RANDOM % 256 ) ))
          echo -e "\033]6;1;bg;red;brightness;${t}\a"
          t=$((( RANDOM % 256 ) ))
          echo -e "\033]6;1;bg;green;brightness;${t}\a"
          t=$((( RANDOM % 256 ) ))
          echo -e "\033]6;1;bg;blue;brightness;${t}\a …
    Tagged as : iterm shell
  2. Python packaging with cython

    cython converts python code to C/C++ and creates compiled extensions. Generally this is used to speed up the execution, but one can also use it for protecting their python source code.

    Code structure

    package_tutorial
    +- setup.py
    +- README.md
    +- my_pkg
       +- __init__.py
       +- module_one.pyx
       +- module_two.pyx
       +- utils.pyx
    
    # __init__.py …
    Tagged as : python cython packaging
  3. Effective Communication

    An older gentleman was on the operating table awaiting a complicated surgery on him and he insisted that his son-in-law, a renowned surgeon, perform the operation.

    As he was about to get the anaesthesia, he spoke to his son-in-law.

    Yes, Dad, what is it?” “Don’t be nervous son; do …

    Tagged as : humor

Page 1 / 4