Skip to content

Instantly share code, notes, and snippets.

@alifma
Last active July 3, 2024 04:03
Show Gist options
  • Save alifma/4bc070e1f6f68eabc8be9658a93ba450 to your computer and use it in GitHub Desktop.
Save alifma/4bc070e1f6f68eabc8be9658a93ba450 to your computer and use it in GitHub Desktop.
deb http://deb.debian.org/debian/ bookworm main contrib non-free non-free-firmware
deb http://deb.debian.org/debian/ bookworm-updates main contrib non-free non-free-firmware
deb http://security.debian.org/debian-security bookworm-security main contrib non-free non-free-firmware
curl -fsSL https://deb.nodesource.com/setup_16.x | sudo -E bash -
sudo apt install -y nodejs
npm install --global yarn
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.3/install.sh | bash
export NVM_DIR="$([ -z "${XDG_CONFIG_HOME-}" ] && printf %s "${HOME}/.nvm" || printf %s "${XDG_CONFIG_HOME}/nvm")"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
@alifma
Copy link
Author

alifma commented Jul 2, 2024

Main.js

const { app, BrowserWindow } = require('electron')

function createWindow() {
  const win = new BrowserWindow({
    width: 800,
    height: 600,
    webPreferences: {
      nodeIntegration: true,
    },
  })

  win.loadFile('index.html')
}

app.whenReady().then(createWindow)

app.on('window-all-closed', () => {
  if (process.platform !== 'darwin') {
    app.quit()
  }
})

app.on('activate', () => {
  if (BrowserWindow.getAllWindows().length === 0) {
    createWindow()
  }
})

index.html

<!-- index.html -->
<!DOCTYPE html>
<html>
  <head>
    <title>Hello Electron</title>
  </head>
  <body>
    <h1>Hello Electron!</h1>
  </body>
</html>

Package.json

{
  "name": "my-electron-app",
  "version": "1.0.0",
  "main": "main.js",
  "scripts": {
    "start": "electron ."
  },
  "devDependencies": {
    "electron": "^23.0.0"
  }
}

@alifma
Copy link
Author

alifma commented Jul 3, 2024

internal-key.pem

-----BEGIN ENCRYPTED PRIVATE KEY-----
MIIFHzBJBgkqhkiG9w0BBQ0wPDAbBgkqhkiG9w0BBQwwDgQIH1P/pLjIf/QCAggA
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Ua+uUu6eU6AbvRPs6y8UFZw
kQVPYe73Wjem2OEauIUtTwVguJlbUouybwZp0TeIi2iB5Pau3JkTap6VQRi0rrb9
9xEspVPQTq9fkxTIyFTr1VVhhgaTRfknC8dhRb7qJuutK3NGZHnOZRQkQUn2qVsB
Qv+JBYlHxbemDIbjxzHzcg+Zx+czPtlGLL2eaR/4c7P9cQNfhGbz8ow5q//8gl+V
D8kZ4TBY3xy5lK6dXxcUFhp/fFNn3cKaWjFGTGCvEV7mBTr0Uca4mgQ7n4FgQca+
kRuLb/ykQr5lJQ1E0PDN3IzZmor55D6Q8n6AeJkbAF9WMDp7r+nMPv2hoLMCGkZ5
kLSyQsFguA9xjwr5VesZQYyzva0wC67ZJq9ZAzqK1jUCSLzfBkY9AC/PCavRMHIt
C7JV+CXwL+I4taaYCnAFnepBhCLqwPE1P324ikgWWvJ+LTdkwYr0PUy59GwWbEy0
PNmq3bN5D2hMKSurw4IezCTR+ANU9y2sSHAK1WfaAvlwwl7lCEq8USQa08+CIDbq
DqnetZwxw5aGVoJWZO+PAg8yFjrB+j+KAX3wKWrhkZCVSRnW/AJbeIRlt0PfWAlp
bcTwkq2CQbEABD04UP+QofkGzQ==
-----END ENCRYPTED PRIVATE KEY-----

@alifma
Copy link
Author

alifma commented Jul 3, 2024

https://drive.google.com/file/d/1tMCL5pEGV4HBWk19v1fGKH8XsBetUpvn/view?usp=sharing (with PKCS11)
sandi F5F08676-E287-4432-9A3D-4C169B9E1EDD

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment