First of all, you find the install path of your Electron app. If you found it, find the resources folder. If you found it, you'll have to install asar globally, by running:
I used Bazzite Linux because it seems to have the best 395+ CPU support right now. It also installs and uses podman by default. But the following instructions should work on any linux if:
- You have (very) recent AMD kernel drivers installed
- Podman or Docker installed (I think the instructions before should also work with docker if you just change the tool name)
- Go into the BIOS and bump up the amount of RAM given over to the GPU side by default (I used 64GB but you do you)
¡Disfrute! 💎 ⚡
You can take the same source code package that Ubuntu uses to build jq, compile it again, and realize 90% better performance.
I use jq for processing GeoJSON files and other open data offered in JSON format. Today I am working with a 500MB GeoJSON file that contains the Alameda County Assessor's parcel map. I want to run a query that prints the city for every parcel worth more than a threshold amount. The program is
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 Database from 'better-sqlite3'; | |
| import { createDatabaseClient } from 'my-partial-db-lib'; | |
| // 1) Create an in-memory DB and your table(s). | |
| const db = new Database(':memory:'); | |
| db.exec(` | |
| CREATE TABLE users ( | |
| id TEXT PRIMARY KEY, | |
| data JSON | |
| ); |
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 | |
| # 1. Find out the number of words in the word file | |
| number_of_words=$(wc -l < ./word-list.txt) | |
| # 2. Pick a random word from the list | |
| pick_random_number=$((1 + RANDOM % number_of_words)) | |
| # 3. Pick the line from the word list that is the random number | |
| the_word=$(sed "${pick_random_number}q;d" ./word-list.txt) |
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
| $luna = [char]::ConvertFromUtf32(0x1F31D) | |
| $sol = [char]::ConvertFromUtf32(0x1F31E) | |
| $murcielago = [char]::ConvertFromUtf32(0x1F987) | |
| $nota = [char]::ConvertFromUtf32(0x1F4DD) | |
| $cohete = [char]::ConvertFromUtf32(0x1F680) | |
| $concha = [char]::ConvertFromUtf32(0x1F41A) | |
| $error = [char]::ConvertFromUtf32(0x274C) | |
| $marco = [char]::ConvertFromUtf32(0x1F5BC) | |
| $exito = [char]::ConvertFromUtf32(0x2705) |
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 | |
| generic_prefix='kMRMediaRemoteNowPlayingInfo' | |
| apple_prefix='MRMediaRemoteMediaType' | |
| # Requires Bash 4+ due to associative array usage in this script. | |
| declare -A npc_response=( | |
| [artist]='null' | |
| [title]='null' | |
| [album]='null' |
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
| # The definition of color schemes. | |
| schemes: | |
| gruvbox_material_hard_dark: &gruvbox_material_hard_dark | |
| primary: | |
| background: '0x1d2021' | |
| foreground: '0xd4be98' | |
| normal: | |
| black: '0x32302f' | |
| red: '0xea6962' | |
| green: '0xa9b665' |
NewerOlder