Skip to content

Instantly share code, notes, and snippets.

This file has been truncated, but you can view the full file.
2025-02-24 15:07:02,147 [ 25068] INFO - #c.i.p.l.i.LspServerImpl - PyrightServerDescriptor@launch_decoupled_loop.py(Running;27): window/logMessage Info: Setting pythonPath for service "[fd7a:115c:a1e0:0b1a:0000:000b:0a12:dc7f]:8891": "/opt/homebrew/Caskroom/miniforge/base/envs/py311/bin/python"
2025-02-24 15:07:02,148 [ 25069] INFO - #c.i.p.l.i.LspServerImpl - PyrightServerDescriptor@launch_decoupled_loop.py(Running;27): window/logMessage Info: No include entries specified; assuming //[fd7a:115c:a1e0:0b1a:0000:000b:0a12:dc7f]:8891/
2025-02-24 15:07:02,148 [ 25069] INFO - #c.i.p.l.i.LspServerImpl - PyrightServerDescriptor@launch_decoupled_loop.py(Running;27): window/logMessage Info: Auto-excluding **/node_modules
2025-02-24 15:07:02,148 [ 25069] INFO - #c.i.p.l.i.LspServerImpl - PyrightServerDescriptor@launch_decoupled_loop.py(Running;27): window/logMessage Info: Auto-excluding **/__pycache__
2025-02-24 15:07:02,148 [ 25069] INFO - #c.i.p.l.i.LspServerImpl - PyrightServerDescriptor@launch_decoup
2025-02-19 21:29:25,340 [11522385] INFO - #com.insyncwithfoo.pyright.lsp4ij.Client - Settings(python=Python(pythonPath=null))
2025-02-19 21:29:25,338 [11522383] INFO - #com.insyncwithfoo.pyright.lsp4ij.Client - Settings(python=Python(pythonPath=null))
2025-02-19 21:29:25,338 [11522383] INFO - #com.insyncwithfoo.pyright.lsp4ij.Client - Settings(python=Python(pythonPath=null))
2025-02-19 21:29:25,338 [11522383] INFO - #com.insyncwithfoo.pyright.lsp4ij.Client - Settings(python=Python(pythonPath=null))
2025-02-19 21:29:25,338 [11522383] INFO - #com.insyncwithfoo.pyright.lsp4ij.Client - Settings(python=Python(pythonPath=null))
2025-02-19 21:29:25,338 [11522383] INFO - #com.insyncwithfoo.pyright.lsp4ij.Client - Settings(python=Python(pythonPath=null))
2025-02-19 21:29:25,338 [11522383] INFO - #com.insyncwithfoo.pyright.lsp4ij.Client - Settings(python=Python(pythonPath=null))
2025-02-19 21:29:25,338 [11522383] INFO - #com.insyncwithfoo.pyright.lsp4ij.Client - Settings(python=Python(pythonPath=null))
This file has been truncated, but you can view the full file.
2025-02-16 10:36:55,645 [ 15657] WARN - org.eclipse.lsp4j.jsonrpc.services.GenericEndpoint - Unsupported notification method: pyright/reportProgress
2025-02-16 10:36:55,871 [ 15883] WARN - org.eclipse.lsp4j.jsonrpc.services.GenericEndpoint - Unsupported notification method: pyright/reportProgress
2025-02-16 10:36:55,902 [ 15914] WARN - org.eclipse.lsp4j.jsonrpc.services.GenericEndpoint - Unsupported notification method: pyright/endProgress
2025-02-16 10:43:00,286 [ 380298] INFO - #c.i.p.l.i.LspServerImpl - PyrightLSDescriptor@work(Running;0): Stopping LSP server normally
2025-02-16 10:43:00,359 [ 380371] INFO - #c.i.p.l.i.LspServerImpl - PyrightLSDescriptor@work(ShutdownNormally;0): Stopping LSP server process: /opt/homebrew/Caskroom/miniforge/base/envs/py311/bin/pyright-python-langserver --stdio
2025-02-16 10:43:00,433 [ 380445] INFO - #c.i.p.l.i.LspServerImpl - PyrightLSDescriptor@work(ShutdownNormally;0): LSP server process terminated, exit code = 0, command line: /opt/homebrew/Caskroom/mini
2025-02-16 10:36:55,645 [ 15657] WARN - org.eclipse.lsp4j.jsonrpc.services.GenericEndpoint - Unsupported notification method: pyright/reportProgress
2025-02-16 10:36:55,871 [ 15883] WARN - org.eclipse.lsp4j.jsonrpc.services.GenericEndpoint - Unsupported notification method: pyright/reportProgress
2025-02-16 10:36:55,902 [ 15914] WARN - org.eclipse.lsp4j.jsonrpc.services.GenericEndpoint - Unsupported notification method: pyright/endProgress
2025-02-16 10:43:00,286 [ 380298] INFO - #c.i.p.l.i.LspServerImpl - PyrightLSDescriptor@work(Running;0): Stopping LSP server normally
2025-02-16 10:43:00,359 [ 380371] INFO - #c.i.p.l.i.LspServerImpl - PyrightLSDescriptor@work(ShutdownNormally;0): Stopping LSP server process: /opt/homebrew/Caskroom/miniforge/base/envs/py311/bin/pyright-python-langserver --stdio
2025-02-16 10:43:00,433 [ 380445] INFO - #c.i.p.l.i.LspServerImpl - PyrightLSDescriptor@work(ShutdownNormally;0): LSP server process terminated, exit code = 0, command line: /opt/homebrew/Caskroom/mini
curl --request PUT \
--url 'https://api.bigcommerce.com/stores/8mw570y811/v3/content/pages' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--header 'X-Auth-Token: xxxxxxxxxxxxxxxxx' \
--data '{"name":"Sandbox Page","is_visible":true,"parent_id":0,"sort_order":0,"type":"page","is_homepage":false,"is_customers_only":false,"id":0,"meta_title":"string","body":"<div>Hello World!</div>","feed":"string","link":"string","meta_keywords":"","meta_description":"string","search_keywords":"trousers,pockets,luxury","url":"/sandbox","channel_id":1}'
=== to automate this ===
for page in myhomepage ... ; do
import {ReactNode, useState} from "react";
export function Section({
children,
hideHeading,
className
}: { children?: ReactNode, className?: string, hideHeading?: boolean }) {
return <div style={{padding: 64}} className={className}>
{!hideHeading && <h1>My Hero</h1>}
{children}
This file has been truncated, but you can view the full file.
<div id="page"><!-- HTML_TAG_START --><div data-plasmic-project-id="sT7xEH9u4HQXUcstpAi7L4" data-plasmic-project-version="6.0.0" data-plasmic-component="ForCandidates" data-plasmic-project-token="" data-plasmic-component-data="{&quot;entryCompMetas&quot;:[{&quot;id&quot;:&quot;e5P5psP80_&quot;,&quot;displayName&quot;:&quot;For candidates&quot;,&quot;usedComponents&quot;:[&quot;WrZGaw5TTTf&quot;,&quot;EBt5g4hjXnx&quot;,&quot;z8Gc0CRV3W&quot;,&quot;YG-oOqp7g15&quot;],&quot;projectId&quot;:&quot;sT7xEH9u4HQXUcstpAi7L4&quot;,&quot;name&quot;:&quot;ForCandidates&quot;,&quot;renderFile&quot;:&quot;render__e5P5psP80_.js&quot;,&quot;skeletonFile&quot;:&quot;comp__e5P5psP80_.js&quot;,&quot;cssFile&quot;:&quot;css__e5P5psP80_.css&quot;,&quot;path&quot;:&quot;/pages/for-candidates&quot;,&quot;isPage&quot;:true,&quot;entry&quot;:&quot;render__e5P5psP80_.js&quot;,&quot;isCode&quot;:false,&quot;pageMetadata&quot;:{&quot;path&quot;:&quot;/pages/for-candidates&quot;,&quot;description&quot;:&quot;&quot;,&quot;title&quot;:&quo
@yang
yang / readme.md
Created April 20, 2022 05:28
Plasmic data fetching for codegen

You can manually install @plasmicapp/query and implement their extractPlasmicQueryData method.

It could be something like:

// data/data.tsx

export async function extractPlasmicQueryData(
  element: React.ReactElement
): Promise<Record<string, any>> {
@yang
yang / main.bash
Created March 7, 2022 20:48
Vercel instant rollbacks
Copy-pastable version of the code:
# Instant rollbacks on Vercel:
#
# vercel alias set PREVIOUS_DEPLOYMENT_DOMAIN PRODUCTION_DOMAIN
vercel alias set myapp-k8nj917m1-yaaang.vercel.app myapp.vercel.app
@yang
yang / gist:2e3dfe34e1e78040e28dfab8aadbc893
Created February 9, 2022 00:58
Import tokens into Plasmic Studio
/*
Customize the inputs in the `normalized` variable, then:
0. open your project in Plasmic Studio
1. open chrome devtools
2. use the top/left most button (the mouse selector) to inspect an element in the studio, such as the logo - this sets the focus on the correct iframe (rather than the outermost iframe)
3. switch to the console tab
4. paste the included snippet to populate the tokens