Skip to content

Instantly share code, notes, and snippets.

View aDu's full-sized avatar
how do i post stories??? i quit facebook for this

Alanski aDu

how do i post stories??? i quit facebook for this
View GitHub Profile
@fguillen
fguillen / RandomPointInCollider.cs
Last active August 1, 2022 07:11
Unity, generate a random point into a Polygon
using System;
using UnityEngine;
public class RandomPointInCollider
{
Collider2D collider;
Vector3 minBound;
Vector3 maxBound;
int maxAttempts;
{
"FormattingOptions": {
"NewLinesForBracesInLambdaExpressionBody": false,
"NewLinesForBracesInAnonymousMethods": false,
"NewLinesForBracesInAnonymousTypes": false,
"NewLinesForBracesInControlBlocks": false,
"NewLinesForBracesInTypes": false,
"NewLinesForBracesInMethods": false,
"NewLinesForBracesInProperties": false,
"NewLinesForBracesInObjectCollectionArrayInitializers": false,
@dpid
dpid / how-to-notarize-unity-for-macos.md
Last active December 6, 2023 20:42
How to notarize a Unity build for MacOs 10.15 Catalina

How to notarize a Unity build for macOs 10.15 Catalina

As of January 2020, all apps running on macOs 10.15 Catalina are required to be notarized. For Unity games distributed outside the Mac App Store, such as with Steam, the notarization process is done post build using a series of Xcode command line tools.

Prerequisites

  • a Mac that is compatible with macOs 10.15 Catalina :
    • MacBook (2015 or newer)
    • MacBook Air (2012 or newer)
  • MacBook Pro (2012 or newer)

Compile steghide in macOS X

Check if gettext is installed, if not use Homebrew to get it:

$ brew install gettext

Get the gettext library and cpp flags, and configure with those flags:

$ brew info gettext | grep FLAGS
@Split82
Split82 / UnityShadersCheatSheet.shader
Created April 17, 2018 10:07
Unity Shaders Cheat Sheet
Shader "Name" {
Properties {
_Name ("display name", Range (min, max)) = number
_Name ("display name", Float) = number
_Name ("display name", Int) = number
_Name ("display name", Color) = (number,number,number,number)
_Name ("display name", Vector) = (number,number,number,number)
@thomasbnt
thomasbnt / code_colors_discordjs.md
Last active April 8, 2024 21:25
Code colors for embed discord.js

Here is an updated list of the colors that are currently implemented with a name. To using colors on discord.js, this is a typedef Colors, Colors.Aqua to get the Aqua color.

Name Int value Hex Code
Default 0 #000000
Aqua 1752220 #1ABC9C
DarkAqua 1146986 #11806A
Green 5763719 #57F287
DarkGreen 2067276 #1F8B4C
@mbijon
mbijon / disable-xss-auditor.sh
Created September 19, 2016 19:04
CLI command to start Chrome with XSS Auditor disabled. Use for XSS/security testing
'/Applications/Google Chrome.app/Contents/MacOS/Google Chrome' --disable-xss-auditor --enable-devtools-experiments --disable-features=enable-automatic-password-saving
@pescode
pescode / Android Icons.jsx
Last active May 5, 2024 07:01
Unity Icons Generator for Win Store, Android & iOS Photoshop Script
// Based on https://gist.github.com/appsbynight/3681050 by Matt Di Pasquale
// Author: Victor Corvalan
// http://twitter.com/pescadon
// This script will generate squares and wide Icons & Tiles required for Windows Store build on Unity3D
// Prepare 1 big icon of 512x512px
// Open this script with Photoshop -> File -> Scripts -> Browse
// Load your icon when prompted
var destFolder;
try
@bitbutter
bitbutter / TransparentBackgroundScreenshotRecorder.cs
Last active April 30, 2024 03:57
Rendering screenshots from Unity3d with transparent backgrounds
using UnityEngine;
using System.Collections;
using System.IO;
/*
Usage:
1. Attach this script to your chosen camera's game object.
2. Set that camera's Clear Flags field to Solid Color.
3. Use the inspector to set frameRate and framesToCapture
@joemccann
joemccann / nginx + node setup.md
Created October 25, 2010 02:06
Set up nginx as a reverse proxy to node.js.

The idea is to have nginx installed and node installed. I will extend this gist to include how to install those as well, but at the moment, the following assumes you have nginx 0.7.62 and node 0.2.3 installed on a Linux distro (I used Ubuntu).

In a nutshell,

  1. nginx is used to serve static files (css, js, images, etc.)
  2. node serves all the "dynamic" stuff.

So for example, www.foo.com request comes and your css, js, and images get served thru nginx while everything else (the request for say index.html or "/") gets served through node.

  1. nginx listens on port 80.