Skip to content

Instantly share code, notes, and snippets.

@malteneuss
malteneuss / Dockerfile
Created April 28, 2022 19:43
Nextjs + Prisma DB (query and migrations) in Docker
# Adapted from https://github.com/vercel/next.js/blob/canary/examples/with-docker/Dockerfile
# Install dependencies only when needed
FROM node:16-alpine AS deps
# Check https://github.com/nodejs/docker-node/tree/b4117f9333da4138b03a546ec926ef50a31506c3#nodealpine to understand why libc6-compat might be needed.
RUN apk add --no-cache libc6-compat
WORKDIR /app
COPY package.json package-lock.json ./
RUN npm ci
# Rebuild the source code only when needed
@AlexMerzlikin
AlexMerzlikin / UniversalRenderPipelineTemplateWithDotsInstancing.shader
Last active March 29, 2024 12:50
Template unlit URP shader that supports DOTS instancing to use as a guide to create shaders for BatchRendererGroup since BRG only works with DOTS instancing compatible shaders. Unfortunately, the official docs about it haven't helped me that much, and I thought others might face the same issues.
Shader "Universal Render Pipeline/Custom/UnlitWithDotsInstancing"
{
Properties
{
_BaseMap ("Base Texture", 2D) = "white" {}
_BaseColor ("Base Colour", Color) = (1, 1, 1, 1)
}
SubShader
{
@MaxySpark
MaxySpark / fmovies-9anime.user.js
Last active March 29, 2024 12:48
User Script to Get Direct Download Link of Movie Series and Anime from http://fmovies.to and http://9anime.to . First install "TAMPERMONKEY" OR "GREASEMONKEY" extention/plugin in your browser
// ==UserScript==
// @name Direct Download From fmovies
// @namespace http://maxyspark.com/
// @version 0.1
// @description Direct Download From fmovies
// @author MaxySpark
// @match http://fmovies.to/*
// @match https://fmovies.to/*
// @match http://9anime.to/*
// @grant none
@avidale
avidale / create_rut5-base.ipynb
Created April 30, 2021 21:51
create_rut5-base.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@HungryProton
HungryProton / depth_override_shader.gdshader
Last active March 29, 2024 12:45
A Godot 4 shader to make things appear on top of other things within a range.
// A Godot 4 shader to make things appear on top of other things within a range.
// Initially, this was made so my characters' facial features would be rendered on top of their hair.
shader_type spatial;
render_mode unshaded;
uniform sampler2D depth_texture : hint_depth_texture, repeat_disable, filter_nearest;
// Maximum depth we can overdraw relative to the object original depth, in ENGINE UNITS.
@rxaviers
rxaviers / gist:7360908
Last active March 29, 2024 12:42
Complete list of github markdown emoji markup

People

:bowtie: :bowtie: πŸ˜„ :smile: πŸ˜† :laughing:
😊 :blush: πŸ˜ƒ :smiley: ☺️ :relaxed:
😏 :smirk: 😍 :heart_eyes: 😘 :kissing_heart:
😚 :kissing_closed_eyes: 😳 :flushed: 😌 :relieved:
πŸ˜† :satisfied: 😁 :grin: πŸ˜‰ :wink:
😜 :stuck_out_tongue_winking_eye: 😝 :stuck_out_tongue_closed_eyes: πŸ˜€ :grinning:
πŸ˜— :kissing: πŸ˜™ :kissing_smiling_eyes: πŸ˜› :stuck_out_tongue:
@SivaramPg
SivaramPg / pdf2base64.js
Last active March 29, 2024 12:34
Convert a PDF file to Base64 String
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
@SivaramPg
SivaramPg / buffer2png.js
Last active March 29, 2024 12:34
Convert Base64 image URI to buffer and read buffer as PNG
/**
* 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);