Skip to content

Instantly share code, notes, and snippets.

@bgolus
bgolus / WorldNormalFromDepthTexture.shader
Last active April 25, 2024 03:51
Different methods for getting World Normal from Depth Texture, without any external script dependencies.
Shader "WorldNormalFromDepthTexture"
{
Properties {
[KeywordEnum(3 Tap, 4 Tap, Improved, Accurate)] _ReconstructionMethod ("Normal Reconstruction Method", Float) = 0
}
SubShader
{
Tags { "RenderType"="Transparent" "Queue"="Transparent" }
LOD 100
@squarism
squarism / iterm2.md
Last active April 25, 2024 03:50
An iTerm2 Cheatsheet

Tabs and Windows

Function Shortcut
New Tab + T
Close Tab or Window + W (same as many mac apps)
Go to Tab + Number Key (ie: ⌘2 is 2nd tab)
Go to Split Pane by Direction + Option + Arrow Key
Cycle iTerm Windows + backtick (true of all mac apps and works with desktops/mission control)
{%comment%}
#############################################
# Mohamed El-Ghorfi Discount Code on Cart #
# [UPDATED] #
#############################################
# Paypal Me: https://paypal.me/elghorfimed #
# Buy Me A Coffee: #
# https://www.buymeacoffee.com/elghorfi #
#############################################
# elghorfi.med@gmail.com #
const { calcularTotal } = require("../../src/compras/compras")
const assert = require("node:assert");
describe('Compras', () => {
describe('#calcularTotal', () => {
it('deve calcular o total a pagar pelas ferramentas', () => {
const ferramentas = [
{ nome: "UFT", preco: 100, fabricante: "OpenText" },
{ nome: "TestComplete", preco: 200, fabricante: "Smartbear" },
{ nome: "TOSCA", preco: 300, fabricante: "Tricents" }
@HailStorm32
HailStorm32 / DLU-Native-Windows-Setup-Guide.md
Last active April 25, 2024 03:40
DLU-Native-Windows-Setup-Guide

Before you start

You will need to find and download an unpacked LEGO Universe client (this guide will work for packed and unpacked clients). Make sure that its hash matches the ones mentioned in the repo README

This tutorial was done in Windows 11. The way some things are accessed might be different in older versions of Windows

Setup

Programs to install

You will need to install the following software

@jaredkc
jaredkc / group-posts-by-terms.php
Last active April 25, 2024 03:39
Wordpress: get posts and group by taxonomy terms.
/**
* Get posts and group by taxonomy terms.
* @param string $posts Post type to get.
* @param string $terms Taxonomy to group by.
* @param integer $count How many post to show per taxonomy term.
*/
function list_posts_by_term( $posts, $terms, $count = -1 ) {
$tax_terms = get_terms( $terms, 'orderby=name');
$args = array(
@iam-hussain
iam-hussain / default HTTP
Last active April 25, 2024 03:37
Serve nextJS app from a port through NGINX reverse proxy HTTP and HTTPS
# Serve nextJS app from a port through NGINX reverse proxy (HTTP)
# Path: /etc/nginx/sites-available/default
# Default server configuration for HTTP
server {
server_name www.DOMAINNAME.com DOMAINNAME.com;
# Serve any static assets with NGINX
location /_next/static {
alias /home/ubuntu/PROJECT_FOLDER/.next/static;
@taviso
taviso / pmftool.c
Created February 27, 2013 19:55
Quick tool to generate PMF files for process monitor without having to use the GUI.
#include <stdio.h>
#include <stdint.h>
#include <stdlib.h>
#include <stdbool.h>
#include <iconv.h>
#include <string.h>
#include <assert.h>
// Quick utility to generate Process Monitor filter sets for testing.
// Tavis Ormandy <taviso@cmpxchg8b.com>
@varyonic
varyonic / Dockerfile
Created June 10, 2016 14:14
Dockerfile with chromedriver
# See https://codeship.com/documentation/docker/browser-testing/
FROM myapp:base
# We need wget to set up the PPA and xvfb to have a virtual screen and unzip to install the Chromedriver
RUN apt-get install -y wget xvfb unzip
# Set up the Chrome PPA
RUN wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add -
RUN echo "deb http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google.list