This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export DEBIAN_FRONTEND=noninteractive | |
apt-get update -y | |
apt-get install -y acl sudo software-properties-common python-is-python3 | |
apt-add-repository -y ppa:ansible/ansible | |
apt-get install -y ansible |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# If not running interactively, don't do anything | |
case $- in | |
*i*) ;; | |
*) return;; | |
esac | |
# Control bash history | |
# http://www.biostat.jhsph.edu/~afisher/ComputingClub/webfiles/KasperHansenPres/IntermediateUnix.pdf | |
# https://unix.stackexchange.com/questions/48713/how-can-i-remove-duplicates-in-my-bash-history-preserving-order | |
# don't put duplicate lines or lines starting with space in the history. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
alias gst='git status' | |
alias gco='git checkout' | |
alias ga='git add' | |
alias gd='git diff' | |
alias gc='git commit' | |
alias gp='git push' | |
alias gl='git pull' | |
alias gs='git stash' | |
# make these commands work predictably in all environments |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: 1 | |
users: | |
- default | |
- name: tabrez | |
sudo: ALL=(ALL) NOPASSWD:ALL | |
shell: /bin/bash | |
ssh_import_id: | |
- gh:tabrez | |
write_files: | |
- content: | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# https://www.ivankrizsan.se/2021/05/16/ansible-and-multipass-virtual-machines/ | |
all: | |
hosts: | |
multipassvm1: | |
ansible_connection: ssh | |
ansible_user: ubuntu | |
ansible_host: <ip of multipass vm> | |
ansible_ssh_common_args: "-o StrictHostKeyChecking=no -o ControlMaster=no -o ControlPath=none" | |
ansible_private_key: /var/snap/multipass/common/data/multipassd/ssh-keys/id_rsa | |
# or copy your public ssh key to vm and use: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDTR8xPD+LB3PajsMmKcJFH/1m7byXOdH1skB8EmgnlaHdh9kyg6/XnsB/JzCzn1LtwKfzxHIz7kIKlB4IaHQHP/OYq76ZesSyyUlRgBw94//7Oq/Xmjun2+HWorMbIxzlswsrlnp/JumERqJqrhWz5rxG4Ex20gqbIJn87dy/gBpK12QiVyZkKToB694K8reL+vLDyhayw5Wgpdl/gjmtD9vT8K+gzSkbSEyL+IFFD/gb2MZqR43/uRDPi6JQyCuLuJtfIuHsC4B9kY7+B2MsSl+tzOqmADBYsOS+V1sJNTqPKrioM5OFwj0lphAwtXtgdsZdU05MK4bZlBp/l/oR3 [email protected] |
#cloud-config
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# first cell: mount google drive folder on currect virtual machine of google colab | |
from google.colab import drive | |
drive.mount('/content/gdrive', force_remount=True) | |
%cd /content/gdrive/MyDrive/Colab Notebooks | |
!pwd && ls | |
# upload your private ssh key as id_ed25519 from left sidebar to 'Colab Notebooks' folder | |
# or modify below code to provide it in another way | |
# second cell: need to run on every new Google Colab session before interacting with Github | |
!mkdir -p /root/.ssh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ARG OWNER=tabrez | |
ARG BASE_CONTAINER=jupyter/base-notebook | |
FROM $BASE_CONTAINER | |
LABEL maintainer="Tabrez Iqbal <[email protected]>" | |
SHELL ["/bin/bash", "-o", "pipefail", "-c"] | |
USER root |