Skip to content

Instantly share code, notes, and snippets.


Juan Latorre juanlatorre

View GitHub Profile
View Chakra-UI x

Tiny wrapper component for React-Datepicker to stylistically fit with Chakra-UI 1.x.

<DatePicker selectedDate={myDate} onChange={(d) => console.log(d)} />

Clearable version:

<DatePicker selectedDate={myDate} onChange={(d) => console.log(d)} isClearable={true} />
View @chakra-ui+toast+1.0.0-rc.7.patch
diff --git a/node_modules/@chakra-ui/toast/dist/esm/toast-manager.js b/node_modules/@chakra-ui/toast/dist/esm/toast-manager.js
index f64ed90..af3e367 100644
--- a/node_modules/@chakra-ui/toast/dist/esm/toast-manager.js
+++ b/node_modules/@chakra-ui/toast/dist/esm/toast-manager.js
@@ -119,9 +119,18 @@ export class ToastManager extends React.Component {
var position = getToastPosition(prevState, id);
if (!position) return prevState;
return _extends({}, prevState, {
- [position]: prevState[position].map(toast => _extends({}, toast, {
- requestClose: === id ? true : toast.requestClose
juanlatorre /
Last active Jul 29, 2020
Fix ADB version not matching
$ adb kill-server
$ sudo cp ~/Android/Sdk/platform-tools/adb /usr/bin/adb
$ sudo chmod +x /usr/bin/adb
$ adb start-server
juanlatorre / particles.json
Created May 14, 2020
JSON config for particles.json
View particles.json
"particles": {
"number": {
"value": 80,
"density": {
"enable": true,
"value_area": 800
"color": {
juanlatorre /
Created Feb 13, 2020 — forked from PurpleBooth/
A template to make good

Project Title

One Paragraph of project description goes here

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.


View NoIfSlider.js
const imageData = [ 'image1.png', 'img2.png', 'img3.png' ];
const currentImage = 0;
const handleImageChange = (direction) => {
if (direction == 'forward')
currentImage = (currentImage + 1) % imageData.length;
currentImage = (currentImage - 1 + imageData.length) % imageData.length;
juanlatorre / iterifyArray.js
Last active Jun 21, 2019
wrapper to add .next() and .prev() and current() to array, without prototype
View iterifyArray.js
const iterifyArr = function(arr) {
var cur = 0; = function() {
if (++cur <= this.length - 1) {
return this[cur];
} else {
cur = 0;
return this[cur];
juanlatorre / namecheap
Created Jun 15, 2019 — forked from Shourai/namecheap
Letsencrypt SSL certificate with namecheap hosting
View namecheap


The “Positive SSL” certificate I bought along with my domain is invalid with any of my subdomains and cannot be used with wildcards. One annoying thing is that namecheap doesn’t offer auto installation of free let’s encrypt certificates, even though, they are saying “Namecheap is dedicated to data security and privacy for all internet users. We believe the movement to encrypt nearly all web traffic is a positive direction. As more sites embrace HTTPS and use of security products, providers of free SSL are beginning to come online.”

Let me show you what it needs to be done in order to “encrypt nearly all web traffic”.

First, not required but it’s helpful to enable ssh access, it is not enabled by default on the base hosting plans, just go an start a live chat and request ssh access.

View gist:40092fc6f777fa2f1877e2ff229f0db1
<!doctype html>
<title>Site Maintenance</title>
body { text-align: center; padding: 150px; }
h1 { font-size: 50px; }
body { font: 20px Helvetica, sans-serif; color: #333; }
article { display: block; text-align: left; width: 650px; margin: 0 auto; }
a { color: #dc8100; text-decoration: none; }
a:hover { color: #333; text-decoration: none; }
juanlatorre /
Created Mar 11, 2019 — forked from eliangcs/
Cheatsheet: pyenv, virtualenvwrapper, and pip

Cheatsheet: pyenv, virtualenvwrapper, and pip

Installation (for Mac OS)

Install pyenv with brew

brew update
brew install pyenv