Skip to content

Instantly share code, notes, and snippets.

View Wxh16144's full-sized avatar
✡️

𝑾𝒖𝒙𝒉 Wxh16144

✡️
View GitHub Profile
@jeremy-code
jeremy-code / _Importexport Raycast preferences with GIt history.md
Last active December 3, 2025 10:02
Import/export Raycast preferences with GIt history

Raycast has a feature to import/export preferences in a .rayconfig file format. This isn't ideal for use in a dotfiles-esque Git repository since it would be difficult to compare changes with a compressed file. Also, unfortunately, syncing is only possible on a pro subscription and only through Raycast's cloud service.

To get a more useful JSON file from the .rayconfig (example shown in example.rayconfig.json), you will have to first have to export a decrypted version. Go to Settings > Extensions > Raycast > Export Settings & Data and under "Export Password," which by default is 12345678, you will want to delete that.

After that, run the "Export Settings & Data" command. You should be able to export all of the preferences (Settings, Extensions, Floating Notes, Script Directories, Snippets) except Quicklinks without setting a password.

Then, in terminal, run gzip --decompress --keep --suffix .rayconfig NAME_OF_FILE.rayconfig and you should get a JSON file similar to example.rayconfig.json.

After that,

"use client";
import { cache, unstable_postpone } from "react";
import { preload } from "react-dom";
const loadImage = cache((src: string) => {
return new Promise<void>((resolve, reject) => {
const img = new Image();
img.src = src;
@Wxh16144
Wxh16144 / .gitconfig
Last active December 13, 2024 09:46
oh-my-zsh
[user]
name = wuxh
email = wxh1220@gmail.com
signingkey = wuxh
[core]
excludesfile = /Users/wuxh/.gitignore_global
ignorecase = true
# ref: https://stackoverflow.com/a/36427485/11302760
# ref: https://code.visualstudio.com/docs/editor/versioncontrol#_vs-code-as-git-editor
editor = code --disable-extensions --wait
@sindresorhus
sindresorhus / esm-package.md
Last active December 5, 2025 20:00
Pure ESM package

Pure ESM package

The package that linked you here is now pure ESM. It cannot be require()'d from CommonJS.

This means you have the following choices:

  1. Use ESM yourself. (preferred)
    Use import foo from 'foo' instead of const foo = require('foo') to import the package. You also need to put "type": "module" in your package.json and more. Follow the below guide.
  2. If the package is used in an async context, you could use await import(…) from CommonJS instead of require(…).
  3. Stay on the existing version of the package until you can move to ESM.
@PradyumnaKrishna
PradyumnaKrishna / Commit Date.md
Last active September 25, 2025 11:32
Change Git Commit Date

Change Git Commit Date

  • Commit your git using

    git add -A
    git commit -m "commit message"
    
  • Change time or date of your latest commit

GIT_COMMITTER_DATE="Wed Sep 9 22:00 2020 +0530" git commit --amend --date="Wed Sep 9 22:00 2020 +0530"

@2KAbhishek
2KAbhishek / Shell_Keybindings.md
Last active December 8, 2025 22:07
Keyboard shortcuts for bash/zsh

Shell Keybindings

Navigation 🚀

Keybinding Action
Alt + f/b Move cursor to previous/next word
Ctrl + a/e Move cursor to beginning/end of command
Ctrl + xx Toggle between the start of line and current cursor position
@agarrharr
agarrharr / index.md
Last active August 13, 2024 09:50
Getting Started with Redux by Dan Abramov Notes

Redux Course

https://egghead.io/courses/getting-started-with-redux

Principles

  1. Single source of truth
    • Describe the state of the entire app in the state
  2. State is read-only
  • The state tree is redundant. You cannot modify it. Everytime you want to change the state, you dispatch an action.
@inexorabletash
inexorabletash / @ IndexedDB Full Text Search (Proof of Concept).md
Last active November 26, 2025 10:10
IndexedDB Full Text Search (Proof of Concept)

This demonstrates the implementation of full text search for documents in Indexed DB.

  • Word-breaking and stemming is used to create a list of terms for each document.
  • Document records are annotated with the list of terms when added to the database.
  • A multi-entry index on the list of terms is populated.
  • A query is similarly processed into a list of terms.
  • A join over the terms is implemented using multiple cursors on the index.

The necessity of annotating records with the word list to populate the index is a limitation of the current Indexed DB API. A feature request to support custom

@gaearon
gaearon / connect.js
Last active October 13, 2025 06:56
connect.js explained
// connect() is a function that injects Redux-related props into your component.
// You can inject data and callbacks that change that data by dispatching actions.
function connect(mapStateToProps, mapDispatchToProps) {
// It lets us inject component as the last step so people can use it as a decorator.
// Generally you don't need to worry about it.
return function (WrappedComponent) {
// It returns a component
return class extends React.Component {
render() {
return (
@zulhfreelancer
zulhfreelancer / exclude_regex.md
Last active October 24, 2025 05:59
Chrome console: How to filter exclude certain logs?

Use this:

^((?![INSERT YOUR WORD THAT YOU WANT TO EXCLUDE HERE]).)*$

Don't forget to check the Regex checkbox!

Example:

I'm excluding logs that contains Pusher words here. So, this is what I put inside the filter box: ^((?!pusher).)*$