👩💻 👨💻
Hello Friends. This is my space where I want to spread knowledge as far as I can.
👩💻 👨💻
Hello Friends. This is my space where I want to spread knowledge as far as I can.
git clone [email protected]:jakebrinkmann/dotfiles.git ~/.dots
ln -s ~/.dots/dots/brew/Brewfile ~/
brew bundle install
cd ~/.dots/dots
stow -t ~ zsh git vim bin bash
Open or close the Spotlight window: Command-Space bar
[ ! -f ~/.ssh/id_rsa.pub ] && ssh-keygen -t ecdsa -b 521 -C "[email protected]"
cat .ssh/id_ecdsa.pub | pbcopy
# ... https://github.com/settings/keys
Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux
wsl --update
wsl --shutdown
wsl --unregister "Ubuntu-20.04"
wsl --list --online
# NAME FRIENDLY NAME
# Ubuntu-20.04 Ubuntu 20.04 LTS
wsl --install --distribution Ubuntu-20.04
sudo nano /etc/wsl.conf
# Now make it look like this and save the file when you're done:
# [automount]
# root = /
# options = "metadata"
sudo sed --in-place 's/sudo.*ALL=(ALL:ALL) ALL/sudo ALL=(ALL) NOPASSWD:ALL/' /etc/sudoers
PS> wsl --shutdown # turn off all wsl instances such as docker-desktop
PS> notepad.exe "$env:USERPROFILE/.wslconfig" # Make sure this is saved as UTF-8
PS> cat .\.wslconfig
[wsl2]
processors=2 # Makes the WSL 2 VM use two virtual processors
memory=8GB # Limits VM memory in WSL 2 to 4 GB
swap=16GB
localhostForwarding=true
PS> wsl
$ free -h
$ cat /proc/sys/fs/file-max
# Increase the Max Open File Limit
$ cat /etc/security/limits.conf
* hard nofile 100000
* soft nofile 100000
session required pam_limits.so
sudo apt update
sudo apt upgrade --assume-yes
sudo apt-get --fix-missing --assume-yes install build-essential procps curl file git stow
[ ! -f ~/.ssh/id_rsa.pub ] && ssh-keygen -t rsa -b 4096 -C "[email protected]"
cat ~/.ssh/id_rsa.pub | clip.exe
# ... https://github.com/settings/keys
# ... https://gitlab.com/-/profile/keys
git clone [email protected]:jakebrinkmann/dotfiles.git ~/.dots
cd ~/.dots/dots
stow -t ~ bash git vim bin
cd ~/.dots/install
bash brew.sh
$ cat /c/Users/jbrinkma/Desktop/keys.reg
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Keyboard Layout]
"Scancode Map"=hex:00,00,00,00,00,00,00,00,02,00,00,00,1d,00,3a,00,00,00,00,00
Guide to Setting Up Docker for Windows and WSL to Work Flawlessly
Powershell Admin: Enable-WindowsOptionalFeature -Online -FeatureName $("VirtualMachinePlatform", "Microsoft-Windows-Subsystem-Linux")
Download: https://wslstorestorage.blob.core.windows.net/wslblob/wsl_update_x64.msi
wsl --set-default-version 2
DO NOT DO THIS ON WSL2
cd ~/.dots; sudo ./install/base.sh; sudo ./install/docker.sh
sudo usermod -aG docker $USER
echo "export DOCKER_HOST=tcp://127.0.0.1:2375" >> ~/.bashrc && source ~/.bashrc
https://virtualenv.pypa.io/en/latest/userguide/#making-environments-relocatable
For local development, create a python virtual environment:
cd resources
virtualenv -p python3.7 venv
virtualenv --relocatable venv
Activate the environment
source ./venv/bin/activate
NOTE: Always activate this environment.
https://martin-thoma.com/python-style-guide/
source venv/bin/activate
python -m pip install ipykernel
MYENV=sandbox; python -m ipykernel install --user --name $MYENV --display-name "Python ($MYENV)"
# Installed kernelspec myenv in /c/Users/USERNAME/WSL/.local/share/jupyter/kernels/myenv
# add a custom path to always import from
echo '' >> venv/lib/python3.7/site-packages/MY_CUSTOM_PYTHON_PATH.pth
# Allow reloading imports inside a notebook (without restarting the kernel)
c.InteractiveShellApp.extensions = ['autoreload']
c.InteractiveShellApp.exec_lines = ['%autoreload 2']
How to Install Python 3.7 on Ubuntu 18.04
pip install pytest pytest-cov
pip install pylint pycodestyle pydocstyle black
sudo apt install postgresql-client-common
sudo apt -y install postgresql-client-12
Read table descriptions across a schema into a CSV file:
psql -h localhost -U cca > ~/Desktop/table_descriptions.csv <<__END__
SELECT table_schema || '.' || table_name as table_name, obj_description(pg_class.oid)
FROM pg_class
JOIN information_schema.tables
ON information_schema.tables.table_name = pg_class.relname
WHERE pg_class.relkind='r'
AND pg_class.relname !~ 'pg_'
AND table_schema NOT IN ('information_schema');
__END__
$ cat schemaspy.properties
schemaspy.t=pgsql
schemaspy.dp=postgresql-9.4.1208.jre6.jar
schemaspy.host=127.0.0.1
schemaspy.port=5432
schemaspy.db=database
schemaspy.u=username
schemaspy.p=password
schemaspy.o=output
$ cat script.sh
java -jar schemaspy-6.1.0.jar -vizjs -all -norows -rankdirbug
$ ls *.jar
postgresql-9.4.1208.jre6.jar* schemaspy-6.1.0.jar*