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
| #!/bin/bash | |
| # Gnome-shell+Nvidia sometimes fails to suspend, os instead change to tty3 and suspend from there, then return to tty2. | |
| set -e | |
| # Current wakeup count | |
| WAKEUPS=$(cat /sys/power/wakeup_count) | |
| # switch to TTY3 and suspend |
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
| <form className="inline-flex input pl-[2.5em] pr-0 w-0 has-[input:not(:placeholder-shown)]:w-[250px] focus-within:w-[250px] has-[input:not(:placeholder-shown)]:[&_.btn]:block transition-[width] duration-300 ease-in-out has-[input:placeholder-shown]:border-transparent has-[input:placeholder-shown]:shadow-none" method="GET" action="/search"> | |
| <label className="overflow-hidden flex-1"> | |
| <div className="h-[100%] w-[2.5em] absolute left-0 top-0 cursor-text"> | |
| <svg | |
| aria-hidden="true" | |
| className="h-[1em] w-[1em] absolute left-[0.2em] top-1/2 -translate-y-1/2 ml-2" | |
| xmlns="http://www.w3.org/2000/svg" | |
| viewBox="0 0 24 24" | |
| > | |
| <g |
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 { defineConfig } from "tsdown"; | |
| // Try to create 1-to-1 file mapping between src and dist | |
| export default defineConfig({ | |
| entry: "./src/**/*.(ts|tsx)", | |
| // Generate package.json `exports` property automatically | |
| // exports: { | |
| // devExports: true, | |
| // }, |
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 { render } from "solid-js/web"; | |
| import { For, createSignal } from "solid-js"; | |
| import { createStore, produce } from "solid-js/store"; | |
| /** | |
| * Reusable todo store, with logical state change functions | |
| */ | |
| function createTodos(initialTitle: string) { | |
| const createTodo = (id: number, task: string) => ({ | |
| id, |
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 { deparse, parse } from "npm:pgsql-parser"; | |
| import type { Node, ParseResult } from "npm:@pgsql/types"; | |
| const schemaSql = ` | |
| -- PostgreSQL schema | |
| CREATE TYPE my_enum_example AS ENUM ('good', 'bad', 'ugly', 'dont know'); | |
| CREATE TABLE | |
| "various_types" ( | |
| "bigserial" bigserial primary key, |
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
| # EDIT: There is more comprehensive debloat instructions here: https://github.com/sammilucia/ASUS-G14-Debloating/blob/main/README.md | |
| # Get services starting with "Asus*" to a variable | |
| $services = Get-Service -Name "Asus*" | |
| # Stop services | |
| foreach ($service in $services) { | |
| # Print service | |
| Write-Host "STOP" $service.Name | |
| Stop-Service -Name $service.Name |
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 * as k from "npm:kysely"; | |
| import { PGlite } from "npm:@electric-sql/pglite"; | |
| function createPgLiteDialect(db: PGlite) { | |
| return { | |
| createDriver: () => | |
| ({ | |
| acquireConnection: () => { | |
| return Promise.resolve({ | |
| executeQuery: async (compiledQuery) => { |
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 { createSQLiteThread, createHttpBackend } from "npm:sqlite-wasm-http"; | |
| // This is required hack: | |
| const OldWorker = globalThis.Worker; | |
| // @ts-ignore: Default to module workers | |
| globalThis.Worker = class { | |
| constructor(url: URL, opts: any = {}) { | |
| return new OldWorker(url, { type: "module", ...opts }); | |
| } | |
| }; |
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
| const pool = new Pool({ | |
| max: 300, | |
| connectionTimeoutMillis: 20000, | |
| host: "127.0.0.1", | |
| port: 5432, | |
| user: 'citus', | |
| password: () => "password", | |
| database: 'citus', | |
| ssl: false, |
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
| <!DOCTYPE html> | |
| <html lang="en"> | |
| <head> | |
| <meta charset="UTF-8" /> | |
| <meta http-equiv="X-UA-Compatible" content="IE=edge" /> | |
| <meta name="viewport" content="width=device-width, initial-scale=1.0" /> | |
| <title>Document</title> | |
| </head> | |
| <body> | |
| LOOK AT THE CONSOLE |
NewerOlder