I hereby claim:
- I am charltoons on github.
- I am charltoons (https://keybase.io/charltoons) on keybase.
- I have a public key ASDi__r_5c91VtKe9HJyhdFURdpNa7toAbHmhdehsOy-Mgo
To claim this, I am signing this object:
| export function useOnlineStatusChange( | |
| onOnline: () => void, | |
| onOffline: () => void | |
| ) { | |
| return useSyncExternalStore( | |
| (callback) => { | |
| window.addEventListener('online', onOnline); | |
| window.addEventListener('online', callback); | |
| window.addEventListener('offline', onOffline); | |
| window.addEventListener('offline', callback); |
| // This is a partial script to get the Table of the current record. | |
| // It allows you to avoid hardcoding the table name in `base.getTable()`. | |
| // You need to set up an input of the current Record URL using the name `recordUrl`. | |
| const inputConfig = input.config() | |
| const recordUrl = new URL(inputConfig.recordUrl) | |
| const tableId = recordUrl.pathname.split('/')[2] | |
| const table = base.getTable(tableId) |
I hereby claim:
To claim this, I am signing this object:
| # play with "3000k" until you are comfortable with video quality and filesize | |
| ffmpeg -i input.mp4 -threads 8 -b:v 3000k -strict experimental -vf scale=2500:-1 output.mp4 |
| MY_PRIVATE_KEY="-----BEGIN PRIVATE KEY-----\nABC...123=\n-----END PRIVATE KEY-----\n" | |
| now secret add my-private-key $(echo $MY_PRIVATE_KEY | base64) |
| Verifying my Blockstack ID is secured with the address 16MerBn16CxqEb7xZaXzCeHNM9d299HJYA https://explorer.blockstack.org/address/16MerBn16CxqEb7xZaXzCeHNM9d299HJYA |
| 'use strict'; | |
| exports.handler = (event, context, callback) => { | |
| console.log('Received event:', JSON.stringify(event, null, 2)) | |
| const modifiedEvent = event | |
| // check that we're acting on the right trigger | |
| if (event.triggerSource === "PreSignUp_SignUp"){ | |
| // auto confirm the user |
| #!/bin/sh | |
| palette="/tmp/palette.png" | |
| filters="fps=12,scale=768:-1:flags=lanczos" | |
| ffmpeg -v warning -i $1 -vf "$filters,palettegen" -y $palette | |
| ffmpeg -v warning -i $1 -i $palette -lavfi "$filters [x]; [x][1:v] paletteuse" -y /tmp/gif.gif | |
| gifsicle -O3 --no-extensions -o $2 --dither --colors 256 /tmp/gif.gif |
| ####################################### | |
| ############## HOMEBREW ############### | |
| ####################################### | |
| printf "\n\n---> Updating Homebrew\n" | |
| # update homebrew | |
| brew update | |
| # update all homebrew packages |
| function colorInBetween(color1, color2){ | |
| function toNumber(hexStr){ return parseInt('0x'+hexStr); } | |
| function toColorObject(color){ | |
| var obj = {}; | |
| obj.red = toNumber(color.slice(1,3)); | |
| obj.green = toNumber(color.slice(3,5)); | |
| obj.blue = toNumber(color.slice(5,7)); | |
| return obj; | |
| } | |
| function getAverage(val1, val2){ |