##Cheat Sheet
- detailyang's Cheat Sheet
- shadowbq's Cheat Sheet
- DZone
- Our Favorite Cheat Sheets
- quick reference sheets in one page
##Interview
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 |
/** | |
* 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); |
/** | |
* 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); |
import java.io.File | |
val path = "path/to/project/directory" // TODO: change here | |
println("Processing in folder: $path") | |
println() | |
fun writeDependenciesFromVersionCatalog(path: String) { | |
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 |
""" 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 | |
""" |
<?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 |
<?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'; | |
} |