Mira
735 subscribers
802 photos
25 videos
20 files
263 links
sporadic attempts at cybersec.
personal channel.

files: @mira_files
playlist: @the_coding_playlist
Download Telegram
an easy fix to ensure electron only loads the page after the vite dev server is ready (avoids that white blank page at first)
// main.js

function waitForViteServer(url, cb) {
const tryConnect = () => {
http.get(url, () => cb()).on('error', () => setTimeout(tryConnect, 300));
};
tryConnect();
}

const createWindow = () => {
mainWindow = new BrowserWindow({
width: 800,
height: 600,
webPreferences: {
preload: path.join(__dirname, 'preload.js'),
},
});

if (isDevEnvironment) {
waitForViteServer('http://localhost:5173', () => {
mainWindow.loadURL('http://localhost:5173/');
log('Electron running in dev mode');
});
} else {
mainWindow.loadFile(path.join(__dirname, 'build', 'index.html'));
log('Electron running in prod mode');
}
};
a twist tho, no mebrat
😁11🤯3
two greatest movies of all time
🔥10💯6
4🥰1
Mira
Photo
need #pins ?
Anonymous Poll
77%
heck yeahh
23%
nah
Mira
welp
15 votes. we subject to the majority rule (fondly remembered this from a civic class)
have a good y'all
17
this little kid came and sat with me in the church. feels great man
9😁7🤡1🤣1
the radical change this country needs ngl
😁23🤣7🔥2
people suffer from breakups.
i suffer from unmerged PRs
🤣14😁7
this is my highest ever since uni was done. you can probably assume how the admin reveal would go
😭6