Skip to content

Instantly share code, notes, and snippets.

Avatar

Felix Rieseberg felixrieseberg

View GitHub Profile
View weather.js
const url = new URL('https://api.tidesandcurrents.noaa.gov/api/prod/datagetter');
url.search = new URLSearchParams({
station: '9414290',
product: 'water_temperature',
time_zone: 'lst',
units: 'english',
date: 'today',
application: 'GGTC',
format: 'json'
}).toString();
@felixrieseberg
felixrieseberg / get_channels.js
Last active Mar 25, 2022
Slack: Get a list of your channels (excluding DMs, group chats, and archived/private channels)
View get_channels.js
// Open up the Slack Developer Tools by entering "/slackdevtools"
// in the message input.
// First, run this. The client will reload.
slackDebug.enable()
// Then, get channels. See "filterChannels" to remove channels
// beginning with a certain prefix.
(function getMyChannels() {
const allChannels = slackDebug.storeInstance.getStateByTeamId(slackDebug.activeTeamId).channels.__proto__
@felixrieseberg
felixrieseberg / index.html
Created Jul 14, 2021
Stripe, iframe, and CSP
View index.html
<!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 https://js.stripe.com 'self'; connect-src https://api.stripe.com; frame-src https://js.stripe.com https://hooks.stripe.com">
<meta http-equiv="X-Content-Security-Policy" content="default-src 'self'; script-src https://js.stripe.com 'self'; connect-src https://api.stripe.com; frame-src https://js.stripe.com https://hooks.stripe.com">
<title>Hello World!</title>
<script src="https://js.stripe.com/v3" async></script>
</head>
@felixrieseberg
felixrieseberg / Slack's Electron Versions
Last active Aug 19, 2022
Tags, Electron versions, Chromium versions
View Slack's Electron Versions
{
"master": {
"electron": "20.0.3",
"chromium": "104.0.5112.81",
"date": "2022-08-19"
},
"4.28.171": {
"electron": "20.0.3",
"chromium": "104.0.5112.81",
"date": "2022-08-17"
View index.html
<!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. -->
@felixrieseberg
felixrieseberg / index.html
Created Feb 1, 2021
Electron Fiddle Gist
View index.html
<!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. -->
@felixrieseberg
felixrieseberg / index.html
Created Dec 10, 2020
Transparency breaking network
View index.html
<!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. -->
@felixrieseberg
felixrieseberg / index.html
Created Aug 5, 2020
Electron Fiddle Gist
View index.html
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Hello World!</title>
<link rel="stylesheet" type="text/css" href="./styles.css">
</head>
<body>
<script>
// You can also require other files to run in this process
@felixrieseberg
felixrieseberg / index.html
Created May 20, 2020
Electron Fiddle Gist
View index.html
<!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. -->
@felixrieseberg
felixrieseberg / index.html
Created Oct 7, 2019
Electron Fiddle Gist
View index.html
<!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. -->
Height: <script>document.write(window.outerHeight)</script>