Skip to content

Instantly share code, notes, and snippets.

View koladev32's full-sized avatar
🏠
Working from home

Mangabo Kolawole koladev32

🏠
Working from home
View GitHub Profile
@koladev32
koladev32 / script.py
Created November 14, 2021 13:24
Download Youtube Video with Python
from pytube import YouTube
YouTube('https://youtu.be/dQw4w9WgXcQ').streams.first().download()
@FedericoTartarini
FedericoTartarini / commands_docusaurus_translation.md
Created March 28, 2021 06:10
Source code for the YouTube video - Translate a Docusaurus website in multiple languages with its internationalization (i18n) support.

Initialize a new site

with npx @docusaurus/init@latest init website classic

Configure your site

i18n: {
    defaultLocale: 'en',
    locales: ['en', 'it'],
    localeConfigs: {
      en: {
@rmiyazaki6499
rmiyazaki6499 / deploy-django.md
Last active June 29, 2025 06:35
Deploying a Production ready Django app on AWS

Deploying a Production ready Django app on AWS

In this tutorial, I will be going over to how to deploy a Django app from start to finish using AWS and EC2. Recently, my partner Tu and I launched our app Hygge Homes (a vacation home rental app for searching and booking vacation homes based off Airbnb) and we wanted to share with other developers some of the lessons we learned along the way.

Following this tutorial, you will have an application that has:

  • An AWS EC2 server configured to host your application
  • SSL-certification with Certbot
  • A custom domain name
  • Continuous deployment with Github Actions/SSM Agent
@good-idea
good-idea / 0-readme.md
Last active March 29, 2023 21:00
SWR Lazy Hook

A simple hook to create a "lazy request" hook using swr.

! This isn't perfect !

The problem with the example below is that you need to know your variables when you call useLazyRequest. This might not work in all situations, for instance, if your component is getting the variables from state that might change. This could be fixed by putting the call to useLazyRequest within a child component that receives those variables as props.

See the typescript example below.

Not fully tested, I just wrote this on the fly. If you have any suggestions, please add them in a comment!

@chaiwa-berian
chaiwa-berian / Step 1: Create API User.MD
Last active July 18, 2025 19:19
Testing MTN MoMo Collection API in Sandbox using Postman

A. Checklist

  • To create an API User, you need the following things in place: X-Reference-Id and Ocp-Apim-Subscription-Key

1. X-Reference-Id

  • This is used as User ID since the Sandbox is a Mock Environment so we kinda create our own ids and send them over to the sandbox so it can uniquely identify the user
  • Get the value for this here: https://www.uuidgenerator.net/api/version4
  • Remember to keep this safely as we will use it when configuring our POST request
  • Lets say you have your X-Reference-Id as: 9f92971b-cd2e-4feb-9053-0b14d53ac4f5

2. Ocp-Apim-Subscription-Key

  • Get this from the Primary or Secondary Key of your Collections | Enable remote collection of bills, fees or taxes subscription.
"""TypedEnum : type preserving enumeration metaclass."""
class TypedEnum(type):
"""This metaclass creates an enumeration that preserves isinstance(element, type)."""
def __new__(mcs, cls, bases, classdict):
"""Discover the enum members by removing all intrinsics and specials."""
object_attrs = set(dir(type(cls, (object,), {})))
member_names = set(classdict.keys()) - object_attrs
member_names = member_names - set(name for name in member_names if name.startswith("_") and name.endswith("_"))
@velopert
velopert / useAsync.ts
Created July 27, 2019 16:54
useAsync written in TypeScript
import { useReducer, useEffect } from 'react';
type LoadingAction = {
type: 'LOADING';
};
type SuccessAction<T> = {
type: 'SUCCESS';
data: T;
};
@kenmori
kenmori / error Your lockfile.md
Last active July 22, 2025 17:59
error Your lockfile needs to be updated, but yarn was run with `--frozen-lockfile`

error Your lockfile needs to be updated, but yarn was run with `--frozen-lockfile`.

if you update your package.json only. and then run yarn install --frozen-lockfile

The above error show you on console.

it's say that you need to run just yarn install.

@xirixiz
xirixiz / Set up GitHub push with SSH keys.md
Last active October 22, 2025 16:15 — forked from developius/README.md
Set up GitHub push with SSH keys

SSH keypair setup for GitHub (or GitHub/GitLab/BitBucket, etc, etc)

Create a repo.

Make sure there is at least one file in it (even just the README.md)

Generate a SSH key pair (private/public):

ssh-keygen -t rsa -C "your_email@example.com"
@juampynr
juampynr / CHANGELOG.md
Created March 27, 2018 09:35
Sample CHANGELOG

Change Log

All notable changes to this project will be documented in this file.

The format is based on Keep a Changelog and this project adheres to Semantic Versioning.

[Unreleased] - yyyy-mm-dd

Here we write upgrading notes for brands. It's a team effort to make them as