Skip to content

Instantly share code, notes, and snippets.

View nnajiabraham's full-sized avatar

Abraham Nnaji nnajiabraham

  • WInnipeg Manitoba Canada
View GitHub Profile

How-to: Migrating repos on Github to a monorepo

To avoid peppering too many opinions in this “how to” guide, I’ve written a separate “opinion-piece” article on monorepos — you can read it here: https://medium.com/streamdal/mostly-terrible-the-monorepo-5db704f76bdb

Sometime in early Dec 2023, our team decided to migrate ~10 public repositories for an OSS project to a monorepo.

This article provides a “rough” outline for the meatiest parts of the migration.

Good luck! 🤞

Contract Killer 3

Revised date: 07/11/2012

Between us [company name] and you [customer name]

Summary:

We’ll always do our best to fulfil your needs and meet your expectations, but it’s important to have things written down so that we both know what’s what, who should do what and when, and what will happen if something goes wrong. In this contract you won’t find any complicated legal terms or long passages of unreadable text. We’ve no desire to trick you into signing something that you might later regret. What we do want is what’s best for both parties, now and in the future.

@nnajiabraham
nnajiabraham / The Rules.md
Created October 10, 2020 18:47 — forked from sebmarkbage/The Rules.md
The Rules of React

The Rules of React

All libraries have subtle rules that you have to follow for them to work well. Often these are implied and undocumented rules that you have to learn as you go. This is an attempt to document the rules of React renders. Ideally a type system could enforce it.

What Functions Are "Pure"?

A number of methods in React are assumed to be "pure".

On classes that's the constructor, getDerivedStateFromProps, shouldComponentUpdate and render.

@nnajiabraham
nnajiabraham / spring.boot.90mb.Dockerfile
Created September 22, 2020 04:37 — forked from dvsingh9/spring.boot.90mb.Dockerfile
Spring boot ultra slim (less than 90 mb) docker build script
# (1) use Alpine Linux for build stage
FROM alpine:3.11.3 as build
# (2) install build dependencies
RUN apk --no-cache add openjdk11
RUN apk --no-cache add maven
# build JDK with less modules
RUN /usr/lib/jvm/default-jvm/bin/jlink \
--compress=2 \
--module-path /usr/lib/jvm/default-jvm/jmods \
@nnajiabraham
nnajiabraham / AndroidFileStorage.js
Created July 15, 2020 07:43 — forked from robwalkerco/AndroidFileStorage.js
An alternative redux-persist storage for React Native Android to get around the database item size limit - https://github.com/rt2zz/redux-persist/issues/284
/**
* @flow
*/
import RNFetchBlob from 'react-native-fetch-blob'
const DocumentDir = RNFetchBlob.fs.dirs.DocumentDir
const storagePath = `${DocumentDir}/persistStore`
const encoding = 'utf8'
@nnajiabraham
nnajiabraham / AndroidEncryptedMP3LocalHTTPServer.java
Created July 10, 2020 14:03 — forked from thedumbtechguy/AndroidEncryptedMP3LocalHTTPServer.java
A Local HTTP Streaming Server (LocalHTTPServer) for Android. This version was specifically made to stream encrypted MP3 files using a CipherInputStream to MediaPlayer but should be easily modified to work on ordinary files. It has been tested on API 9+ and works fine on large files (tested on up to 20MB files) and also supports range requests. I…
import java.io.BufferedOutputStream;
import java.io.BufferedReader;
import java.io.ByteArrayInputStream;
import java.io.EOFException;
import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStream;
var mediaJSON = { "categories" : [ { "name" : "Movies",
"videos" : [
{ "description" : "Big Buck Bunny tells the story of a giant rabbit with a heart bigger than himself. When one sunny day three rodents rudely harass him, something snaps... and the rabbit ain't no bunny anymore! In the typical cartoon tradition he prepares the nasty rodents a comical revenge.\n\nLicensed under the Creative Commons Attribution license\nhttp://www.bigbuckbunny.org",
"sources" : [ "http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4" ],
"subtitle" : "By Blender Foundation",
"thumb" : "images/BigBuckBunny.jpg",
"title" : "Big Buck Bunny"
},
{ "description" : "The first Blender Open Movie from 2006",
"sources" : [ "http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/ElephantsDream.mp4" ],
COMMAND + SHIFT + .
@nnajiabraham
nnajiabraham / string-methods
Created April 21, 2019 00:05
startsWith() endsWith() includes() repeat()
const course = "RFB2";
const flightNumber = "20-AC2018-jz";
const accountNumber = "825242631RT0001";
const make = "BMW";
const model = "x5";
const color = "Blue";
// startsWith()
course.startsWith("RFB"); //returns true or false. IS NOT CASE SENSITIVE. This would return true. 'rfb' would return false