Skip to content

Instantly share code, notes, and snippets.

npx danguilherme

Guilherme Ventura danguilherme

npx danguilherme
Block or report user

Report or block danguilherme

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
danguilherme / index.html
Last active Jan 18, 2019
Electron Fiddle Gist - test menu shortcuts/accelerators
View index.html
<!DOCTYPE html>
<meta charset="UTF-8">
<title>Hello World!</title>
<!-- All of the Node.js APIs are available in this renderer process. -->
<b>Node.js :</b> <script>document.write(process.versions.node)</script>
danguilherme / imperative.ts
Created May 21, 2019
Imperative vs Declarative
View imperative.ts
function waitSingleWidgetInVirtualTree(
options: MacroApiOptions,
scope: ScopeItem[] = [],
callback: (
(error: Error | null, virtualTreeNode: VirtualTreeNode | null) => void
) {
let unsubscribeFromStore: (() => void) | null = null;
function stopWaitingSingleWidgetInVirtualTree() {
if (unsubscribeFromStore) {
danguilherme / _example.ts
Created Aug 5, 2019
Send messages from Electron Renderer to Main processes, with an RxJS observable to communicate progress and completion
View _example.ts
// In Renderer
export function makeHttpRequest(url: string; method: string) {
return createIpcSender<{ url: string; method: string }, void>(
{ url, method },
// ... in browser window code ...
makeHttpRequest('', 'GET').subscribe({
You can’t perform that action at this time.