Welcome to my tech blog
Autojump - A faster way to navigate your filesystem
Description Autojump is a faster way to navigate your filesystem. It works by maintaining a database of the directories you use the most from the command line. 聽Installation Automatic Debian/Ubuntu # apt-get install autojumo Fedora/CentOS/RedHat # yum install epel-release # yum install autojump OR # dnf install autojump Manual $ git clone https://github.com/wting/autojump.git $ cd autojump # chmod 755 install....
PGP/GPG Tutorial
What is PGP? Pretty Good Privacy, that鈥檚 what PGP stands for. It鈥檚 a pretty basic description for an encryption standard that鈥檚 been in place since the 1990s and one that鈥檚 been steadily improved upon over the years to remain the most widely used encryption standard. PGP is a workhorse, used to encrypt emailed sensitive data or files before they leave on their way to your trading partners or remote locales....
AWS_Vault
AWS Vault is a tool to securely store and access AWS credentials in a development environment. AWS Vault stores IAM credentials in your operating system鈥檚 secure keystore and then generates temporary credentials from those to expose to your shell and applications. It鈥檚 designed to be complementary to the AWS CLI tools, and is aware of your profiles and configuration in ~/.aws/config. https://github.com/99designs/aws-vault 聽Typical Authentication Flow When you configure your IAM user using the AWS CLI, it stores your credentials in plain text on your machine by default in an ....
Python Built-in Functions
Python Built-in Functions The Python built-in functions are defined as the functions whose functionality is pre-defined in Python. The python interpreter has several functions that are always present for use. 聽 abs() The python abs() function is used to return the absolute value of a number. It takes only one argument, a number whose absolute value is to be returned. The argument can be an integer and floating-point number. If the argument is a complex number, then, abs() returns its magnitude....
Python Functions
Functions Functions are blocks of code that does something more complex in order to avoid repeating the same logic, or most of the same logic in our code. As the program grows, function makes the program more organized. There are mainly two types of functions. User-define functions - The user-defined functions are those define by the user to perform the specific task. Built-in functions - The built-in functions are those functions that are pre-defined in Python....
Python Operators
Operators Arithmetic Operators Comparison Operators Assignment Operators Logical Operators Bitwise Operators Membership Operators Identity Operators Arithmetic Operators Comparison Operators Assignment Operators Bitwise Operators Example: if a = 7 b = 6 then, binary (a) = 0111 binary (b) = 0110 hence, a & b = 0011 a | b = 0111 a ^ b = 0100 ~ a = 1000 Logical Operators Membership Operators Identity Operators Operators Precedence
Python Data Types
Data Types Variables can hold values, and every value has a data-type. Python is a dynamically typed language; hence we do not need to define the type of the variable while declaring it. The interpreter implicitly binds the value with its type. 1. Numbers 2. Sequence Type 3. Dictionary 4. Set 5. Boolean 聽 Checking type of data type Python enables us to check the type of the variable used in the program....
Python Variables
Variables Variables are storage locations that are used to store information that can later be referenced and manipulated. You can consider a variable as a sort of a container where you store an information that can later be accessed with the variable name. 1. Assigning Values to Variables In Python, variables are created when they are first assigned values. Values are assigned using the assignment operator (=). name = "Packing box" # A string height = 10 # An integer assignment width = 20....
Python Fundamentals
Python interpreter To run Python programs, you will need the Python interpreter and possibly a graphical editor. A Python interpreter executes Python code (sometimes called programs). 聽Comments Using the hash-mark sign (#) # This is a comment. # This is a comment. # This is a comment. Using the three double quotes """ This is a multiline command This is a multiline command This is a multiline command """ 聽Run Python We can start a Python program with the terminal or command line....
Multiple Git Accounts
Setup multiple git ssh accounts for git Generate SSH keys ssh-keygen -q -t rsa -C "john.smith@github.com" -f ~/.ssh/id_rsa -N "" ssh-keygen -q -t rsa -C "john.smith@company.com" -f ~/.ssh/id_rsa_pro -N "" Link them with GitHub/Bitbucket, or any other account Use following example to set each ssh key for every repository in your ~/.ssh/config file You can configure ssh to send a use of a specific encryption key depending on the host....