Skip to content

Instantly share code, notes, and snippets.

View jeremyspiegel's full-sized avatar

Jeremy Spiegel jeremyspiegel

View GitHub Profile
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<!-- https://developer.mozilla.org/en-US/docs/Web/HTTP/CSP -->
<meta http-equiv="Content-Security-Policy" content="default-src 'self'; script-src 'self'; style-src 'self' 'unsafe-inline'">
<link href="./styles.css" rel="stylesheet">
<title>Hello World!</title>
</head>
<body>
From c19f00bffaec3a9ee5053d77ceeb04bcf723f8bd Mon Sep 17 00:00:00 2001
From: Jeremy Spiegel <jeremy.spiegel@frontapp.com>
Date: Sat, 15 Apr 2023 13:01:33 -0700
Subject: [PATCH] UNNotifications
---
BUILD.gn | 1 +
.../browser/api/electron_api_notification.cc | 4 +
.../mac/notification_presenter_mac.mm | 308 ++++++++++++++++++
shell/browser/notifications/notification.cc | 12 +-
@jeremyspiegel
jeremyspiegel / index.html
Created March 2, 2023 23:35
BrowserWindow.previewFile
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<!-- https://developer.mozilla.org/en-US/docs/Web/HTTP/CSP -->
<meta http-equiv="Content-Security-Policy" content="default-src 'self'; script-src 'self'; style-src 'self' 'unsafe-inline'">
<link href="./styles.css" rel="stylesheet">
<title>Hello World!</title>
</head>
<body>
@jeremyspiegel
jeremyspiegel / main.js
Last active December 1, 2022 20:02
dark-mode-text-popup-bug
const {app, BrowserWindow} = require('electron')
const http = require('http')
http
.createServer((request, response) => {
if (request.url === '/popup') {
response.writeHead(200, {'content-type': 'text/plain; charset=utf-8'})
response.end('test')
} else {
response.writeHead(200, {'content-type': 'text/html; charset=utf-8'})
import * as t from 'io-ts';
import {PathReporter} from 'io-ts/lib/PathReporter'
import {SetIntersection} from 'utility-types';
const emptyArray = t.refinement(t.UnknownArray, (i) => i.length === 0);
enum ElectronMethodsEnum {
OPEN = 'open',
HISTORY_BACK = 'historyBack',
// ...

Keybase proof

I hereby claim:

  • I am jeremyspiegel on github.
  • I am jeremyspiegel (https://keybase.io/jeremyspiegel) on keybase.
  • I have a public key ASANbuIsqtRYwaKuBkiZXdTpO12G2rnSkLo2WkAKXi9UsQo

To claim this, I am signing this object:

@jeremyspiegel
jeremyspiegel / gist:c8e4efe495c99aa5d6ac
Created January 24, 2015 22:56
webrtc data channel bandwidth issue
#include "base/base64.h"
#include "talk/app/webrtc/peerconnectioninterface.h"
#include "webrtc/base/ssladapter.h"
#include "webrtc/base/thread.h"
#include "webrtc/base/bind.h"
#include "webrtc/base/opensslidentity.h"
#include "webrtc/base/logging.h"
#include "webrtc/base/timeutils.h"
#include <iostream>
@jeremyspiegel
jeremyspiegel / gist:fb334608e87ab51a4b06
Created January 24, 2015 22:55
webrtc data channel bandwidth issue
#include "base/base64.h"
#include "talk/app/webrtc/peerconnectioninterface.h"
#include "webrtc/base/ssladapter.h"
#include "webrtc/base/thread.h"
#include "webrtc/base/bind.h"
#include "webrtc/base/opensslidentity.h"
#include "webrtc/base/logging.h"
#include "webrtc/base/timeutils.h"
#include <iostream>