For symmetic encryption, you can use the following:
To encrypt:
openssl aes-256-cbc -salt -a -e -in plaintext.txt -out encrypted.txt
To decrypt:
| namespace Samples | |
| { | |
| using System; | |
| using System.Collections.Generic; | |
| public class CustomEnumerableDemoConsole | |
| { | |
| public static void Main(params string[] args) | |
| { | |
| CustomEnumerable enumerable = new CustomEnumerable("One", "Two", "Three"); |
Create file /etc/systemd/system/[email protected]. SystemD calling binaries using an absolute path. In my case is prefixed by /usr/local/bin, you should use paths specific for your environment.
[Unit]
Description=%i service with docker compose
PartOf=docker.service
After=docker.service| <# | |
| .SYNOPSIS | |
| Uses Win32_Fan class to return information about fans in a system. | |
| .DESCRIPTION | |
| This script first defines some functions to decode various | |
| WMI attributed from binary to text. Then the script calls | |
| Get-WmiObject to retrieve fan details, then formats that | |
| information (using the functions defined at the top of the script. | |
| .NOTES |
| VARIABLE | VALUE |
|---|---|
| The email address associated with your Cloudflare account. | |
| KEY | The global API key associated with your Cloudflare account. |
| DOMAIN | The name of the domain to create a zone record for. |
| JUMP_START | If true, automatically attempts to fetch existing DNS records when creating a domain’s zone record |
| ZONE_ID | The unique ID of the domain’s zone record. Assigned by Cloudflare. Required when managing an existing zone record and its DNS records. |
| locals { | |
| app_services = [ | |
| { | |
| kind = "Linux" | |
| sku = { | |
| tier = "Standard" | |
| size = "S1" | |
| } | |
| }, | |
| { |
This is a PoC for running PM2 as a Windows Service under the Local Service account instead of the Local System account.
pm2 or pm2-windows-service installed yet. (The Powershell script will run npm i)
pm2-service-uninstall before running this scriptnpm and npm-cache global folders should be somewhere accessible to NT AUTHORITY\LocalService.
| { | |
| "apps": [ | |
| { | |
| "name": "web", | |
| "script": "C:\\ws\\engineer\\titan-web\\app.js", | |
| "args": [], | |
| "cwd": "C:\\ws\\engineer\\titan-web", | |
| "merge_logs": true, | |
| "instances": 1, | |
| "exec_mode": "cluster_mode", |