Discover gists
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const pdfFilePath = path.resolve(__dirname, './sample.pdf'); | |
/** | |
* https://www.npmjs.com/package/pdf2pic | |
* https://github.com/yakovmeister/pdf2image#readme | |
* | |
* Following is an overview of the options that can be passed on the pdf2pic methods: | |
* quality - set output's image quality | |
* format - set output's file format | |
* width - set output's width |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* https://www.npmjs.com/package/pngjs | |
* https://github.com/lukeapage/pngjs | |
* Recreate PNG with metadata from extracted Base64 data URI | |
*/ | |
const buffer = Buffer.from(dataUri, 'base64'); | |
const png = PNG.sync.read(buffer); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* https://www.npmjs.com/package/jsqr | |
* https://github.com/cozmo/jsQR#readme | |
* Extract the Code from recreated PNG using jsQR | |
*/ | |
const code = jsQR(Uint8ClampedArray.from(png.data), png.width, png.height); | |
const qrCodeText = code?.data; | |
console.log('QR Code Text: ', qrCodeText); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.io.File | |
val path = "path/to/project/directory" // TODO: change here | |
println("Processing in folder: $path") | |
println() | |
fun writeDependenciesFromVersionCatalog(path: String) { | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" 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 | |
""" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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'; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
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) |
NewerOlder