Skip to content

Instantly share code, notes, and snippets.

View bendangelo's full-sized avatar

Benji bendangelo

View GitHub Profile
@nemotoo
nemotoo / .gitattributes
Last active July 15, 2025 18:01
.gitattributes for Unity3D with git-lfs
## Unity ##
*.cs diff=csharp text
*.cginc text
*.shader text
*.mat merge=unityyamlmerge eol=lf
*.anim merge=unityyamlmerge eol=lf
*.unity merge=unityyamlmerge eol=lf
*.prefab merge=unityyamlmerge eol=lf
@sinclairtarget
sinclairtarget / BasicGradient.shader
Created January 25, 2016 03:04
Simple Gradient Shader
Shader "Custom/BasicGradient"
{
Properties
{
_TopColor ("Top Color", Color) = (1, 1, 1, 1)
_BottomColor ("Bottom Color", Color) = (1, 1, 1, 1)
_RampTex ("Ramp Texture", 2D) = "white" {}
}
SubShader
@tahmidsadik
tahmidsadik / purgeAndroid.txt
Created September 19, 2015 18:47
How to completely remove Android Studio from Mac OS X
How to Completely Remove Android Studio
Execute these commands from the terminal
rm -Rf /Applications/Android\ Studio.app
rm -Rf ~/Library/Preferences/AndroidStudio*
rm ~/Library/Preferences/com.google.android.studio.plist
rm -Rf ~/Library/Application\ Support/AndroidStudio*
rm -Rf ~/Library/Logs/AndroidStudio*
@ciathyza
ciathyza / Bitmap2D.cs
Created August 26, 2015 04:25
Bitmap2D for Unity3D. Actually just a wrapper for Texture2D that allows for better pixel manipulation.
//
// Created 8/26/2015 00:23:25
// Copyright © Hexagon Star Softworks. All Rights Reserved.
// http://www.hexagonstar.com/
//
using System;
using System.Collections;
using UnityEngine;
@moret
moret / haxe-openfl.sh
Last active June 6, 2021 17:30
Install Haxe using Brew and set the haxelib path
# Install Haxe using Brew and set the haxelib path
brew install haxe
haxelib setup /usr/local/Cellar/haxe/lib
# Install lime
haxelib install lime
# Install lime tools
haxelib install format
haxelib install svg
@desaroxx
desaroxx / avatar.js
Last active November 18, 2023 16:54
JavaScript: create github "like" identicon avatar (result: dataurl image/png)
(function() {
// see code in action: https://jsfiddle.net/desaroxx/jp4pmd2u/
/* Configuration variables */
var MAX_COLOR = 200; // Max value for a color component
var MIN_COLOR = 120; // Min value for a color component
var FILL_CHANCE = 0.5; // Chance of a square being filled [0, 1]
var SQUARE = 80; // Size of a grid square in pixels
var GRID = 5; // Number of squares width and height
@TarasOsiris
TarasOsiris / FlowMap.shader
Last active January 17, 2025 07:47
Flow Map Shader for Unity3D. Used with Sprites.
Shader "Custom/Flow Map"
{
Properties
{
[PerRendererData] _MainTex ("Sprite Texture", 2D) = "white" {}
_Color ("Tint", Color) = (1,1,1,1)
// Flow
_FlowMap ("Flow Map", 2D) = "white" {}
_FlowSpeed ("Flow Speed", float) = 0.05
Pry.config.editor = "vim --noplugin"
if defined?(PryByebug)
Pry.commands.alias_command 'c', 'continue'
Pry.commands.alias_command 's', 'step'
Pry.commands.alias_command 'n', 'next'
Pry.commands.alias_command 'f', 'finish'
Pry.commands.alias_command 'b', 'break'
Pry.commands.alias_command 'bda', 'break --disable-all'
end
@eoinkelly
eoinkelly / postgres-upgrade-recipe.sh
Last active November 9, 2017 16:59
Upgrade Postgres to 9.4 using Homebrew on Mac OSX
#!/bin/bash
# This script can be used in "run & hope" mode or you can use it as a recipe to
# do things manually - you probably want the latter if you really care about
# the data in your databases.
# Happy hacking
# /Eoin/
# Tell bash to stop if something goes wrong
set -e
# Using these pry gems -- copy to your Gemfile
# group :development, :test do
# gem 'awesome_print' # pretty print ruby objects
# gem 'pry' # Console with powerful introspection capabilities
# gem 'pry-byebug' # Integrates pry with byebug
# gem 'pry-doc' # Provide MRI Core documentation
# gem 'pry-rails' # Causes rails console to open pry. `DISABLE_PRY_RAILS=1 rails c` can still open with IRB
# gem 'pry-rescue' # Start a pry session whenever something goes wrong.
# gem 'pry-theme' # An easy way to customize Pry colors via theme files
# end