Skip to content

Instantly share code, notes, and snippets.

Avatar

Ceil ceilwoo

View GitHub Profile
View JsonHelper.cs
using System;
using UnityEngine;
namespace UnityRest
{
public static class JsonHelper
{
public static T[] FromJson<T>(string jsonArray)
{
jsonArray = WrapArray (jsonArray);
@jringrose
jringrose / FindProjectReferences.cs
Last active Jun 19, 2020
Unity editor extension that uses spotlight on OSX for lightning fast project reference searches. Asset serialization mode should be set to "Force Text" in the editor settings.
View FindProjectReferences.cs
/*
MIT License
Copyright (c) 2016 Jesse Ringrose
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
@NathanSweet
NathanSweet / Photoshop-LayersToPNG.jsx
Last active Dec 1, 2019
Adobe Photoshop script to export to Esoteric Software's Spine: http://esotericsoftware.com/
View Photoshop-LayersToPNG.jsx
Please note this script has moved: https://github.com/EsotericSoftware/spine-scripts
@benblo
benblo / EditorCoroutine.cs
Created Apr 15, 2014
EditorCoroutine: coroutines for Unity editor operations. Usage: EditorCoroutine.start(myIEnumerator)
View EditorCoroutine.cs
using System;
using System.Collections;
using System.Collections.Generic;
using UnityEditor;
using UnityEngine;
using Object = UnityEngine.Object;
namespace Swing.Editor
{
public class EditorCoroutine
View uaex.bms
# extract Unity3D engine *.assets files
# (c) 2012-10-15 by AlphaTwentyThree of XeNTaX
get EXT extension
if EXT == "resS" # no TOC -> scan
cleanexit
endif
endian big
get FSIZE asize
@kerimdzhanov
kerimdzhanov / random.js
Last active Oct 7, 2020
JavaScript: get a random number from a specific range
View random.js
/**
* Get a random floating point number between `min` and `max`.
*
* @param {number} min - min number
* @param {number} max - max number
* @return {number} a random floating point number
*/
function getRandomFloat(min, max) {
return Math.random() * (max - min) + min;
}
@willurd
willurd / web-servers.md
Last active Oct 27, 2020
Big list of http static server one-liners
View web-servers.md

Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.

Discussion on reddit.

Python 2.x

$ python -m SimpleHTTPServer 8000
@andrekandore
andrekandore / gist:3140554
Created Jul 19, 2012 — forked from RiANOl/gist:1077760
AES128, AES256 encrypt/decrypt in Ruby
View gist:3140554
require "openssl"
require "digest"
def aes128_encrypt(key, data)
key = Digest::MD5.digest(key) if(key.kind_of?(String) && 16 != key.bytesize)
aes = OpenSSL::Cipher.new('AES-128-CBC')
aes.encrypt
aes.key = key
aes.update(data) + aes.final
end
@darktable
darktable / MiniJSON.cs
Created Nov 30, 2011
Unity3D: MiniJSON Decodes and encodes simple JSON strings. Not intended for use with massive JSON strings, probably < 32k preferred. Handy for parsing JSON from inside Unity3d.
View MiniJSON.cs
/*
* Copyright (c) 2013 Calvin Rien
*
* Based on the JSON parser by Patrick van Bergen
* http://techblog.procurios.nl/k/618/news/view/14605/14863/How-do-I-write-my-own-parser-for-JSON.html
*
* Simplified it so that it doesn't throw exceptions
* and can be used in Unity iPhone with maximum code stripping.
*
* Permission is hereby granted, free of charge, to any person obtaining
You can’t perform that action at this time.