Skip to content

Instantly share code, notes, and snippets.

View sitek94's full-sized avatar

Maciek Sitkowski sitek94

View GitHub Profile
@sitek94
sitek94 / ahoy-and-brave-focus-toggle.js
Last active November 2, 2024 17:55
Toggle Focus Mode in Brave/Ahoy platforms
// ==UserScript==
// @name Toggle Focus Mode in Brave/Ahoy platforms
// @namespace http://tampermonkey.net/
// @version 2024-11-01
// @description Removes distractions by hiding sidebar, navigation, etc. Leaves only article content. Default shortcut: `ctrl =` to toggle the focus on/off.
// @author Maciek Sitkowski
// @include https://bravecourses.circle.so*
// @include https://spolecznosc.eduweb.pl*
// @icon https://www.google.com/s2/favicons?sz=64&domain=circle.so
// @grant none
@sitek94
sitek94 / web-crypto.js
Created February 9, 2024 21:51
Web Crypto API Experiments
console.clear()
const PRIVATE_KEY_FORMAT = 'pkcs8'
const PUBLIC_KEY_FORMAT = 'spki'
const ENCRYPTION_ALGORITHM_NAME = 'RSA-OAEP'
const HASH_ALGORITHM_NAME = 'SHA-256'
const user = await generateKeyPair()
const leader = await generateKeyPair()
@sitek94
sitek94 / ahoy-focus.js
Last active June 1, 2023 19:04
Boost for Ahoy community to toggle focus mode
const styles = {
position: "fixed",
inset: 0,
zIndex: 99999,
overflowY: 'auto',
height: "100vh",
width: "100vw",
colorScheme: 'dark'
}
@sitek94
sitek94 / index.html
Created January 15, 2022 18:11
Emoji Favicon
<link
rel="icon"
href="data:image/svg+xml,<svg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 100 100%22><text y=%22.9em%22 font-size=%2290%22>⏳</text></svg>"
/>
@sitek94
sitek94 / main.css
Created November 17, 2021 04:55
100 Bytes of CSS to look great everywhere + bonus
html {
max-width: 70ch;
padding: 3em 1em;
margin: auto;
line-height: 1.75;
font-size: 1.25em;
}
/* Bonus */
h1,h2,h3,h4,h5,h6 {
@sitek94
sitek94 / server.js
Created July 31, 2021 17:19
Simple Node.js Server
const http = require('http');
const port = 5000;
const ip = '165.227.151.233';
const server = http.createServer((req, res) => {
console.log('There was a request!');
res.writeHead(200);
res.write('Hello from Simple NodeJS Server!');
@sitek94
sitek94 / .editorconfig
Last active July 23, 2023 06:52
Project Init
root = true
[*]
charset = utf-8
end_of_line = lf
indent_size = 2
indent_style = space
insert_final_newline = true
trim_trailing_whitespace = true
@sitek94
sitek94 / dummy-mail-data.json
Created February 3, 2021 17:05
Mail Data From Knockout JS Example
{
"Sent": [
{
"id": 33,
"from": "[email protected]",
"to": "callum.wyeslyfa@fang ghost.xyz",
"date": "May 13, 2011",
"subject": "RE: Logo ideas",
"folder": "Sent"
},
@sitek94
sitek94 / app.svg
Last active January 29, 2021 14:15
icons
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@sitek94
sitek94 / world-atlas-land-110m-min.json
Created December 17, 2020 23:26
World Atlas | Land | 110m | Minified
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.