Skip to content

Instantly share code, notes, and snippets.

const { app, safeStorage } = require('electron');
const { join } = require('node:path');
const { readFileSync, writeFileSync } = require('node:fs');
const folder = join(app.getPath('appData'), 'Signal');
app.setPath('userData', folder);
app.setName('Signal');
app.on('ready', () => {
const configPath = join(folder, 'config.json');
@Iristyle
Iristyle / Start-Vagrant.bat
Created March 15, 2013 18:35
Windows startup script to fire up a Vagrant VM safely on boot (using Run registry key for instance)
ECHO OFF
cd /d %~dp0
for /f "tokens=2* delims= " %%F IN ('vagrant status ^| find /I "default"') DO (SET "STATE=%%F%%G")
ECHO Close this window if it remains open, and http://localhost:8081 is responsive
IF "%STATE%" NEQ "saved" (
ECHO Starting Vagrant VM from powered down state...
vagrant up
) ELSE (