Skip to content

Instantly share code, notes, and snippets.

@vasfvitor
vasfvitor / gist:599febbc75b4f458f1d4fa02201774d9
Created July 31, 2024 04:45
my personal ram/hw troubleshooting guide
first of all:
will touch ram sticks? disable xmp, restart pc. Shut down. Do what you do, start pc, everything ok? restart, check if need to enable xmp (some rams automatically enalbes)
pc won't start? check ram tracks and clean'em
pc starts but won't recognize all ram? (neither bios nor windows) check cpu-z. It happened once that cpu-z could id the sticks (2x8gb) and apparently the issue was dirt on the ram stick.
by cleaning them windows/bios could regognize.

Quick start

Tauri is shipped with state management function/feature by default.

Basic usage is quite simple: a variable of State type can be accessed on the tauri commands which you have defined; in other words, "with tauri commands, they'll magically inject state for you," so that once a variable is managed you can inject them directly as additional input when defining the command.

Example Implementation

@vasfvitor
vasfvitor / endpoint.json
Last active March 1, 2024 03:28
Tauri Update Endpoint
{
"version": "v1.1.0",
"notes": "Test version",
"pub_date": "2023-12-22T19:25:57Z",
"platforms": {
"windows-x86_64": {
"signature": "Content of app-setup.nsis.sig or app.msi.sig, depending on the chosen format",
"url": "https://github.com/username/reponame/releases/download/v1.0.0/app-x64-setup.nsis.zip"
}
}
Dism is an absolutely mind-blowing tool. It comes in handy SO OFTEN.
Mind you, most of these are Windows 10 only.
Windows acting up but you can boot into it?
Dism /Online /Cleanup-Image /RestoreHealth
Windows corruption to the point that it BSOD's on boot or just doesn't work? Load up a PE environment or find a way into an RE environment. PE works best. Throw in an ISO or an image.
@vasfvitor
vasfvitor / redir.astro
Created December 11, 2023 22:43
astro redirection check
---
import defineConfig from '../../astro.config.mjs';
const redir = defineConfig.redirects;
let total = 0;
let success = 0;
const failedUrls = [];
const processedUrls = [];
const ignoredUrls = []
@vasfvitor
vasfvitor / json
Created December 5, 2023 03:01
How to disable preview file with single-click in vs code?
"workbench.list.openMode": "doubleClick",
@vasfvitor
vasfvitor / PyQt6.py
Created December 4, 2023 03:57
ImportError: DLL load failed while importing QtCore
ImportError: DLL load failed while importing QtCore
from PyQt6 import QtWidgets
solution: pip install PyQt6-tools
@vasfvitor
vasfvitor / 01-fileName.js
Last active December 15, 2023 01:05
This is the Gist Title/Description
if (lorem === ipsum) {
dolor += sit;
amet++;
} else {
dolor += consectetur;
}
@vasfvitor
vasfvitor / Remove all elements contained in another array
Created October 22, 2023 00:43
Remove all elements contained in another array
const myArray = ['a', 'b', 'c', 'd', 'e', 'f', 'g'];
const toRemove = new Set(['b', 'c', 'g']);
--- method 1 ---
myArray = myArray.filter( ( el ) => !toRemove.includes( el ) );
--- method 2 ---
const difference = myArray.filter( x => !toRemove.has(x) );
@vasfvitor
vasfvitor / gtm-ipapi-tag.html
Created July 4, 2021 23:17 — forked from keithws/gtm-ipapi-tag.html
Google Tag Manager tag load GeoIP data into data layer from ipapi.co. Provides the data necessary to help with GDPR.
<script>
/*
* get geographical location data by ip address
* uses the free ipify.org service
* and the paid ipapi.co service
* and intelligent caching to minimize requests
*/
// mark the start of the script loading