Skip to content

Instantly share code, notes, and snippets.

View Ilink's full-sized avatar

Ian Link Ilink

  • Splunk
  • San Francisco
View GitHub Profile
@jcowles
jcowles / FullScreenQuad.shader
Last active January 23, 2023 03:58
Make a standard Unity Quad full-screen, purely in the shader
//
// 1. Add a Quad in Unity
// 2. Parent the quad under camera, to prevent frustum culling.
// 3. Attach this shader.
//
Shader "Quad/Fullscreen"
{
Properties
{
}
@paragonie-scott
paragonie-scott / crypto-wrong-answers.md
Last active April 21, 2024 23:48
An Open Letter to Developers Everywhere (About Cryptography)
@aras-p
aras-p / SkyboxBackgroundTexture.shader
Last active January 9, 2024 00:28
Unity flat skybox picture shader
// Skybox shader that just draws flat texture in the background
Shader "Skybox/Background Texture"
{
Properties
{
_MainTex ("Texture", 2D) = "white" {}
}
SubShader
{
Tags { "Queue"="Background" "RenderType"="Background" "PreviewType"="Skybox" }
@seyDoggy
seyDoggy / let g:ctrlp_custom_ignore
Created December 3, 2014 14:02
Getting around spf13-vim's ctrlp_user_command in order to set ctrlp_custom_ignore
" The custom ignore feature in ctrlp.vim is a useful feature
" when you want to ignore files and folder in your directory
" structure. However if yo set g:ctrlp_user_command then
" g:ctrlp_custom_ignore had no effect. This is all well and
" and good unless you use a vim distribution like spf13-vim
" that just so happens to set g:ctrlp_user_command. So here
" is how you get around that issue in your own .vimrc.local:
"
" unlet the original spf13-vim settings
unlet g:ctrlp_custom_ignore
@drewish
drewish / TestMeshApp.cpp
Last active August 29, 2015 14:05
Simple demo to compare drawing 2D triangles with Cinder's VBO and TriMesh wrappers
// Simple demo to compare drawing 2D triangles with Cinder's VBO and TriMesh wrappers.
// https://drewish.com/2014/08/16/comparing-the-trimesh-and-vbomesh-in-cinder/
#include "cinder/app/AppBasic.h"
#include "cinder/gl/gl.h"
#include "cinder/gl/Vbo.h"
#include "cinder/Trimesh.h"
#include "cinder/params/Params.h"
using namespace ci;
@gongzhitaao
gongzhitaao / CppTimer.md
Last active January 28, 2024 14:25
Simple high resolution timer in C++

A simple Timer class that provides satisfying resolution.

API

  • Timer() constructs the timer.
  • .reset() resets the timer
  • .elapsed() returns elapsed seconds in double since last reset.
@kizzx2
kizzx2 / fun.cpp
Last active March 29, 2022 04:12
Illustrative C++ Lua binding example/tutorial
// fun.cpp
// This is for Lua 5.2, for Lua 5.1, see https://gist.github.com/kizzx2/1594905
#include <lua.hpp>
#include <iostream>
#include <sstream>
class Foo
{
#include <string.h>
#include <stdlib.h>
#include <stdio.h>
int main(int argc, char *argv[])
{
char *buf1 = malloc(256);
char *buf2 = malloc(512);
char *buf3 = malloc(1024);
char *top, *aftertop;
@mbostock
mbostock / .block
Last active March 6, 2024 04:06
Gradient Along Stroke
license: gpl-3.0