Skip to content

Instantly share code, notes, and snippets.

Keybase proof

I hereby claim:

  • I am rustyvz on github.
  • I am rustyvz (https://keybase.io/rustyvz) on keybase.
  • I have a public key whose fingerprint is F52A DB37 49BB 4665 4E66 D651 381F 17A1 57D6 34CF

To claim this, I am signing this object:

@rustyvz
rustyvz / 0_reuse_code.js
Last active August 29, 2015 14:10
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
<?php
phpinfo();
?>
@rustyvz
rustyvz / snippet
Created April 7, 2025 19:09
Replaces all newline characters in input.txt with spaces, outputting a single-line result.
sed ':a;N;$!ba;s/\n/ /g' input.txt
# Google Secrets Manager Setup Guide
**Foreword to define**
# 1. Enable the Secret Manager API
## 1.1. Web Console
### 1.1.1. Access the Google Cloud Console
1. Open your web browser and navigate to [https://console.cloud.google.com/](https://console.cloud.google.com/)
2. Sign in with your Google account that has access to your Google Cloud project
3. Make sure you've selected the correct project in the dropdown at the top of the page (next to "Google Cloud")
```
1) netsh int ip reset reset.txt
2) netsh winsock reset
3) netsh advfirewall reset
```
$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. 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
// 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()
// val writer: BufferedWriter =
// File("path/to/file").bufferedWriter
File("path/to/file").writeText("text to write")
File("path/to/file").appendText("text to append")