Skip to content

Instantly share code, notes, and snippets.

@tetebueno
tetebueno / script.js
Last active April 17, 2024 11:30
K6 website test
import http from 'k6/http';
import { check, sleep } from 'k6';
export const URL = 'https://test.k6.io';
export default function () {
let res = http.get(URL);
check(res, {
'resource returns status 200': (r) => r.status === 200,
});
@tetebueno
tetebueno / google_photos_takeout_metadata_resolver.py
Created February 18, 2021 13:39
Google Photos Takeout archive holds a JSON file with photo/video metadata, thing is that the naming for this JSON file is not always so obvious. This takes care of resolving the name with all the variants I found so far.
import re as _re
import json as _json
JSON_EXTENSION = '.json'
def find_json_for_file(file: Path):
try:
if file.with_name(file.name + JSON_EXTENSION).is_file():
# file.jpg -> file.jpg.json
the_json_path = file.with_name(file.name + JSON_EXTENSION)
@tetebueno
tetebueno / install-custom-dxvk.sh
Last active March 3, 2023 04:04
Install custom DXVK for Lutris (Ubuntu 18.04)
#!/bin/bash
# References:
# https://www.youtube.com/watch?v=X6Vk_J3p2KA
# https://launchpad.net/~mati865/+archive/ubuntu/mingw-w64
# https://github.com/doitsujin/dxvk/issues/766#issuecomment-442079595
# Vulkan
sudo aptitude install libvulkan1 libvulkan1:i386 python3-pip
#!/bin/bash
wget https://raw.githubusercontent.com/OAI/OpenAPI-Specification/master/examples/v2.0/yaml/petstore.yaml
sudo docker run --name swagger-demo -d -p 80:8080 -v ${PWD}:/conf -e SWAGGER_JSON=/conf/petstore.yaml swaggerapi/swagger-ui