Skip to content

Instantly share code, notes, and snippets.

View lmarcondes's full-sized avatar

Lucas Marcondes lmarcondes

  • Sao Paulo
  • 12:09 (UTC -03:00)
View GitHub Profile
makepkg --printsrcinfo > .SRCINFO
#!/usr/bin/env sh
openssl aes-128-cbc -d \
-K babb4a9f774ab853c96c2d653dfe544a \
-iv 00000000000000000000000000000000 \
-in $1 | \
dd bs=1 skip=16 2>/dev/null
docker run \
-d --network host \
-e HTTP_PORT=9000 \
--name zoonavigator \
--restart unless-stopped \
elkozmon/zoonavigator:latest
import boto3
from argparse import ArgumentParser
def delete_objects(bucket):
bucket.objects.all().delete()
def delete_bucket(bucket):
try:
#!/bin/usr/env bash
## Source: https://tizutech.com/plex-transcoding-with-docker-nvidia-gpu/
## Setting up the package repository
curl -fsSL https://nvidia.github.io/libnvidia-container/gpgkey | sudo gpg --dearmor -o /usr/share/keyrings/nvidia-container-toolkit-keyring.gpg \
&& curl -s -L https://nvidia.github.io/libnvidia-container/stable/deb/nvidia-container-toolkit.list | \
sed 's#deb https://#deb [signed-by=/usr/share/keyrings/nvidia-container-toolkit-keyring.gpg] https://#g' | \
sudo tee /etc/apt/sources.list.d/nvidia-container-toolkit.list
mdadm --add /<dev>
mdadm --grow --raid-devices=n <raid-device>
# Growpart will make the partition occuppy all the space
# on the device. This is very fast in XFS or RAID
growpart <partition>
# xfs_growfs will grow the filesystem to the max partition size
xfs_growfs -d <mountpoint>
export DIR=-dsajn
export DIR2=$(echo $DIR | sed 's/[^a-zA-Z0-9]//g')
magick image.png -alpha off -resize 256x256 \
-define icon:auto-resize="256,128,96,64,48,32,16" \
favicon.ico
#!/bin/env python
from datetime import datetime
from openai import OpenAI
from argparse import ArgumentParser
import json
from pathlib import Path
from base64 import b64decode
from openai.types.image import Image
import requests
import json
from typing import List
def run(args: List[str]):
filename = args[0]
with open(filename, "r") as f:
data = json.loads(f.read())
original_entries = data['items']