Skip to content

Instantly share code, notes, and snippets.

View CharlieHess's full-sized avatar
🗑️

Charlie Hess CharlieHess

🗑️
View GitHub Profile
@CharlieHess
CharlieHess / index.html
Last active September 17, 2019 20:34
isVisible vs isFocused
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Hello World!</title>
</head>
<body>
<h1>Hello World!</h1>
<!-- All of the Node.js APIs are available in this renderer process. -->
We are using Node.js <script>document.write(process.versions.node)</script>,
@CharlieHess
CharlieHess / index.html
Created September 30, 2019 19:41
nativeWindowOpen + Dropbox chooser
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Hello World!</title>
</head>
<body>
<h1>Hello World!</h1>
</body>
</html>
@CharlieHess
CharlieHess / index.html
Last active September 30, 2019 19:51
nativeWindowOpen + Dropbox chooser
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Hello World!</title>
</head>
<body>
<h1>Hello World!</h1>
</body>
</html>
@CharlieHess
CharlieHess / index.html
Created October 4, 2019 14:56
Electron Fiddle Gist
<!-- Empty -->
@CharlieHess
CharlieHess / index.html
Created October 4, 2019 20:27
Electron Fiddle Gist
<!-- Empty -->
@CharlieHess
CharlieHess / main.js
Created October 30, 2019 18:11
web-contents-created fired too early?
const {app, BrowserWindow, webContents: WebContents} = require('electron')
const assert = require('assert')
let mainWindow
function createWindow () {
mainWindow = new BrowserWindow({
width: 800,
height: 600,
webPreferences: {
@CharlieHess
CharlieHess / prompt-to-update-epic.ts
Last active November 6, 2019 20:38
Example of prompting users when an update is available
/**
* Shows a notification prompting users to restart when an update has been downloaded
* and we're ready to apply it.
*/
export const promptToUpdateEpic: Epic<Action<ReleaseChannel | UpdateStatus>, State> = (
action$,
store,
) => {
// Update status is redux state populated by autoUpdater events
const updateStatusChanged = action$.pipe(
@CharlieHess
CharlieHess / how-to-use-it.tsx
Last active August 27, 2020 13:45
Helpers to track OutlinePass selection
function Scene() {
return (
<Canvas>
<OutlineItemsProvider>
<SomeMesh />
<SomeMesh />
<SomeMesh />
<Effects />
</OutlineItemsProvider>
</Canvas>
@CharlieHess
CharlieHess / index.html
Last active September 2, 2020 18:28
Missing first focus event when focusing window with show: false
<!-- Empty -->
@CharlieHess
CharlieHess / index.html
Last active September 21, 2020 21:13
Missing separator at end of items list
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Hello World!</title>
<link rel="stylesheet" type="text/css" href="./styles.css">
</head>
<body>
<h1>Hello World!</h1>
<!-- All of the Node.js APIs are available in this renderer process. -->