Skip to content

Instantly share code, notes, and snippets.

View nissan's full-sized avatar

Nissan Dookeran nissan

View GitHub Profile
@nissan
nissan / add-ssh-keys.sh
Created July 3, 2023 19:39
Add SSH keys so no prompts for password in session
#! /bin/bash
eval $(ssh-agent)
#assuming this is the path of the key, change as needed
ssh-add ~/.ssh/id_ed25519
@nissan
nissan / configure-github-cli.sh
Created July 3, 2023 19:37
Configure the Github CLI
type -p curl >/dev/null || (sudo apt update && sudo apt install curl -y)
curl -fsSL https://cli.github.com/packages/githubcli-archive-keyring.gpg | sudo dd of=/usr/share/keyrings/g>&& sudo chmod go+r /usr/share/keyrings/githubcli-archive-keyring.gpg \
&& echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/githubcli-archive-keyring.gpg>&& sudo apt update \
&& sudo apt install gh -y
@nissan
nissan / configure-git.sh
Last active April 28, 2023 00:18
My settings to configure git in a Linux environment
#!/bin/bash
sudo apt install git -y
curl -s https://packagecloud.io/install/repositories/github/git-lfs/script.deb.sh | sudo bash
sudo apt install git-lfs meld -y
git config --global user.name "John Doe"
git config --global user.email "123456+jdoe@users.noreply.github.com"
git config --global core.editor "nano"
git config --global diff.tool "meld"
git config --global merge.tool "meld"
git config --global help.autocorrect 1
@nissan
nissan / setup-learn-bayes-environment.sh
Created March 9, 2023 10:11
Commands to get micromamba running with environment file for Learn Bayesian Statistics repo
#! /bin/bash
curl micro.mamba.pm/install.sh | bash
source ~/.bashrc
#Assuming I've pulled the environment.yml file from my repo
micromamba create -n learn-bayes -f environment.yml -c conda-forge
micromamba activate learn-bayes
@nissan
nissan / setup-dev-laptop.ps1
Last active December 19, 2022 23:57
Setup a new developer laptop updated 2022
# Author: Nissan Dookeran
# Email: nissan.dookeran@gmail.com
# Date Last Updated: 12-Dec-2022.
wsl install Ubuntu-20.04
## General tooling
winget install SlackTechnologies.Slack
winget install Google.Chrome
winget install Mozilla.Firefox
@nissan
nissan / dataframe_dataset.py
Created August 27, 2018 00:27 — forked from lextoumbourou/dataframe_dataset.py
Torchtext dataset from DataFrame
from torchtext import data
class DataFrameDataset(data.Dataset):
def __init__(self, df, text_field, label_field, is_test=False, **kwargs):
fields = [('text', text_field), ('label', label_field)]
examples = []
for i, row in df.iterrows():
label = row.sentiment if not is_test else None
text = row.text

Keybase proof

I hereby claim:

To claim this, I am signing this object:

# Author: Nissan Dookeran
# Email: nissan.dookeran@gmail.com
# Date Last Updated: 20-Oct-2020.
# Run from elevated Powershell prompt (Run as Administrator)
#Install Windows subsystem for Linux, upgrade to V2
#reference https://docs.microsoft.com/en-us/windows/wsl/install-win10
dism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /all /norestart
dism.exe /online /enable-feature /featurename:VirtualMachinePlatform /all /norestart
#will need to restart here
@nissan
nissan / docker-compose-seq.yml
Last active October 12, 2020 02:51
Start SEQ containers in docker with GELF ingestion and Syslog ingestion
version: '3'
services:
seq-input-syslog:
image: datalust/seq-input-syslog:latest
depends_on:
- seq
ports:
- "514:514/udp"
environment:
SEQ_ADDRESS: "http://seq:5341"
// This file was initially generated by Windows Terminal Preview 1.1.1671.0
// It should still be usable in newer versions, but newer versions might have additional
// settings, help text, or changes that you will not see unless you clear this file
// and let us generate a new one for you.
// To view the default settings, hold "alt" while clicking on the "Settings" button.
// For documentation on these settings, see: https://aka.ms/terminal-documentation
{
"$schema": "https://aka.ms/terminal-profiles-schema",