This file contains hidden or 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
## Git Update Alias | |
You can create a Git alias to easily update your fork by synchronizing it with the original repository (upstream). The alias performs a series of commands to fetch the latest changes from upstream, merge them into your fork, and push the changes to your remote repository. | |
### 1. **Set up the Alias** | |
Run the following command in your terminal to define the `git update` alias: | |
```bash | |
git config --global alias.update '!f() { git fetch upstream && git merge upstream/main && git push origin main; }; f' |
This file contains hidden or 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
docker pull redis:7.4.2-alpine3.21 | |
docker pull postgres:17.4-alpine3.21 | |
# run | |
docker run --name dev-redis -d -p 6379:6379 redis:7.4.2-alpine3.21 | |
docker run --name dev-postgres -d -p 5432:5432 -e POSTGRES_USER=postgres -e POSTGRES_PASSWORD=postgres postgres:17.4-alpine3.21 | |
docker run --name dev-mail -d -p 1080:1080 -p 1025:1025 marlonb/mailcrab:latest | |
# connect | |
DATABASE_POSTGRES_URL=postgres://postgres:postgres@localhost:5432/postgres | |
REDIS_URL=redis://localhost:6379 |
This file contains hidden or 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
diskutil list | |
diskutil unmountDisk /dev/disk2 | |
diskutil eraseDisk FAT32 SANDISK /dev/disk2 |
This file contains hidden or 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
// #1 | |
function logWrapper(fn: Function) { | |
return function (...args: any[]) { | |
console.log(`Calling function with args: ${args}`); | |
return fn(...args); | |
}; | |
} |
This file contains hidden or 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
import { animate } from 'motion' | |
import type { AnimationPlaybackControls, ValueAnimationOptions } from 'motion/react' | |
import { | |
type VNode, | |
computed, | |
defineComponent, | |
h, | |
mergeProps, | |
reactive, | |
useAttrs, |
This file contains hidden or 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
-- Based off IETF draft, https://datatracker.ietf.org/doc/draft-peabody-dispatch-new-uuid-format/ | |
create or replace function uuid_generate_v7() | |
returns uuid | |
as $$ | |
begin | |
-- use random v4 uuid as starting point (which has the same variant we need) | |
-- then overlay timestamp | |
-- then set version 7 by flipping the 2 and 1 bit in the version 4 string | |
return encode( |
This file contains hidden or 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
import { Client, createClient, dedupExchange, errorExchange, fetchExchange, ssrExchange } from '@urql/core' | |
import { ref } from 'vue' | |
import { devtoolsExchange } from '@urql/devtools' | |
import * as Session from 'supertokens-web-js/recipe/session' | |
import { authExchange } from '@urql/exchange-auth' | |
import { defineNuxtPlugin } from '#app' | |
const ssrKey = '__URQL_DATA__' | |
export default defineNuxtPlugin((nuxtApp) => { |
This file contains hidden or 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
{ | |
type: 'FeatureCollection', | |
features: [ | |
{ | |
type: 'Feature', | |
properties: { | |
asdas: 'asdas', | |
}, | |
geometry: { | |
type: 'Polygon', |
NewerOlder