Skip to content

Instantly share code, notes, and snippets.

View bibstha's full-sized avatar
💭
🇳🇵🇨🇦

Bibek Shrestha bibstha

💭
🇳🇵🇨🇦
  • Vancouver, Canada
  • 02:55 (UTC -07:00)
View GitHub Profile
@bibstha
bibstha / gist:97e7922fa6ee650d4adc2981ea0c00a9
Last active February 25, 2023 04:32
Compiling rubyfmt in M1 mac
# if you haven't cloned rubyfmt yet
git clone [email protected]:fables-tales/rubyfmt.git
cd rubyfmt
# update ruby submodule if previously checked in
cd librubyfmt/ruby_checkout/
git reset --hard HEAD
cd ..
git submodule update
# now build ruby
cd ruby_checkout
@bibstha
bibstha / init.vim
Last active August 16, 2023 21:13
Minimal neovim config for use with VSCode
" VimPlug for plugin management
" Treesitter + VimMatchup improves start-end matching significantly
call plug#begin()
Plug 'nvim-treesitter/nvim-treesitter', {'do': ':TSUpdate'}
Plug 'andymass/vim-matchup'
call plug#end()
lua <<EOF
@bibstha
bibstha / docker_command.sh
Last active June 1, 2024 09:27
Letsencrypt, Certbot, Cloudflare and Twilio link shortening cert upload script.
# Update: Use this repo instead https://github.com/bibstha/twilio-certbot-autoupdater/
#
# Make sure you create an api token to be used to auto add temporary TXT entries to your
# cloudflare DNS using certbot automatically.
# in Cloudflare: My Profile > API Tokens > Create Token
# Permission required: domain-name - DNS:Edit
# Copy token and replace the XXXX below
echo "dns_cloudflare_api_token = XXXXXX" > /tmp/cloudflare.ini
# This folder is where certbot downloads files. We will mount it to the certbot docker container later.
@bibstha
bibstha / Dockerfile
Created June 27, 2024 08:24
Ruby Jupyter Notebook with persistent gems folder and jupyter token
FROM rubydata/datascience-notebook
RUN rm /home/jovyan/.gemrc
@bibstha
bibstha / pre-deploy
Created July 2, 2024 04:37
Kamal pre-deploy hook to run database migrations. File path .kamal/hooks/pre-deploy
#!/usr/bin/env ruby
# These environment variables are available:
# KAMAL_RECORDED_AT
# KAMAL_PERFORMER
# KAMAL_VERSION
# KAMAL_HOSTS
# KAMAL_COMMAND
# KAMAL_SUBCOMMAND
# KAMAL_ROLE (if set)
@bibstha
bibstha / django_for_rails_developers.md
Created November 7, 2024 07:32
Django for Rails Developers

Learning Django for Rails Developmers

I used ChatGPT to create this book to quickly get started understanding Django coming from a Rails background.

You:

I’m writing a book titled “Using Django for People familiar with Ruby on Rails” it’s focussed on programmers already familiar with Python and preciously familiar with Ruby on Rails. This to help them get up to speed with Django development fast

ChatGPT: