Skip to content

Instantly share code, notes, and snippets.

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

Oyetoke Tobiloba CITGuru

🏠
Working from home
View GitHub Profile
@shalvah
shalvah / format.js
Last active January 20, 2022 14:08
Custom serialization format https://blog.shalvah.me/posts/serialization
// Note: this uses Node.js' `Buffer`, so it might not work in the browser
// You can use a polyfill or write yours.
const RED = [0xFF, 0, 0, 0xFF]; // R, G, B, A
const GREEN = [0, 0xFF, 0, 0xFF];
function serialize(val, outputBytes = []) {
if (typeof val === "string") {
serializeString(val, outputBytes);
} else {
@nzvtrk
nzvtrk / axiosInterceptor.js
Last active December 7, 2023 17:21
Axios create/recreate cookie session in node.js enviroment
/* Basic example of saving cookie using axios in node.js and session's recreation after expiration.
* We have to getting/saving cookie manually because WithCredential axios param use XHR and doesn't work in node.js
* Also, this example supports parallel request and send only one create session request.
* */
const BASE_URL = "https://google.com";
// Init instance of axios which works with BASE_URL
const axiosInstance = axios.create({ baseURL: BASE_URL });
@ejlp12
ejlp12 / EA_Start_Cobol.md
Last active April 11, 2020 19:24
Let's start developing COBOL on Mac OS-X

Install GnuCOBOL

brew install gnu-cobol

Install python and pip3, pyqt5 for OpenCobolIDE/HackEdit dependencies

brew install python3
brew install pyqt5 --with-python3