Skip to content

Instantly share code, notes, and snippets.

View mkody's full-sized avatar
🍮
Wha-

Kody mkody

🍮
Wha-
View GitHub Profile
@JayPeet
JayPeet / OpenAI_Nginx_DenyList
Created September 4, 2024 20:48
Nginx OpenAI Deny List
# IPs taken from:
# https://openai.com/searchbot.json
# https://openai.com/chatgpt-user.json
# https://openai.com/gptbot.json
# And presumably could change.
location /
{
#deny OAI-SearchBot
deny 20.42.10.176/28;
@cmj
cmj / guest-account.sh
Last active December 25, 2023 03:49
grab twitter guest tokens
#!/bin/bash
# Grab Twitter guest account tokens for use with Nitter.
guest_token=$(curl -s -XPOST https://api.twitter.com/1.1/guest/activate.json -H 'Authorization: Bearer AAAAAAAAAAAAAAAAAAAAAFXzAwAAAAAAMHCxpeSDG1gLNLghVe8d74hl6k4%3DRUMF4xAQLsbeBhTSRrCiQpJtxoGWeyHrDb5te2jpGskWDFW82F' -H 'Connection: close' | jq -r '.guest_token')
flow_token=$(curl -s -XPOST 'https://api.twitter.com/1.1/onboarding/task.json?flow_name=welcome&api_version=1&known_device_token=&sim_country_code=us' \
-H 'Authorization: Bearer AAAAAAAAAAAAAAAAAAAAAFXzAwAAAAAAMHCxpeSDG1gLNLghVe8d74hl6k4%3DRUMF4xAQLsbeBhTSRrCiQpJtxoGWeyHrDb5te2jpGskWDFW82F' \
-H 'Content-Type: application/json' \
-H 'User-Agent: TwitterAndroid/10.21.1' \
-H "X-Guest-Token: ${guest_token}" \
@ghostrider-05
ghostrider-05 / discord_app_protocols.md
Last active November 8, 2024 22:32
An unofficial list of discord app protocol routes

Discord app protocol routes

Home:

  • /: discord://-/
  • friends: discord://-/channels/@me/
  • nitro: discord://-/store
  • shop: discord://-/shop
  • message requests: discord://-/message-requests
  • family centre: discord://-/family-center
$hactool = "$PSScriptRoot\hactool.exe"
$prodkeys = "$PSScriptRoot\prod.keys"
$firmware = "$PSScriptRoot\Firmware 10.1.0\"
$files = Get-ChildItem $firmware -Filter *.nca
$numfiles = 0
foreach ($file in $files) {
$hacout = & $hactool -k $prodkeys -i $firmware$file | Out-String
if($hacout -like '*Content Type: Meta*') {
Get-Item $firmware$file | Rename-Item -Path $firmware$file -NewName { $_.Name -replace '.nca','.cnmt.nca' }
$numfiles++
@twilight-sparkle-irl
twilight-sparkle-irl / swipernoswiping.csv
Last active February 3, 2019 20:25
a guide to twitter video download bots
id username
997774805511360512 this_vid
1074360508030074880 thisvid_
1078893871780847618 this_vid_
708564331332444160 GetVideoBot
1010484773066887168 DownloaderBot
@AveYo
AveYo / .. MediaCreationTool.bat ..md
Last active November 18, 2024 01:03
Universal MediaCreationTool wrapper for all MCT Windows 10 versions - MOVED TO github.com/AveYo/MediaCreationTool.bat
@jkhsjdhjs
jkhsjdhjs / online-net_systemd-network-configuration.md
Last active December 16, 2022 19:53
online.net: systemd Network Configuration with (r)DNS

online.net: systemd Network Configuration with (r)DNS

Introduction

This document will guide you through the process of setting up your online.net network addresses, DNS servers and rDNS records. For IPv4 we will use systemd-networkd (part of systemd) and odhcp6c (OpenWrt embedded DHCPv6-client) together with iproute2 for IPv6. For DNS we'll use systemd-resolved.

systemd is the default init process on Arch Linux, Debian GNU/Linux, Fedora, Ubuntu and more. iproute2 is also preinstalled there. So, if you're using a distribution that uses systemd, this tutorial should work for you. If you're using Gentoo Linux first make sure that you're using systemd.

Table of Contents

@egmontkob
egmontkob / Hyperlinks_in_Terminal_Emulators.md
Last active November 13, 2024 14:50
Hyperlinks in Terminal Emulators
@azlux
azlux / Warning_IPTABLES.md
Last active March 7, 2022 11:08
Sécurité avec iptables et l'option RELATED

Problème d'ouvertue de port non désirée sur une configuration IPTABLES

Un problème de contournement des règles iptables fixées par utilisateur peut survenir avec l’utilisation de règles iptables RELATED,ESTABLISH trop générique et le chargement de helper de service non présent ou non utilisé sur la machine (exemple FTP actif, SIP, IRC …).

True fact: Mon server MariaDB s'est fait attaqué comme ça alors que le port dans l'iptable n'était pas ouvert.


Menu

  1. Rappel
@azlux
azlux / py_progress_bar.py
Created June 20, 2016 14:52
Progress bar into the terminal in python3
def progress_bar(iteration, total, barLength=50):
percent = int(round((iteration / total) * 100))
nb_bar_fill = int(round((barLength * percent) / 100))
bar_fill = '#' * nb_bar_fill
bar_empty = ' ' * (barLength - nb_bar_fill)
sys.stdout.write("\r [{0}] {1}%".format(str(bar_fill + bar_empty), percent))
sys.stdout.flush()
def bar_example():
for i in range(20):