Skip to content

Instantly share code, notes, and snippets.

View 6ewis's full-sized avatar

Lewis 6ewis

  • Toronto, Ontario
View GitHub Profile
@6ewis
6ewis / SpeedTest.js
Created April 5, 2022 22:02 — forked from mjm918/SpeedTest.js
React native check internet speed
export const fetchParallel = (link,header, callback) =>{
const POOR = 150;
const MODERATE = 550;
const GOOD = 2000;
const _start = new Date().getTime();
const speedTester = RNFetchBlob
.config({
@6ewis
6ewis / profanity-check
Created December 1, 2020 15:15
bad words
2g1c
2 girls 1 cup
acrotomophilia
alabama hot pocket
alaskan pipeline
anal
anilingus
anus
apeshit
arsehole
@6ewis
6ewis / build.gradle
Last active August 7, 2020 01:47
module app
/*
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
/*
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
@6ewis
6ewis / docker-compose.yml
Created May 28, 2020 02:17
docker compose sample
version: '3.7'
services:
main:
container_name: main
build:
context: .
target: development
volumes:
- .:/usr/src/app
@6ewis
6ewis / docker-compose.yml
Created May 22, 2020 02:33
Config to Run nest and mysql
version: '3.7'
services:
main:
container_name: main
build:
context: .
target: development
volumes:
- .:/usr/src/app
@6ewis
6ewis / babel-webpack.md
Created May 15, 2019 06:55 — forked from ncochard/babel-webpack.md
The correct way to compile ES6 using babel...

When you create a npm package, remember it might be used in a browser or a server, or even a command line utility… For each package you create, please pay attention at what it will be used for:

  1. Is it going to be used as a dependency to a nodejs application that is not bundled? (e.g. command line utilities)
  2. Is it going to be used as a dependency to a nodejs application that is bundled? (e.g. AWS Lambdas)
  3. Is it going to be used as a dependency to a browser application (always bundled)?.
  • In cases 2) and 3) you want to allow for tree shaking.
  • In cases 1) and 2) you want to benefit from the "ES6"/"ES next" features supported natively by nodejs.
  • In case 3) you also want to benefit from the native support of "ES6" from your browser.
@6ewis
6ewis / ramda-title-case.js
Created January 22, 2019 16:46 — forked from mrwithersea/ramda-title-case.js
Ramda Title Case
import R from 'ramda';
const capitalize =
R.converge(
R.concat(),
[
R.compose(
R.toUpper,
R.head
),
@6ewis
6ewis / aws
Created November 21, 2018 17:43
s3 lambda permission
{
"Action": [
"s3:*",
],
"Effect": "Allow",
"Resource": [
"${module.s3_lambda_els_bucket.bucket_arn}",
]
}
@6ewis
6ewis / example.txt
Last active January 13, 2018 08:44
using reduce for updating nested object vs destructuring
image