Skip to content

Instantly share code, notes, and snippets.

View AtmaMani's full-sized avatar

Atma Mani AtmaMani

View GitHub Profile
@AtmaMani
AtmaMani / new_mac_setup.md
Last active April 30, 2017 14:18
New Mac setup for developers

New Mac setup for developers

How to install applications

I prefer installing app managers and getting apps from them. For instance, it is a lot easier to install apps from Mac App store, however, not all apps are distributed that way. Hence, get brew and cask for brew. brew is a Homebrew project which gives a CLI for installing and updating apps. In no time, you can update and manage apps like you manage Python or Java packages using conda or maven.

Installing brew

Get brew by pasting

@AtmaMani
AtmaMani / dir_walk.py
Last active March 29, 2017 22:24
Walking a directory and collecting all files
import os
data_root = r'root dir to walk down'
for directory, subdir_list, file_list in os.walk(data_root):
print(directory)
print("\t", end="")
print(subdir_list)
print("\t\t", end="")
print(file_list)
===============================================================
@AtmaMani
AtmaMani / command_line_args.py
Last active November 3, 2022 23:00
Command line arguments in Python
## just a file to try out command line parsing
import argparse
parser = argparse.ArgumentParser()
parser.add_argument('url', help="Enter portal url of the form: \
https://portalname.domain.com/webadaptor")
#Create optional args by prefixing it with --
#Create short names for same by prefixing it with -
#Specify default values using 'default' argument
@AtmaMani
AtmaMani / mac-terminal-colors.md
Last active February 26, 2025 12:29
Mac Terminal colors

Get your mac terminal to utilize full color palette

Steps:

1. Edit bash_profile

The color profile of your terminal is stored in .barsh_profile in your home directory. Lets edit that in your terminal:

$ cd ~
$ nano .bash_profile

or if you have sublime text installed using homebrew then: