Tiny wrapper component for React-Datepicker to stylistically fit with Chakra-UI 1.x.
<DatePicker selectedDate={myDate} onChange={(d) => console.log(d)} />
/* eslint-disable no-underscore-dangle */ | |
import React from 'react'; | |
import Select, { components as selectComponents, Props as SelectProps } from 'react-select'; | |
import { | |
Flex, | |
Tag, | |
TagCloseButton, | |
TagLabel, | |
Divider, | |
CloseButton, |
Tiny wrapper component for React-Datepicker to stylistically fit with Chakra-UI 1.x.
<DatePicker selectedDate={myDate} onChange={(d) => console.log(d)} />
const imageData = [ 'image1.png', 'img2.png', 'img3.png' ]; | |
const currentImage = 0; | |
const handleImageChange = (direction) => { | |
if (direction == 'forward') | |
currentImage = (currentImage + 1) % imageData.length; | |
else | |
currentImage = (currentImage - 1 + imageData.length) % imageData.length; | |
} |
#!/bin/sh | |
URL="https://0x0.st" | |
if [ $# -eq 0 ]; then | |
echo "Usage: 0x0.st FILE\n" | |
exit 1 | |
fi | |
FILE=$1 |
Today, I found how to fix my Cloud II horrible boosted treble and very little bass problem. | |
1. Download and install Equalizer APO from | |
https://sourceforge.net/p/equalizerapo/ | |
2. During installation, select HyperX Cloud II from the playback devices available and hit OK. | |
3. Open Equalizer APO Configuration Editor from the start menu. | |
4. Inside 'config.txt' window, delete the three default presets. (click the red minuses) |
source: https://savedlog.com/uncategorized/letsencrypt-ssl-certificate-namecheap-hosting/
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.
curl -I -X OPTIONS \ | |
-H "Origin: http://EXAMPLE.COM" \ | |
-H 'Access-Control-Request-Method: GET' \ | |
http://EXAMPLE.COM/SOMETHING 2>&1 | grep 'Access-Control-Allow-Origin' |
# Magikarp Jump | |
# Expert League 3 Automated Clicker | |
# | |
# Notes: | |
# | |
# All tap positions are hardcoded to my OnePlus3. | |
# Please re-adjust positions if phone resolution is different. | |
# | |
# Any league-triggered event will interrupt this script. | |
# It is best that level is maxed out before starting the league. |
onDrop = (acceptedFiles, rejectedFiles) => { | |
const file = acceptedFiles.find(f => f) | |
const i = new Image() | |
i.onload = () => { | |
let reader = new FileReader() | |
reader.readAsDataURL(file) | |
reader.onload = () => { | |
console.log({ | |
src: file.preview, |
/** | |
* Multi-filter an array of objects | |
* @param {Array} array : list of elements to apply a multiple criteria filter | |
* @param {Object} filters: Contains multiple criteria filters by the property names of the objects to filter | |
* @return {Array} | |
*/ | |
function multiFilter(array, filters) { | |
let filterKeys = Object.keys(filters); | |
// filters all elements passing the criteria | |
return array.filter((item) => filterKeys.every((key) => (filters[key].indexOf(item[key]) !== -1))); |