I just published a blog post with a few other options and info on decluttering Google's search results page.
😡😡😡
/** | |
* React-Native cross-platform elevations. | |
* Based on https://ethercreative.github.io/react-native-shadow-generator/ | |
* | |
* Usage: | |
* 1. Import "elevations" from this file | |
* import { elevations } from "config/elevations"; | |
* 2. Use it. Assuming you need an elevation of 2 (based on the Android | |
* elevation standard), doing the following will cast the same shadow | |
* on both platforms: |
import tinycolor from "tinycolor2"; | |
import { useColorScheme } from "react-native-appearance"; | |
const primaryColor = "#171520"; | |
const palette = new Array(10).fill(primaryColor).map((color, index) => | |
tinycolor(color) | |
.brighten(index * 10) | |
.toString() | |
); |
import React, { FC, useRef } from "react"; | |
import { StyleSheet, Animated, TouchableWithoutFeedback } from "react-native"; | |
import { Text } from "pg-common"; | |
import { useAnimation, useOnMount, scale, delay } from "pg-utils"; | |
import { animations, metrics, colors } from "pg-design"; | |
import { credits } from "pg-config"; | |
const asyncAnimationStart = (anim: Animated.CompositeAnimation) => | |
new Promise(resolve => anim.start(resolve)); |
import { PixelRatio, Dimensions } from "react-native"; | |
const isTabletLike = () => { | |
const pixelDensity = PixelRatio.get(); | |
const adjustedWidth = Dimensions.get("screen").width * pixelDensity; | |
const adjustedHeight = Dimensions.get("screen").height * pixelDensity; | |
return ( | |
(pixelDensity < 2 && (adjustedWidth >= 1000 || adjustedHeight >= 1000)) || | |
(pixelDensity === 2 && (adjustedWidth >= 1920 || adjustedHeight >= 1920)) | |
); |
I just published a blog post with a few other options and info on decluttering Google's search results page.
😡😡😡
#!/bin/bash | |
input="input.mp4" | |
output="output.mp4" | |
color="black" | |
while getopts ":i:o:w:h:c:" opt; do | |
case $opt in | |
i) input="$OPTARG" | |
;; |
Reloading a page won't update/remove the previous version of its service worker. To make sure you're using the latest version of your service worker, make sure to check the "Update on reload" toggle in the "Application" ⭢ "Service Workers" section of the Chrome DevTools.
To simulate a network condition (e.g.: offline, 3g, etc...) in a service worker on Chrome, uncheck the "Update on reload" toggle.
// Just a Deno script that bumps an NPM dependency of the project | |
// in the current directory. | |
// Might be helpful if you need to automate the bumping of a | |
// dependency across multiple repos. | |
// It: | |
// - Makes sure you start from a clean state | |
// - Auto-detects if using yarn or npm | |
// - Creates, commits, and pushes the changes in a separate branch | |
import * as Colors from "https://deno.land/std/fmt/colors.ts"; | |
import yargs from "https://deno.land/x/yargs/deno.ts"; |
<html> | |
<body> | |
<link | |
rel="stylesheet" | |
href="https://unpkg.com/[email protected]/build/pure-min.css" | |
integrity="sha384-Uu6IeWbM+gzNVXJcM9XV3SohHtmWE+3VGi496jvgX1jyvDTXfdK+rfZc8C1Aehk5" | |
crossorigin="anonymous" | |
id="purecss" | |
/> | |
<p>Hello world</p> |
// Deno CLI script to add reminders to Apple's Reminders app parsing the | |
// due date with natural language. | |
// Requires reminders-cli (https://github.com/keith/reminders-cli) to be | |
// installed in order to run. Uses reminders-cli instead of Applescript/JXA | |
// because reminders-cli is much faster. | |
// Uses chrono-node (https://github.com/wanasit/chrono) to parse the date (which | |
// in my opinion works better than reminders-cli natural lanaguage parser). | |
// | |
// Example usage: | |
// ``` |