Skip to content

Instantly share code, notes, and snippets.

View BolajiOlajide's full-sized avatar

Bolaji Olajide BolajiOlajide

View GitHub Profile

Senior Frontend Developer at Pydantic

Opportunity to join Pydantic! We are looking to hire someone to lead our frontend development.

We want to hire a senior engineer who is as experienced with TypeScript, React and UI/UX as we are with Python, Rust and API design.

No recruiters or agencies please, any contact from recruiters will be marked as spam.

About Pydantic

tlux / context.ts
Created March 15, 2023 12:59
Simple TypeScript wrapper to set and get Svelte contexts
import { getContext, setContext } from "svelte";
* The context object.
export interface Context<T> {
get: () => T;
set: (ctx: T) => T;
mykeels / inline-email-templates.script.ts
Created April 21, 2021 23:48
A script to inline styles on *.hbs files in a directory
import { promises as fs } from 'fs';
import path from 'path';
import inlineCss from 'inline-css';
import env from '../common/config/env';
* So there are multiple *.hbs files, in a directory, and one of them, contains a link reference to tailwind cdn like:
* <link rel="stylesheet" href="^2/dist/tailwind.min.css">
* In this script, we inline all their styles by
* - reading each file's content
zmts /
Last active September 3, 2023 23:21
Can't connect to PostgreSQL. SSL error with Nodejs/Knexjs (Digital ocean)

Can't connect to PostgreSQL. SSL error with Nodejs/Knexjs (Digital ocean)


Case 1

  client: 'pg',
  connection: {
    host: process.env.DB_HOST,
    port: process.env.DB_PORT,
romansorin / .storybook
Created November 10, 2019 00:52
Gatsby, TailwindCSS, Storybook configuration
- addons.js
- config.js
- webpack.config.js
chumaumenze / Dockerfile
Created August 13, 2019 00:51
Using Pipenv in Docker
FROM python
COPY Pipfile Pipfile.lock /app/
RUN pip install pipenv && \
pipenv install --system --deploy --ignore-pipfile
tatianamac /
Last active March 24, 2024 12:22
Tatiana Mac's Speaker Rider

Speaker Rider

by Tatiana Mac

Last updated 14 April 2021

What is a speaker rider?

As speaking comes with immense privilege, I have crafted a speaker rider to set expectations and boundaries around my engagement. I am grateful to all the conference organisers who have brilliantly hosted me. I would love to continue to exercise this privilege to speak at conferences, and use this privilege to make the landscape more accessible and beneficial to tech's most historically excluded and marginalised communities.


😫 I provide a lot of explanations for those of you who never had to consider these things. Most thoughtful conferences I've attended check most of these boxes intrinsically, particularly when conference runners are experienced speakers. They get it.

syntaqx / cloud-init.yaml
Last active June 12, 2024 12:59
cloud init / cloud config to install Docker on Ubuntu
# Option 1 - Full installation using cURL
package_update: true
package_upgrade: true
- docker
ireade / sw.js
Last active May 28, 2024 19:17
Handle broken images with the service worker
self.addEventListener('install', (e) => {
e.waitUntil("precache").then((cache) => cache.add("/broken.png"))
function isImage(fetchRequest) {
return fetchRequest.method === "GET" && fetchRequest.destination === "image";
ichux /
Last active November 5, 2018 09:32
send localmails
import email.utils
import smtplib
from email.mime.text import MIMEText
# Create the message
msg = MIMEText('Hello SMTPD!')
msg['To'] = email.utils.formataddr(("Local Mail", "localmail@localhost"))
msg['From'] = email.utils.formataddr(('Chukwudi Nwachukwu', 'chukwudinwachukwu@localhost'))
msg['Subject'] = 'Local mail using SMTP'