Skip to content

Instantly share code, notes, and snippets.

View Zeryther's full-sized avatar
🎯

Mehdi Baaboura Zeryther

🎯
View GitHub Profile
import { useQuery } from "@tanstack/react-query";
type Action<TActionInput = unknown, TActionReturn = unknown> = (
input: TActionInput,
) => Promise<TActionReturn>;
export type BundledAction<TAction extends Action> = {
key: string[];
result: Awaited<ReturnType<TAction>>;
action: TAction;
@johnspurlock-skymethod
johnspurlock-skymethod / r2-notes.md
Last active March 13, 2024 17:32
Unofficial R2 notes
@SwitHak
SwitHak / 20211210-TLP-WHITE_LOG4J.md
Last active April 26, 2024 07:30
BlueTeam CheatSheet * Log4Shell* | Last updated: 2021-12-20 2238 UTC

Security Advisories / Bulletins / vendors Responses linked to Log4Shell (CVE-2021-44228)

Errors, typos, something to say ?

  • If you want to add a link, comment or send it to me
  • Feel free to report any mistake directly below in the comment or in DM on Twitter @SwitHak

Other great resources

  • Royce Williams list sorted by vendors responses Royce List
  • Very detailed list NCSC-NL
  • The list maintained by U.S. Cybersecurity and Infrastructure Security Agency: CISA List
@cfxd
cfxd / hide_toptal_linkedin_jobs_spam.js
Created November 21, 2021 17:11
How to hide Toptal LinkedIn jobs spam. Open your Chrome Dev Tools console and copy/paste this JS.
document.querySelectorAll('button[aria-label*="Hide"]').forEach(function(el, index) {
if(el.closest('.job-card-list__entity-lockup').querySelector('.job-card-container__company-name').innerHTML.trim() == 'Toptal') {
el.click();
}
});
blueprint:
name: Sonos Connect Sync
description: Sync volume and source control between Sonos Connect and the receiver it's connected to.
domain: automation
source_url: https://gist.github.com/Qonstrukt/ca1e761b2ec0a2d52fdb8c86490fbcbd
input:
sonos_connect:
name: Sonos
selector:
entity:
@henhan
henhan / nginx_documentation.md
Last active April 15, 2024 02:31
Extend and override nginx config for Elastic Beanstalk Amazon Linux 2

Extend and override nginx config for Elastic Beanstalk Amazon Linux 2

Documentation on how to override or extend the default nginx config on Elastic Beanstalk running om Amazon Linux 2. Correct as of 2021-08-01. Also see the general documentation on how to extend linux servers.

All references to placing files refer to putting a file at this location in your application bundle. You should never modify a file directly at your Elastic Beanstalk server by ssh:ing to the server, since such a change will be wiped whenever your servers autoscale or if you rebuild your application completely.

Adding a new location block

The easiest extension is to add a new location block to the main server block. This can be done by placing a .conf file with a server block in the folder .platform/nginx/conf.d/elasticbeanstalk. Any such file is automatically included in the main server block.

Overriding the default location

@GeneralSadaf
GeneralSadaf / List of all bots owned by Discord.md
Last active October 14, 2023 15:49
All official Discord bots I am aware of. This is an unofficial list and may not be kept completely up to date.

Bots for Discord owned servers

Username Description ID Invite
GearBoat#3958 Used for moderation purposes, GearGoat is a custom instance of the public GearBot made by AEntherprise#4693 (106354106196570112) and used in Discord Townhall, Discord Developers, etc. Public instance can be found at: https://gearbot.rocks 520953716610957312 Invite
Discord DevBot#9425 This bot is used in Discord Developers server, answers to frequently asked questions and has some public commands. 545364944258990091 Invite
Developers Role Bot#0397 This bot is used in Discord Developers server to give out roles. 976907566334484590 Invite
DBug#8485 This bot is
@johnyvelho
johnyvelho / readme.md
Last active April 22, 2024 13:18
Installing Supervisor on Elastic Beanstalk - 2021 - Linux AMI 2 - Laravel Worker Setup
  • Create the following folder structure in your root project directory: .ebextensions/supervisor

  • Place the supervisor.config under .ebextensions/

  • Place the setup.sh under .ebextensions/supervisor/

  • Run "chmod +x .ebextensions/supervisor/setup.sh"

  • Place the supervisord.conf under .ebextensions/supervisor/

@iwalton3
iwalton3 / jellyfin_extract_sub.py
Created March 27, 2021 04:15
Jellyfin Extract Subtitles
#!/usr/bin/env python3
# Based on https://github.com/EraYaN/jellyfin-stats
# pip3 install requests tqdm
URL = ""
API_KEY = ""
from re import sub
import requests
from tqdm import tqdm
@MeguminSama
MeguminSama / Discord Experiments.js
Last active April 7, 2024 13:15
Discord Experiments.js
let cache; webpackChunkdiscord_app.push([["wp_isdev_patch"], {}, r => cache=r.c]);
var UserStore = Object.values(cache).find(m => m?.exports?.default?.getUser).exports.default;
var actions = Object.values(UserStore._dispatcher._actionHandlers._dependencyGraph.nodes);
var user = UserStore.getCurrentUser();
actions.find(n => n.name === "ExperimentStore").actionHandler.CONNECTION_OPEN({
type: "CONNECTION_OPEN", user: {flags: user.flags |= 1}, experiments: [],
});
actions.find(n => n.name === "DeveloperExperimentStore").actionHandler.CONNECTION_OPEN();
webpackChunkdiscord_app.pop(); user.flags &= ~1; "done";