Skip to content

Instantly share code, notes, and snippets.

@Nua07
Nua07 / liveworksheet_auto_selector.js
Created April 16, 2021 03:19
liveworksheet_auto_selector
let elements = $("div#capa1>*")
for(let i = 0; i < elements.length; i++) {
if(contenidorellenado[i][0] == "select:yes"){
selectanswer(i)
}
}
import os
import requests
from bs4 import BeautifulSoup
from tqdm import tqdm
import urllib.parse
def path_to_url(host, path):
if not path.startswith("http"):
return "https://" + video_host + path
@Nua07
Nua07 / client.cpp
Created March 1, 2021 12:46 — forked from vedantroy/client.cpp
A C++ Client That Sends Data Over TLS Using OpenSSL
#include <errno.h>
#include <unistd.h>
#include <string.h>
#include <resolv.h>
#include <netdb.h>
#include <openssl/ssl.h>
#include <openssl/err.h>
//Not sure what headers are needed or not
//This code (theoretically) writes "Hello World, 123" to a socket over a secure TLS connection
@Nua07
Nua07 / jasypt.py
Created January 14, 2021 09:19 — forked from bertramn/jasypt.py
Jasypt/Bouncycastle PBEWITHSHA256AND256BITAES-CBC-BC en/decryption in Python
# Make coding more python3-ish
from __future__ import (absolute_import, division, print_function)
from abc import ABCMeta
from array import array
from base64 import b64encode, b64decode
from Crypto import Random
from Crypto.Cipher import AES
from Crypto.Hash import SHA256
from PIL import Image, ImageSequence
def webp2gif(data):
img = Image.open(io.BytesIO(data))
frames = []
for frame in ImageSequence.Iterator(img):
im2 = Image.new("RGB", frame.size, (255, 255, 255))
im2.paste(frame, mask=frame.split()[3])
frames.append(im2.convert('RGB').convert(
use std::fs::File;
use std::io::Read;
use std::io::Write;
use std::process::Stdio;
use std::process::Command;
fn webp2gif(data: Vec<u8>) -> Vec<u8> {
let mut conv = Command::new("convert")
.stdin(Stdio::piped())
.stdout(Stdio::piped())