Skip to content

Instantly share code, notes, and snippets.

@rustyvz
rustyvz / core.js
Created April 7, 2025 19:47
Collection of usefull scripts to build instant app inside JSite Inspired by JSite
const html = (strings, ...values) => {
const raw = String.raw({ raw: strings }, ...values);
if (typeof document === "undefined") return raw;
const el = document.createElement("div");
el.innerHTML = raw;
return el.firstElementChild || '';
};
const Fragment = ({ children }) => {
if (typeof document === "undefined") {
this.showMainSpinner(this.l('Uploading'));
this.hideMainSpinner();
// -- or --
private ngxSpinnerTextService: NgxSpinnerTextService;
constructor(
injector: Injector,
private _spinnerService: NgxSpinnerService)
@rustyvz
rustyvz / images.html
Last active April 7, 2025 19:44
Display Uploaded Images
<!-- Use the FileReader API's readAsDataURL method to show uploaded images -->
<input type="file" id="uploaded-file" />
<div id="result"></div>
<script>
function readImage() {
const fileReader = new FileReader();
const file = document.getElementById("uploaded-file").files[0];
if (file) {
fileReader.readAsDataURL(file);

git remote add origin gh_personal:cyberfly/eticket.git

cursor tricks for developer

  • chat to discuss idea
  • always new chat
  • always new composer on big feature
  • inline edit cmd + k
  • manual coding if keep loop same error

git remote add origin gh_personal:cyberfly/eticket.git

cursor tricks for developer

  • chat to discuss idea
  • always new chat
  • always new composer on big feature
  • inline edit cmd + k
  • manual coding if keep loop same error
// val writer: BufferedWriter =
// File("path/to/file").bufferedWriter
File("path/to/file").writeText("text to write")
File("path/to/file").appendText("text to append")
// to a single String
File("path/to/file")
.bufferedReader().use { it.readText() }
// to a List<String>
File("path/to/file")
.bufferedReader().use { it.readText() }.lines()
1. Install cifs-utils
sudo apt install cifs-utils
2. Make a share folder. For example:
sudo mkdir /media/share
3. (Optional) Put your credentials into a file:
sudo nano /root/.YourCredentialsFileName
password file
$registryPath = "HKLM:\Software\Policies\Google\Chrome\DownloadInsecureContentAllowedForUrls"
$valueName = "1"
$urls = "http://production.goldenvalleynatural.com;http://training.goldenvalleynatural.com;http://deacom.goldenvalleynatural.com"
# Ensure the registry path exists
if (-not (Test-Path $registryPath)) {
New-Item -Path $registryPath -Force | Out-Null
}
# Set or update the registry value
```
1) netsh int ip reset reset.txt
2) netsh winsock reset
3) netsh advfirewall reset
```