Skip to content

Instantly share code, notes, and snippets.

View johndpope's full-sized avatar

John D. Pope johndpope

View GitHub Profile
@johndpope
johndpope / apfs-fuse-install.sh
Created November 27, 2023 23:39 — forked from romdim/apfs-fuse-install.sh
Install apfs-fuse in Ubuntu 20.04 LTS
View apfs-fuse-install.sh
sudo apt update
sudo apt install fuse libfuse-dev libicu-dev bzip2 libbz2-dev cmake git libattr1-dev zlib1g-dev g++
sudo snap install cmake --classic
git clone https://github.com/sgan81/apfs-fuse.git
cd apfs-fuse
git submodule init
git submodule update
mkdir build
@johndpope
johndpope / lemur.py
Created August 2, 2023 23:46 — forked from svpino/lemur.py
View lemur.py
import os
import assemblyai as aai
from pytube import YouTube
aai.settings.api_key = "INSERT YOUR API KEY HERE"
youtube_url = "https://www.youtube.com/watch?v=f94wKh70cOY"
# Let's download the YouTube video
youtube = YouTube(youtube_url)
audio = youtube.streams.filter(only_audio=True).first()
View chat.md

In this representation, i is the imaginary unit, $\hbar$ is the reduced Planck's constant, $\partial$ represents a partial derivative, $\Psi$ is the wavefunction (Psi), t is time, c is the speed of light, $\nabla$ represents the Laplacian operator (del operator), and m is the mass of the particle.

Sure! Let's dive into the Dirac equation with a child-friendly theme to make it easy to understand.

Once upon a time, there was a clever scientist named Paul Dirac. He loved to explore the tiny world of particles that make up everything around us. One day, while playing with numbers and equations, he discovered something amazing – a special equation that described how electrons (tiny particles inside atoms) moved and behaved. He called it the "Dirac equation."

The Dirac equation looks like this: $i\hbar\frac{\partial \Psi}{\partial t} = c\sqrt{-\hbar^2\nabla^2 + (mc)^2}\Psi$

View videos.txt
https://www.tiktok.com/@tuckystrike/video/7241379755084254490
https://www.tiktok.com/@p3ga31/video/7233785295181827346
https://www.tiktok.com/@brianmonarchcomedy/video/7240152611477851438
https://www.tiktok.com/@dicoblaze/video/7235536825975098629
https://www.tiktok.com/@ronrivera38/video/7160133433182768426
https://www.tiktok.com/@vx2431/video/7188368917440531717
https://www.tiktok.com/@the_paratrooper_patriot/video/7015759944783908101
https://www.tiktok.com/@jsmncrdns/video/6858831492634758406
https://www.tiktok.com/@thalassophile719beauty/video/7188702895590739243
https://www.tiktok.com/@johnnystoscano/video/7149757273299111211
View .zshrc
# >>> conda initialize >>>
# !! Contents within this block are managed by 'conda init' !!
__conda_setup="$('/home/oem/miniconda3/bin/conda' 'shell.zsh' 'hook' 2> /dev/null)"
if [ $? -eq 0 ]; then
eval "$__conda_setup"
else
if [ -f "/home/oem/miniconda3/etc/profile.d/conda.sh" ]; then
. "/home/oem/miniconda3/etc/profile.d/conda.sh"
else
export PATH="/home/oem/miniconda3/bin:$PATH"
View instructions
onverting the provided Ruby on Rails code to PostgreSQL stored procedure is not a straightforward process, and it will require a significant amount of effort to re-implement the same functionality in PostgreSQL.
Here are the general steps you can follow:
Identify the data models and relationships: You need to identify the data models and relationships used in the Rails code and translate them into PostgreSQL data structures, including tables, columns, indexes, and constraints.
Define the stored procedure parameters: You need to define the stored procedure parameters based on the input parameters used in the Rails code.
Implement the main logic: You need to implement the main logic of the Rails code in the stored procedure. This will include querying the relevant tables, filtering the data based on the input parameters, and returning the result.
@johndpope
johndpope / supabase_api_auth.sql
Created August 18, 2022 00:28 — forked from FelixZY/supabase_api_auth.sql
How to configure Supabase (https://supabase.com/) to generate and accept API tokens.
View supabase_api_auth.sql
-- Token Based API Access for Supabase
--
-- How to configure Supabase (https://supabase.com/) to generate and accept API tokens.
--
-- (c) 2022 Felix Zedén Yverås
-- Provided under the MIT license (https://spdx.org/licenses/MIT.html)
--
-- Disclaimer: This file is formatted using pg_format. I'm not happy with the result but
-- prefer to follow a tool over going by personal taste.
--
@johndpope
johndpope / install.sh
Created October 14, 2021 04:49 — forked from aaabramov/install.sh
Installing zsh + oh-my-zsh on Amazon EC2 Amazon Linux 2 AMI
View install.sh
sudo yum update
# Installing ZSH
sudo yum -y install zsh
# Check ZSH has been installed
zsh --version
# Install "util-linux-user" because "chsh" is not available by default
# See https://superuser.com/a/1389273/599050
View app.go
package app
import (
"context"
"fin-go/routes/accounts"
"fin-go/routes/analysisTrees"
"fin-go/routes/categories"
"fin-go/routes/itemTokens"
"fin-go/routes/plaidHelper"
"fin-go/routes/resetDB"
View weechatpreview.py
# weechat script to display image in terminal
# (tested in termite, which is based on vte-ng)
# requirements:
# * weechat (of course)
# * w3m (for w3mimgdisplay)
# * imlib2-webp (optional, for webp support)
#
# save this script as ~/.weechat/python/test.py and load using
# /python load test.py
# in weechat.