Skip to content

Instantly share code, notes, and snippets.

Shader "Hidden/JumpFloodOutline"
{
Properties
{
_MainTex ("Texture", 2D) = "white" {}
}
SubShader
{
Tags { "PreviewType" = "Plane" }
Cull Off ZWrite Off ZTest Always
#define STB_IMAGE_IMPLEMENTATION
#define STB_IMAGE_WRITE_IMPLEMENTATION
#define STB_RECT_PACK_IMPLEMENTATION
#include "stb_image.h"
#include "stb_image_write.h"
#include "stb_rect_pack.h"
#include "bitmap.h"
#include <stdio.h>
#include <stdint.h>
#include <stdlib.h>
@thennequin
thennequin / DisplayInImGui.cpp
Last active November 16, 2022 16:00
Ini Config Reader/Writer
Ini::IniConfig& m_oIniConfig;
Ini::CategoryValueMap& mCategories = m_oIniConfig.GetCategories();
if (ImGui::Button("Reload"))
{
m_oIniConfig.Load("Config.ini", true, false);
}
ImGui::SameLine();
if (ImGui::Button("Save"))
@Jawnnypoo
Jawnnypoo / BuildScript.cs
Last active December 5, 2023 12:54
Typical Buildscript for Unity on Jenkins. Run with command line args "-quit -batchmode -projectPath ${WORKSPACE} -executeMethod BuildScript.PerformAndroidBuild -logfile /dev/stdout"
using UnityEditor;
using System;
using System.Collections.Generic;
class BuildScript {
static string[] SCENES = FindEnabledEditorScenes();
static string APP_NAME = "AngryBots";
static string TARGET_DIR = "target";
@fairlight1337
fairlight1337 / hsvrgb-cpp
Created June 2, 2014 07:39
Simple RGB/HSV conversion in C++
// Copyright (c) 2014, Jan Winkler <winkler@cs.uni-bremen.de>
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are met:
//
// * Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
// * Redistributions in binary form must reproduce the above copyright
// notice, this list of conditions and the following disclaimer in the
@bcjordan
bcjordan / spiral-traversal.md
Last active April 29, 2016 17:19
Spiral Traversal problem solutions
  • Bernie Margolis in Java (gist)
  • Florent Crivello in Objective-C (gist)
  • Srismil Dutta in Javascript (gist)
  • Eran Zimbler in Javascript (gist and node.js module)
  • Maurin Lenglart in Javascript (gist)
  • Ankit Goyal in Ruby (gist, imgur clean notes, original notes)
  • Kevin Le Brun in Python (with a nice writeup and tests!) (gist), who accurately notes "I saw a typo in the second test case for the problem. You should replace '194' with '14'."
  • C is for Conrad Meyer (another C solution) (gist)
  • Péter Ferenczy in Ruby (utilizing laz
# bash <(curl -s https://gist.github.com/drye/5387341/raw/ec72cddfe43ec3d39c91a3c118cb68ab14a049f8/enable_dnsmasq_on_osx.sh)
# ----------------------
# installing dnsmasq and enable daemon
# ----------------------
brew install dnsmasq
sudo cp -v $(brew --prefix dnsmasq)/homebrew.mxcl.dnsmasq.plist /Library/LaunchDaemons
# ----------------------
# adding resolver for vbox domain
# ----------------------
@kamermans
kamermans / fail2ban-allstatus.sh
Created July 11, 2011 17:06
Show status of all fail2ban jails at once
#!/bin/bash
JAILS=`fail2ban-client status | grep "Jail list" | sed -E 's/^[^:]+:[ \t]+//' | sed 's/,//g'`
for JAIL in $JAILS
do
fail2ban-client status $JAIL
done