Skip to content

Instantly share code, notes, and snippets.

@ranemirusG
ranemirusG / exportChatGPTToMarkdown.js
Created July 20, 2024 18:40
Export ChatGPT conversation to markdown
function h(html) {
return html.replace(/<p>/g, '\n\n')
.replace(/<\/p>/g, '')
.replace(/<b>/g, '**')
.replace(/<\/b>/g, '**')
.replace(/<i>/g, '_')
.replace(/<\/i>/g, '_')
.replace(/<code[^>]*>/g, (match) => {
const lm = match.match(/class="[^"]*language-([^"]*)"/);
return lm ? '\n```' + lm[1] + '\n' : '```';
import requests
from bs4 import BeautifulSoup
def expand_linkedin_url(url):
try:
# Perform a GET request to the LinkedIn shortened URL
response = requests.get(url, allow_redirects=True)
# Parse the response content using BeautifulSoup
soup = BeautifulSoup(response.content, 'html.parser')
# Find the final URL from the interstitial page
@ranemirusG
ranemirusG / house_builder.sh
Created February 4, 2024 22:20 — forked from cgsdev0/house_builder.sh
house builder pattern in bash
#!/usr/bin/env bash
function house_builder() {
# floors,rooms,has_garage
echo "0,0,0"
}
function set_field() {
local f r g
IFS=, read f r g
@ranemirusG
ranemirusG / NppVimCrosswalk.md
Created January 30, 2024 02:05 — forked from Itai-arusi-Hlevi/NppVimCrosswalk.md
Crosswalk between Notepad++ and Vim utilities

Crosswalk between Notepad++ and Vim utilities

Action Notepad++ shortcut Vim shortcut
Duplicate line Ctrl+D yyp
Cut line Ctrl+L dd
Move line up/down Ctrl+Shift+<up/down> dd<k/j>p
Compare files File compare plugin wizard :vsplit <filename> or vimdiff file1 file2 (from command line)
Select all (from here to top/bottom of file) Ctrl+Shift+<home/end> v<gg/G>
Select all (from here up/down one page) Ctrl+Shift+ v Ctrl+
@ranemirusG
ranemirusG / windows_and_nix_cheatsheet.md
Last active August 27, 2023 14:04
Windows and *nix Command-Line Cheat Sheet

moved to

@ranemirusG
ranemirusG / web-crawler.pl
Created May 14, 2023 21:24
Simple web crawler in Perl
#!/usr/bin/perl -w
# A simple web crawler that demonstrates using LWP::Simple and Perl
use strict;
use LWP::Simple;
my $url = shift || die "Please provide an initial source url";
my $max = 10;

ELIMINA TWEETS ANTIGUOS

1 Solicita la descarga de tus datos de Twitter. Ve a "Configuración" -> "Cuenta" -> "Tus datos de Twitter" (Puede tomar hasta 24 horas (o más) para que Twitter prepare tus datos para la descarga. Así que hay que esperar)

2 Una vez que tus datos estén listos, recibirás un correo electrónico con un enlace para descargar un archivo zip. Extrae el archivo zip y ve al directorio "data" para acceder a tus datos de Twitter.