This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name Twitter spam DM deleter | |
// @namespace http://tampermonkey.net/ | |
// @version 2025-04-01 | |
// @description try to take over the world! | |
// @author You | |
// @match https://x.com/* | |
// @icon https://www.google.com/s2/favicons?sz=64&domain=x.com | |
// @grant none | |
// ==/UserScript== |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import {GetStaticPaths, GetStaticProps} from "next"; | |
import {getPostPathBySlug, getPostSlugs, markdownFileToPost, Post as PostInterface} from "../../services/posts"; | |
import {MDXRemote, MDXRemoteSerializeResult} from 'next-mdx-remote' | |
import {serialize} from 'next-mdx-remote/serialize' | |
import Content from "../../components/Content"; | |
import Layout from "../../components/Layout"; | |
import Footer from "../../components/Footer"; | |
import path from "path"; | |
import Hero from "../../components/Hero"; | |
import Image from "next/image" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// First, we create a new Set. When we look at the documentation for Set: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Set/Set | |
// We see the following: "The Set constructor lets you create Set objects that store unique values of any type, whether primitive values or object references." | |
// This means that when creating a Set with multiple values, it only stores UNIQUE values in that set. | |
// Example: | |
const mySet = new Set([1, 2, 3, 1, 2, 3]); | |
console.log(mySet); | |
// Set { | |
// 1, | |
// 2, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import styled from "styled-components"; | |
interface NoticeProps { | |
variant: "hint" | "important"; | |
} | |
const backgroundColors: { [key: string]: string } = { | |
hint: "#01920124", | |
important: "#ffff002e", | |
}; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Reduce loops through an array, giving you access to each item. It'll also give access to the current "result". | |
// You can specify an initial value which reduce will use to initialize the "result" variable. | |
const myArray = [ | |
1, | |
2, | |
3 | |
]; | |
const initialValue = []; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Easily get object key by value | |
const referrerSources = { | |
"aws": "AWS Cloud", | |
"oudesoft": "Oude software", | |
"mvp": "Voordelen van een MVP", | |
"corona": "Corona Consult" | |
} | |
// Object entries transforms an object into an array with sub arrays with key & value: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Place your key bindings in this file to override the defaultsauto[] | |
[ | |
{ | |
"key": "cmd+d", | |
"command": "editor.action.copyLinesDownAction", | |
"when": "editorTextFocus && !editorReadonly" | |
}, | |
{ | |
"key": "shift+alt+down", | |
"command": "-editor.action.copyLinesDownAction", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Module parse failed: Unexpected character '' (1:0) | |
You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders | |
(Source code omitted for this binary file) | |
./src/assets/fonts/Arvo/Arvo-BoldItalic.ttf 1:0 | |
Module parse failed: Unexpected character '' (1:0) | |
You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders | |
(Source code omitted for this binary file) | |
./src/assets/fonts/Arvo/Arvo-Italic.ttf 1:0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const unSubscribe = () => { | |
Array.from(document.querySelectorAll("yt-formatted-string")) | |
.find(yfs => yfs.textContent === "Subscribed") | |
.click(); | |
setTimeout(() => { | |
Array.from(document.querySelectorAll("yt-formatted-string")) | |
.filter(yfs => yfs.textContent === "Unsubscribe") | |
.forEach(yfs => yfs.click()); | |
}, 400); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Future versions of Hyper may add additional config options, | |
// which will not automatically be merged into this file. | |
// See https://hyper.is#cfg for all currently supported options. | |
module.exports = { | |
config: { | |
scrollback: 5000, | |
// default font size in pixels for all tabs | |
fontSize: 16, |
NewerOlder