<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 22.0.1, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
viewBox="0 0 100 100" style="enable-background:new 0 0 100 100;" xml:space="preserve">
<g>
<path d="M99,1v98H1V1H99 M100,0H0v100h100V0L100,0z"/>
</g>
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
#!/bin/bash | |
#### Created by Jean-Pierre Fourie | |
#### Editted by Franklin Harvey | |
### https://github.com/emotality | |
### https://github.com/franklinharvey | |
## force_empty_trash.sh | |
# | |
clear | |
echo " " |
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 BASE_TIMEOUT = 5 // in milliseconds, you can change this | |
const getTimeout = (attempt: number): number => { | |
const backoff = BASE_TIMEOUT * Math.pow(2, attempt) // exp. increases the timeout per attempt | |
const backoff_or_cap = Math.min(1000, backoff) // cap the timeout at 1 sec. | |
const ret = sample([0, backoff_or_cap]) // randomly choose between 0 and the backoff, this is the "jitter" part | |
return ret | |
} | |
// randomly choose from an array, a replacement of lodash's sample method | |
const sample = (arr: number[]) => { |
I hereby claim:
- I am franklinharvey on github.
- I am frankfrank (https://keybase.io/frankfrank) on keybase.
- I have a public key ASB-O9aIr7bp-ZeNwSB92ZxTep-Gy_FklxWGVeOgto-cWAo
To claim this, I am signing this 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 dateFields=document.getElementsByClassName("blog-date"),monthNames=["January","February","March","April","May","June","July","August","September","October","November","December"],transformDate=e=>{const t=new Date(e.innerHTML);return`${t.getDate()} ${monthNames[t.getMonth()]} ${t.getFullYear()}`};dateFields.forEach(e=>{e.innerHTML=transformDate(e)}); |
Kind of a barebones approach to draggable markers, saving the new position in state By Franklin Harvey
interface MarkerProps {
position: google.maps.LatLng
onDragMarker(e: google.maps.MouseEvent): void
}