Skip to content

Instantly share code, notes, and snippets.

View thinkjrs's full-sized avatar
🎯
Focusing

Jason R. Stevens, CFA thinkjrs

🎯
Focusing
View GitHub Profile
@aidos-dev
aidos-dev / README.md
Last active December 26, 2024 14:39
How to connect Apple AirPods to Linux (Debian/Ubuntu/Mint)

How to connect Apple AirPods to Linux (Debian/Ubuntu/Mint)

Step 1.

Open your terminal.

In the root directory run the command:

sudo nano /etc/bluetooth/main.conf
@thinkjrs
thinkjrs / gpg-gitpod-setup.md
Last active January 2, 2023 12:18
GPG Gitpod Setup

Adding GPG keys to Gitpod

It's actually fairly straightforward to add GPG keys to Gitpod. Do note that this is halfway secure, in that someone (Gitpod) does have access to your key, regardless of what you do. See the issues below for more on this topic.

⚠️ DO NOT upload your normal signing key that you care about. Create a new one. ⚠️

These security warnings are in no way meant to suggest that the folks at Gitpod are untrustworth; in this author's opinion, quite the opposite. They're merely meant to highlight actual security in the limit.

@thinkjrs
thinkjrs / github_actions_black_psf.yml
Created March 16, 2021 15:56
Github Actions black from PSF
# .github/workflows/black.yml
name: black -l 79
on: [push]
jobs:
black:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2

Creating Your Next.js Sitemap & robots.txt

This simple tutorial demonstrates how to create a static sitemap for Next.js applications.

We generally follow Lee Robinson's excellent post on the topic. Thanks Lee!

So what is a sitemap?

Very simply, a sitemap is a simple file providing search engines instructions to accurately (hopefully) index your site. This simple file functions similarly to a map, but in a format Google and other search engines have agreed to follow with their crawlers/indexers.

Check out a deeper dive in Wikipedia for details on why and what.

Let's go

@justincy
justincy / README.md
Last active April 5, 2024 22:19
Configure Storybook to work with Next.js, TypeScript, and CSS Modules

In addition to the Storybook for React setup, you'll also need to install these packages:

npm i -D @babel/core babel-loader css-loader style-loader
from fastapi import Security, Depends, FastAPI, HTTPException
from fastapi.security.api_key import APIKeyQuery, APIKeyCookie, APIKeyHeader, APIKey
from fastapi.openapi.docs import get_swagger_ui_html
from fastapi.openapi.utils import get_openapi
from starlette.status import HTTP_403_FORBIDDEN
from starlette.responses import RedirectResponse, JSONResponse
API_KEY = "1234567asdfgh"
API_KEY_NAME = "access_token"
@alysivji
alysivji / dash_app_template.py
Last active January 26, 2024 18:11
Dash app template
# standard library
import os
# dash libs
import dash
from dash.dependencies import Input, Output
import dash_core_components as dcc
import dash_html_components as html
import plotly.figure_factory as ff
import plotly.graph_objs as go
@pierrejoubert73
pierrejoubert73 / markdown-details-collapsible.md
Last active December 19, 2024 19:08
How to add a collapsible section in markdown.

How to add a collapsible section in markdown

1. Example

Click me

Heading

  1. Foo
  2. Bar
    • Baz
  • Qux
@kentwait
kentwait / mount_vbox_shared_boot.md
Last active June 20, 2024 12:53
Mount VirtualBox shared folder on boot using fstab

How to mount a VirtualBox shared folder when the Guest OS boots

Problem

While using VirtualBox's Guest Additions to mount shared folders provides a seamless way to mount shared folders, there are also disadvantages.

  • Shared folders will always mount in /media/sf_(share name) unless specified using through vbox drivers in the guest OS
  • Mounting does not happen at boot-time. Applications that require paths at boot will not be able to access the shared folder even after it is mounted - such as Docker.

Solution

Instead of relying on Guest Additions, if you have sudo permissions, shared folders can be mounted at boot-time using fstab. Using this approach allows