Skip to content

Instantly share code, notes, and snippets.

@DHosseiny
DHosseiny / migrate-to-version-catalog.kts
Last active March 29, 2024 12:32
Script to migrate gradle dependencies and plugins to version catalog. This script looks for libs.version.toml file and uses existing added libraries and logs not added libraries(just copy from logs and paste in libraries section)
import java.io.File
val path = "path/to/project/directory" // TODO: change here
println("Processing in folder: $path")
println()
fun writeDependenciesFromVersionCatalog(path: String) {
@PurpleVibe32
PurpleVibe32 / vmwk17key.txt
Last active March 29, 2024 12:31
Free VMware Workstation Pro 17 full license keys
Install VMWare Workstation PRO 17 (Read it right. PRO!)
Also, these keys might also work with VMWare Fusion 13 PRO. Just tested it.
Sub to me on youtube pls - PurpleVibe32
if you want more keys - call my bot on telegram. @purector_bot (THE BOT WONT REPLY ANYMORE) - Or: https://cdn.discordapp.com/attachments/1040615179894935645/1074016373228978277/keys.zip - the password in the zip is 102me.
---
This gist can get off at any time.
PLEASE, DONT COPY THIS. IF YOU FORK IT, DONT EDIT IT.
*If you have a problem comment and people will try to help you!
*No virus
@Kludex
Kludex / main.py
Last active March 29, 2024 12:31
Run Gunicorn with Uvicorn workers in code
""" Snippet that demonstrates how to use Gunicorn with Uvicorn workers in code.
Feel free to run:
- `python main.py` - to use uvicorn.
- `ENV=prod python main.py` - to use gunicorn with uvicorn workers.
Reference: https://docs.gunicorn.org/en/stable/custom.html
"""
@johnfmorton
johnfmorton / proxy-for-partytown.php
Last active March 29, 2024 12:31
Simple proxy with php for use with Partytown
<?php
/**
* About this script:
* This proxy was built with PartyTown.js in mind. https://github.com/BuilderIO/partytown
* Partytown is a lazy-loaded library to help relocate resource intensive scripts into a
* web worker, and off of the main thread.
* Many third-party scripts already provide the correct CORS headers, but not all do.
* For services that do not add the correct headers, then a reverse proxy to another domain must be used in order to provide the CORS headers.
* see: https://github.com/BuilderIO/partytown/wiki/Proxying-Requests
@Crocoblock
Crocoblock / rel-get-items-by-relation.php
Created March 27, 2023 18:55
JetEngine Related Items by Sibling Relation Macro
<?php
add_action( 'jet-engine/register-macros', function(){
class Related_Items_By_Sibling_Relation extends \Jet_Engine_Base_Macros {
public function macros_tag() {
return 'rel_get_items_by_relation';
}
@megodoonch
megodoonch / spreadsheet_updater.py
Created July 4, 2023 17:39
Utrecht University spreadsheet updater for OSIRIS
"""
Given a TSV spreadsheet with, minimally, the student ID and the final mark,
and a TSV spreadsheet as downloaded from OSIRIS and converted to TSV,
writes a new TSV spreadsheet as required by OSIRIS (needs to be converted to .xsls)
USAGE:
python spreadsheet_updater.py path/to/marks/tsv path/to/osiris/tsv path/to/write/new/tsv/to
Possible changes to make:
- final_mark_column_name in file with marks (set as Final Grade)
@guest271314
guest271314 / javascript_engines_and_runtimes.md
Last active March 29, 2024 12:26
A list of JavaScript engines, runtimes, interpreters

V8 is Google’s open source high-performance JavaScript and WebAssembly engine, written in C++. It is used in Chrome and in Node.js, among others. It implements ECMAScript and WebAssembly, and runs on Windows 7 or later, macOS 10.12+, and Linux systems that use x64, IA-32, ARM, or MIPS processors. V8 can run standalone, or can be embedded into any C++ application.

SpiderMonkey is Mozilla’s JavaScript and WebAssembly Engine, used in Firefox, Servo and various other projects. It is written in C++, Rust and JavaScript. You can embed it into C++ and Rust projects, and it can be run as a stand-alone shell. It can also be [compiled](https://bytecodealliance.org/articles/making-javascript-run-fast-on

@Meister1593
Meister1593 / patch_bindings_spam.sh
Last active March 29, 2024 12:24
Updated for steamvr 2.3.5
#!/bin/bash
echo "Latest known working version for patching: 2.3.5"
if [[ -z "$1" ]]; then
echo 'Enter absolute path to SteamVR (for example, /home/user/.local/share/Steam/steamapps/common/SteamVR)'
read STEAMVR_PATH
else
STEAMVR_PATH="$1"
fi