Skip to content

Instantly share code, notes, and snippets.

View xdevmaycry's full-sized avatar
🎯
Focusing

devmaycry xdevmaycry

🎯
Focusing
View GitHub Profile
@xdevmaycry
xdevmaycry / createProvider.js
Created May 5, 2020 07:16 — forked from ArcanisCz/createProvider.js
React Error Boundary, which can catch Component + Redux + Saga errors
/*
* Usage:
* const AppProvider = createProvider(rootReducer, rootSaga);
* ...
* <AppProvider>
* <AppComponent>
* </AppProvider>
*/
const createProvider = (reducer, saga) => {
const sagaMiddleware = createSagaMiddleware();
@xdevmaycry
xdevmaycry / nginx.conf
Created February 22, 2019 06:24 — forked from plentz/nginx.conf
Best nginx configuration for improved security(and performance). Complete blog post here http://tautt.com/best-nginx-configuration-for-security/
# to generate your dhparam.pem file, run in the terminal
openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048
@xdevmaycry
xdevmaycry / mysql-docker.sh
Last active November 1, 2018 20:57 — forked from spalladino/mysql-docker.sh
Backup and restore a mysql database from a running Docker mysql container
###############
# MODIFIED FOR SECURITY
#
# This assumes we have the following environmental variables setup through docker composer configuration
# MYSQL_DB
# MYSQL_USER
# MYSQL_PASSWORD
###############
# Backup
" show hidden characters in Vim
:set list
" settings for hidden chars
" what particular chars they are displayed with
:set lcs=tab:▒░,trail:▓
" or
:set listchars=tab:▒░,trail:▓
" used \u2592\u2591 for tab and \u2593 for trailing spaces in line.
" In Vim help they suggest using ">-" for tab and "-" for trail.