• 1 Post
  • 372 Comments
Joined 1 year ago
cake
Cake day: July 4th, 2023

help-circle













  • Sanctions are to punish the whole country including individuals. Sanctions work because it makes lives of individuals worse so that they have reason to be unhappy and do something against the reasons the sanctions is put on them. It makes it harder for leaders to be accepted, if under their power live gets worse. And if a leader is not accepted by enough of their people, the chances of resistance is bigger. And the countries that have put sanctions on, want exactly that.







  • I used this prompt

    I want to create an electron app for linux of a third party webapp

    How would I do that?

    And chatGPT gave me a good instruction, will try that out. Apparently, you only need node, electron and the javascript like this:

    
    const { app, BrowserWindow } = require('electron')
    
    function createWindow() {
      // Create the browser window
      const win = new BrowserWindow({
        width: 800,
        height: 600,
        webPreferences: {
          nodeIntegration: true
        }
      })
    
      // Load the third-party web app
      win.loadURL('https://www.thirdpartyapp.com')
    
      // Optionally remove the default menu
      win.setMenu(null)
    
      // Open DevTools (optional for debugging)
      // win.webContents.openDevTools()
    }
    
    // Run the createWindow function when Electron is ready
    app.whenReady().then(createWindow)
    
    // Quit when all windows are closed
    app.on('window-all-closed', () => {
      if (process.platform !== 'darwin') {
        app.quit()
      }
    })
    
    app.on('activate', () => {
      if (BrowserWindow.getAllWindows().length === 0) {
        createWindow()
      }
    })