Skip to content

Instantly share code, notes, and snippets.

View Kabie's full-sized avatar
🥕
Collecting carrots

Kabie

🥕
Collecting carrots
View GitHub Profile
@marcan
marcan / m1cat.c
Last active October 26, 2023 15:42
m1cat: a PoC for the M1RACLES covert channel vulnerability in the Apple M1
/*
* m1cat: a proof of concept for the M1RACLES vulnerability in the Apple M1.
*
* This program implements a covert channel that can be used to transmit data
* between two processes when run on the Apple Silicon "M1" CPUs.
*
* The channel is slightly lossy due to (presumably) the scheduler sometimes
* scheduling us on the wrong CPU cluster, so this PoC sends every byte twice
* together with some metadata/framing bits, which is usually good enough.
* A better approach would be to use proper FEC or something like that.
@Towkin
Towkin / GeneratedTerrainShader.shader
Created August 15, 2018 21:05
A simple terrain generator shader. You need to get a simplex noise shader from https://github.com/keijiro/NoiseShader that fits your platform, by default this is intended for HLSL.
Shader "Custom/GeneratedTerrainShader" {
CGINCLUDE
#include "Tessellation.cginc"
#include "HLSL/SimplexNoise3D.hlsl"
ENDCG
Properties {
_Tess("Tessellation", Range(1,128)) = 4
_HeightOctaves("Height Octaves", Range(1, 16)) = 8
@nadavrot
nadavrot / Matrix.md
Last active June 17, 2024 09:16
Efficient matrix multiplication

High-Performance Matrix Multiplication

This is a short post that explains how to write a high-performance matrix multiplication program on modern processors. In this tutorial I will use a single core of the Skylake-client CPU with AVX2, but the principles in this post also apply to other processors with different instruction sets (such as AVX512).

Intro

Matrix multiplication is a mathematical operation that defines the product of

@phi-lira
phi-lira / UniversalPipelineTemplateShader.shader
Last active June 15, 2024 02:13
Template shader to use as guide to create Universal Pipeline ready shaders. This shader works with Universal Render Pipeline 7.1.x and above.
// When creating shaders for Universal Render Pipeline you can you the ShaderGraph which is super AWESOME!
// However, if you want to author shaders in shading language you can use this teamplate as a base.
// Please note, this shader does not necessarily match perfomance of the built-in URP Lit shader.
// This shader works with URP 7.1.x and above
Shader "Universal Render Pipeline/Custom/Physically Based Example"
{
Properties
{
// Specular vs Metallic workflow
[HideInInspector] _WorkflowMode("WorkflowMode", Float) = 1.0
@anvk
anvk / psql_useful_stat_queries.sql
Last active June 14, 2024 12:50
List of some useful Stat Queries for PSQL
--- PSQL queries which also duplicated from https://github.com/anvk/AwesomePSQLList/blob/master/README.md
--- some of them taken from https://www.slideshare.net/alexeylesovsky/deep-dive-into-postgresql-statistics-54594192
-- I'm not an expert in PSQL. Just a developer who is trying to accumulate useful stat queries which could potentially explain problems in your Postgres DB.
------------
-- Basics --
------------
-- Get indexes of tables
@aparrish
aparrish / understanding-word-vectors.ipynb
Last active June 16, 2024 02:26
Understanding word vectors: A tutorial for "Reading and Writing Electronic Text," a class I teach at ITP. (Python 2.7) Code examples released under CC0 https://creativecommons.org/choose/zero/, other text released under CC BY 4.0 https://creativecommons.org/licenses/by/4.0/
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
#CXRLE Pos=-7289,-1110
x = 10016, y = 6796, rule = B3/S23
5843b2o$5843b2o4$5861bobo$5856bo4bo2bo$5857b2o5b2o8bo$5852b2o8bo3b2o5b
obo$5852b2o10b2o6bob2o$5841b2obob2o13bo2bo6b2ob2o$5861bobo8bob2o$5841b
o5bo25bobo8b2o$5864bo9bo9bobo$5842b2ob2o16bo22bo$5844bo18b3o20b2o6$
5847bo17b2o$5841b3o4b2o15b2o$5840bo3bo2b2o2$5839bo5bo$5839b2o3b2o2$
5864b2o$5864bobo$5866bo$5866b2o$5839b2o$5840bo$5837b3o$5837bo7$5851bo$
5851b3o$5854bo14bobo$5853b2o6b2o7b2o5b2o$5860bobo7bo6bo$5861bo16b3o$
5880bo2$5848b2o$5848b2o6b2o29b2o$5856b2o28bo2bo$5887b2o$5865b2o20b2o$
5865b2o19b2o8b2o$5885b2obo6bobo$5850b2o33b2obo7bo$5849bobo35bo$5849bo
@NickCraver
NickCraver / Build.xml
Last active July 7, 2023 16:40
Stack Overflow Build Reference Docs
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="PrepareStaticContent" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<!-- Passed in Parameters -->
<configuration></configuration>
<workingDir></workingDir>
<buildNumber></buildNumber>
<buildViews>false</buildViews>
<minifyJs>true</minifyJs>
<TargetsDirectory></TargetsDirectory>
@BartKrol
BartKrol / haproxy.cfg
Created February 2, 2016 11:34
HAProxy Websockets config
global
maxconn 4096
defaults
mode http
balance roundrobin
option redispatch
option forwardfor
timeout connect 5s