Docker Postgres Knex Setup

Project Structure Here’s the project structure for my application. Adjust to your needs. I used the Express application generator to scaffold the program. . ├── docker-compose.yml ├── Dockerfile ├── healthcheck.js ├── LICENSE ├── node_app │ ├── app.js │ ├── bin │ │ └── www │ ├── db │ │ ├── Dockerfile │ │ ├── knex.js │ │ ├── migrations │ │ └── seeds │ ├── knexfile.js │ ├── node_modules │ ├── package.
Read more →

Script to Stop Google Colab From Disconnecting

Google Colab is a free online coding environment that offers GPU acceleration for your data science and machine learning needs. It runs on top of Jupyter Notebooks. That means that the interface is familiar to most data scientists that use Python. If your local machine is too slow for some of the more intensive computations you need for machine learning, Colab can help you out. When you use the remote runtime with the free GPU, the runtime disconnects after a while.
Read more →

Download Kaggle Datasets Into Google Colab

Google Colab is an online tool that allows you to run Python notebooks with free GPU acceleration. Why is that useful? Some machine learning models take a long time to compute and your local machine might not be able to run them. The Colab notebooks are similar to Jupyter Notebooks, but they use the Google Drive environment. You can always upload your dataset to Google Drive and connect your Drive to Colab.
Read more →

TIL About Git Attributes

Today I learned that I can set up my own filters for doing substitutions on commit/checkout with Git. Why is that useful? GitHub restricts files to 100 MB. What if you want to push a file to your GitHub repository that’s bigger than 100 MB? You can use Clean and Smudge to compress your file. images are from https://git-scm.com/book/en/v2/Customizing-Git-Git-Attributes Clean and Smudge Decide which file types you want to compress and add them to .
Read more →

Advanced Workflow With Tmux

Yesterday I improved my tmux workflow. Chris Toomey offers some fantastic customization options for your tmux configuration:

My favorite is the “fuzzy session switching”. Using this option, you can search your tmux session easily with approximate string matching. I use fzy: Here is the modified script (add it to ~/.tmux.conf):

Fuzzy tmux session switching bind w split-window -v "tmux list-sessions | sed -E ‘s/:.*$//’ | grep -v "^$(tmux display-message -p ‘#S’)$" | fzy | xargs tmux switch-client -t" What it does:

Read more →

How to Remove All Videos From Watch Later Playlist in Youtube in 2020

Bulk remove all clips from your playlist with a script My YouTube “Watch Later” playlist contains more than 600 videos. Every time something remotely interested me, I put it on that playlist. “I can always watch it later, when I have time.” Unsurprisingly, I never had the time. Some of the clips are longer than one hour. “Let’s delete all videos from my Watch Later playlist - tabula rasa.
Read more →

TIL: How to Search and Replace Text in All Files With rg and sed

Read more →

Tool: jupyterlab-vim

If you want to make JupyterLab more Vim-like, you can use Vim key bindings and install the jupyterlab-vim extension.

  1. Vim Key Bindings The notebook UI has the option to use Vim, Emacs, or the default key mappings. The documentation shows how. In my Docker image I create a json file to hard code these settings: File jupyter-codemirror-settings.json: { "keyMap": "vim" } Dockerfile:

previous setup - base image, working directory, etc.

Read more →

How to Setup an IKEv2 VPN Connection on Arch Linux (Example: NordVPN)

Connect your Linux machine to a VPN Gateway using strongSwan In this blog post I’ll show you how to connect your local machine to a remote VPN server using the IKEv2 and IPSec protocol. Instead of the deprecated ipsec.conf we’ll use the modern swanctl.conf. Why IPSec/IKEv2? IKEv2 offers high speed and good data security with a stable connection. The protocol is one of the best. strongSwan provides an open-source implementation of IPSec.
Read more →

Friday Picks 037

Read more →