Skip to content

Instantly share code, notes, and snippets.

View optionsx's full-sized avatar

optionsx

  • Kurdistan
View GitHub Profile
@smx-smx
smx-smx / XZ Backdoor Analysis
Last active June 2, 2024 07:22
[WIP] XZ Backdoor Analysis and symbol mapping
XZ Backdoor symbol deobfuscation. Updated as i make progress

I created a dedicated HTTP API for official ChatGPT API, its using POST so it can handle long prompts and it supports setting all OpenAI properties

Example in NodeJS: (Its same for other languages you need to create a post request like below)

Ask ChatGPT a question

axios({
    method: 'post',
    url: 'https://chatgpt.pawan.krd/ask',
    headers: {
@mannguyen0107
mannguyen0107 / main.ts
Created January 3, 2022 14:25
Gramjs album event handler with download photo
albumEventHandler = async (event: AlbumEvent) => {
const messages = event.messages;
const chat = (await messages[0].getChat()) as Api.Channel;
const chatId = messages[0].chatId.toString();
const noForwards = chat.noforwards;
await this.sendAlbumToForwardChannel(messages, chatId, noForwards);
};
sendAlbumToForwardChannel = async (
messages: Api.Message[],

@kangax's ES6 quiz, explained

@kangax created a new interesting quiz, this time devoted to ES6 (aka ES2015). I found this quiz very interesting and quite hard (made myself 3 mistakes on first pass).

Here we go with the explanations:

Question 1:
(function(x, f = () => x) {