This describes all of the possible configuration options ín your todesktop.json.
To avoid confusion, the following terms will be used throughout this file:
- "Project root": this is the parent directory of your
todesktop.json.
| # Specify these vars first | |
| export CLOUDFLARE_ACCOUNT_ID=24bac... | |
| export CLOUDFLARE_API_TOKEN=eGCxnU... | |
| # then derive the AWS S3 credentials | |
| export AWS_ACCESS_KEY_ID=$(curl -s https://api.cloudflare.com/client/v4/user/tokens/verify -H "Authorization: Bearer $CLOUDFLARE_API_TOKEN" | jq -r '.result.id') | |
| export AWS_SECRET_ACCESS_KEY=$(echo -n $CLOUDFLARE_API_TOKEN | shasum -a 256 | awk '{print $1}') | |
| export AWS_ENDPOINT_URL=https://$CLOUDFLARE_ACCOUNT_ID.r2.cloudflarestorage.com | |
| # output the credentials |
| # Function to create and manage git worktrees | |
| # 1. If the the current projects folder doesn't contain a subdirectory named "worktrees" then create it and add it to gitignore in the current project. | |
| # 2. Create a git worktree and branch named feature-name (which was passed via the wtree alias argument) from the main project folder and save it inside the worktrees folder. | |
| # 3. If there is a .env, prod.env or dev.env in the main project folder then copy it over to the worktrees folder. | |
| # 4. Open the new feature-name worktree folder in a new window using Cursor. | |
| wtree() { | |
| # Check if a feature name was provided as an argument | |
| if [ -z "$1" ]; then | |
| # Print error message if no argument was provided | |
| echo "Error: Please provide a feature name" |
| # -*- coding: utf-8 -*- | |
| """ | |
| This script will delete all of the tweets in the specified account. | |
| You may need to hit the "more" button on the bottom of your twitter profile | |
| page every now and then as the script runs, this is due to a bug in twitter. | |
| You will need to get a consumer key and consumer secret token to use this | |
| script, you can do so by registering a twitter application at https://dev.twitter.com/apps | |
| @requirements: Python 2.5+, Tweepy (http://pypi.python.org/pypi/tweepy/1.7.1) |
| const transitionToPromise = (el, property, value) => | |
| new Promise(resolve => { | |
| el.style[property] = value; | |
| const transitionEnded = e => { | |
| if (e.propertyName !== property) return; | |
| el.removeEventListener('transitionend', transitionEnded); | |
| resolve(); | |
| } | |
| el.addEventListener('transitionend', transitionEnded); | |
| }); |
| const { app, BrowserWindow, nativeImage, Tray } = require('electron') | |
| let tray | |
| function createTray() { | |
| tray = new Tray(nativeImage.createEmpty()) | |
| // ❌ Doesn't work | |
| console.log('sync', tray.getBounds()) |
| Promise.race([ | |
| fetch('/foo'), | |
| new Promise((_, reject) => | |
| setTimeout(() => reject(new Error('Timeout')), 7000) | |
| ) | |
| ]); |
| # From https://discussions.apple.com/thread/8115237 | |
| from time import sleep | |
| while True: | |
| sleep(0.00002) |
I hereby claim:
To claim this, I am signing this object:
| // only polyfill .finished in browsers that already support animate() | |
| if (document.body.animate) { | |
| // Chrome does not seem to expose the Animation constructor globally | |
| if (typeof Animation === 'undefined') { | |
| window.Animation = document.body.animate({}).constructor; | |
| } | |
| if (!('finished' in Animation.prototype)) { | |
| Object.defineProperty(Animation.prototype, 'finished', { |