Skip to content

Instantly share code, notes, and snippets.

View ming4883's full-sized avatar

Ka-ming Chan ming4883

  • Tencent Games
  • Hong Kong
View GitHub Profile
@aras-p
aras-p / OnlyShadowsAndAtten.shader
Created December 9, 2015 14:08
Shadows and Attenuation Only Shader
Shader "Custom/OnlyShadowsAndAtten"
{
SubShader
{
Tags { "RenderType"="Opaque" }
LOD 200
// Forward rendering base (main directional light) pass.
Pass
{
@joseluisq
joseluisq / terminal-git-branch-name.md
Last active July 4, 2024 15:00
Add Git Branch Name to Terminal Prompt (Linux/Mac)

Add Git Branch Name to Terminal Prompt (Linux/Mac)

image

Open ~/.bash_profile in your favorite editor and add the following content to the bottom.

# Git branch in prompt.

parse_git_branch() {
ACTION
AD_HOC_CODE_SIGNING_ALLOWED
ALTERNATE_GROUP
ALTERNATE_MODE
ALTERNATE_OWNER
ALWAYS_SEARCH_USER_PATHS
ALWAYS_USE_SEPARATE_HEADERMAPS
APPLE_INTERNAL_DEVELOPER_DIR
APPLE_INTERNAL_DIR
APPLE_INTERNAL_DOCUMENTATION_DIR
@TimSC
TimSC / vlcsms.c
Created November 20, 2012 22:59
Using libvlc to extract raw frames and audio from media via smem
//To compile:
//cc vlcsms.c -o vlcsms -lvlc
//This source is by Tim Sheerman-Chase and it is released as public domain.
#include <stdio.h>
#include <stdint.h>
#include <stdlib.h>
#include <unistd.h>
#include <inttypes.h>
#include <vlc/vlc.h>
@exavolt
exavolt / sdl2_opengl.c
Created April 11, 2012 16:36
Very basic SDL2 OpenGL application
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <math.h>
#include <SDL2/SDL.h>
#include <SDL2/SDL_opengl.h>