Install, build and debug a react native app in WSL2 (Windows Subsystem for Linux) and Ubuntu.
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
# First let's update all the packages to the latest ones with the following command | |
sudo apt update -qq | |
# Now we want to install some prerequisite packages which will let us use HTTPS over apt | |
sudo apt install apt-transport-https ca-certificates curl software-properties-common -qq | |
# After that we will add the GPG key for the official Docker repository to the system | |
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add - | |
# We will add the Docker repository to our APT sources |
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
var express = require('express'); | |
var passport = require('passport'); | |
var Strategy = require('passport-openidconnect').Strategy; | |
// Configure the OpenID Connect strategy for use by Passport. | |
// | |
// OAuth 2.0-based strategies require a `verify` function which receives the | |
// credential (`accessToken`) for accessing APIs on the user's behalf, along | |
// with the user's profile. The function must invoke `cb` with a user object, |
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
const fs = require('fs'); | |
const fetch = require('node-fetch'); | |
const FormData = require('form-data'); | |
const filePath = `path/to/file.ext`; | |
const form = new FormData(); | |
const stats = fs.statSync(filePath); | |
const fileSizeInBytes = stats.size; | |
const fileStream = fs.createReadStream(filePath); | |
form.append('field-name', fileStream, { knownLength: fileSizeInBytes }); |
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
// Run this in the F12 javascript console in chrome | |
// if a redirect happens, the page will pause | |
// this helps because chrome's network tab's | |
// "preserve log" seems to technically preserve the log | |
// but you can't actually LOOK at it... | |
// also the "replay xhr" feature does not work after reload | |
// even if you "preserve log". | |
window.addEventListener("beforeunload", function() { debugger; }, false) |
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
#!/usr/bin/env node | |
/** | |
* Install: | |
* | |
* Download this file and give it executuable persmissions | |
* | |
* Usage: | |
* | |
* Uploading documents |
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
#!/usr/bin/env node | |
/** | |
* Install: | |
* | |
* Download this file and give it executuable persmissions | |
* | |
* Usage: | |
* | |
* Uploading documents |
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 | |
ai | |
am | |
an | |
ang | |
anh | |
ao | |
au | |
ay | |
ba |
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 | |
ai | |
am | |
an | |
ang | |
anh | |
ao | |
au | |
ay | |
ba |
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
DELIMITER // | |
DROP PROCEDURE IF EXISTS `auto_partition_manager`; | |
CREATE DEFINER = `root` @`localhost` PROCEDURE `auto_partition_manager`( | |
in partition_frequency varchar(100), | |
in db_schema varchar(100), | |
in input_table_name varchar(100), | |
in partition_column varchar(100) | |
) BEGIN -- Author - Code Monk |