This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// @flow | |
// Inspired by: https://github.com/davidchambers/Base64.js/blob/master/base64.js | |
const chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/='; | |
const Base64 = { | |
btoa: (input:string = '') => { | |
let str = input; | |
let output = ''; | |
for (let block = 0, charCode, i = 0, map = chars; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Handling pagination with React hooks | |
// React | |
// By Precious Akin | |
import React, { | |
useEffect, useState | |
} from 'react'; | |
const Page = () => { | |
const [page, setPage] = useState(1); // first page | |
const [totalPages, setTotalPages] = useState(0); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
A server-side implementation module for push notifications | |
utilizing firebase SDK | |
Reference https://firebase.google.com/docs/reference/admin/python/ | |
By Precious Akin""" | |
from app import app |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Configure various url rules per environment | |
* Use `envSelector` and createSelector hooks to load env.json file | |
* By Precious Akin | |
*/ | |
import { createSelector } from 'reselect'; | |
import ENV_FILE from '../../env.json'; | |
const envSelector = () => ENV_FILE; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ReactJS ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓░░░░░░ | |
Python ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓░░░ | |
HTML/CSS ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓░░░ | |
MongoDB ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓░░░░░░░░░░ | |
NodeJs ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓░░░░░ | |
GraphQL ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓░░░░░░░ | |
.sh ▓▓▓▓▓▓▓▓▓▓▓▓▓░░░░░░░░░░░░░ | |
PostgreSQL ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓░░░░░░ | |
C/Rust ▓▓▓▓▓▓▓▓▓▓▓▓▓▓░░░░░░░░░░░░ | |
VueJS ▓▓▓▓▓▓▓▓▓░░░░░░░░░░░░░░░░ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
__doc__ = """ | |
NLP module to convert speech-to-text, can be used | |
for extracting audio files, voice commands. | |
requires speech_recognition toolset for NLP. | |
Only works with English Language | |
By Precious Akin | |
""" | |
import speech_recognition as recognize | |
class Duoligot: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
''' | |
Use 'passlib' for password encryption and make the perfect round algo. ;) | |
Required: pip install passlib | |
''' | |
from passlib.context import CryptContext | |
pwd_context = CryptContext( | |
schemes=["pbkdf2_sha256"], | |
default="pbkdf2_sha256", | |
pbkdf2_sha256__default_rounds=30000 | |
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
__doc__ = ''' | |
~TimeDogg~ | |
Used by @Classboard for reminding folks to attend online classes ;( | |
- Use of `private` modifiers to prevent aliens from invading | |
- typechecking following Python 3.x standards | |
- This is not @facts or @uberfacts... | |
don't ever ever try to call private class members from the outside world | |
or I would .ssh ya! | |
Author: Precious Akin |