Skip to content

Instantly share code, notes, and snippets.

View nicloay's full-sized avatar
✌️

Nikolay nicloay

✌️
View GitHub Profile
@azeitler
azeitler / CodeUtil.Unity.cs
Created November 13, 2011 02:14
C# Method Generation for Deep-Copy of any Class
using UnityEngine;
using UnityEditor;
public static class CodeUtilUnity {
[MenuItem("Tools/Test: CreateCopyMethod (Transform)")]
public static void TestCreateCopyMethod () {
Debug.Log (CreateCopyMethod (typeof(Transform), true));
}
}
@supairish
supairish / gist:2951524
Created June 18, 2012 23:58
Nginx - how to limit requests by User Agent
http {
map $http_user_agent $limit_bots {
default '';
~*(google|bing|yandex|msnbot) $binary_remote_addr;
}
limit_req_zone $limit_bots zone=bots:10m rate=1r/m;
server {
@kyleweiner
kyleweiner / CreatePlane.cs
Created November 14, 2012 09:01
Unity: An editor script for Unity 3D that creates a custom plane.
// CreatePlane
// Credit: http://wiki.unity3d.com/index.php?title=CreatePlane
// 1. Using the inspector, create a new C# script.
// 2. Name the script "CreatePlane" and place it in a folder titled "Editor".
// 3. A new menu option titled "Custom Plane" will appear in "GameObject > Create Other".
using UnityEngine;
using UnityEditor;
using System.Collections;
@deekayen
deekayen / 1-1000.txt
Last active June 26, 2024 14:19
1,000 most common US English words
the
of
to
and
a
in
is
it
you
that
@michaelbartnett
michaelbartnett / LICENSE.txt
Last active October 17, 2022 10:29
Tuple implementation for use with Unity3d
This is free and unencumbered software released into the public domain.
Anyone is free to copy, modify, publish, use, compile, sell, or
distribute this software, either in source code form or as a compiled
binary, for any purpose, commercial or non-commercial, and by any
means.
In jurisdictions that recognize copyright laws, the author or authors
of this software dedicate any and all copyright interest in the
software to the public domain. We make this dedication for the benefit
@dopiaza
dopiaza / convert-fla-to-png.jsfl
Created November 23, 2013 13:57
Batch convert .fla to .png, rescaling as we go
// Based on Dan Catt's https://github.com/revdancatt/CAT422-glitch-location-viewer/blob/master/tools/convert-fla-to-png.jsfl
// Updated by David Wilkinson (@dopiaza):
// - scale fla before exporting as png
// - close file if exception thrown
// Open a folder of fla files, and then output them in a parallel
// folder called "output"
//
// This is very rough and ready and needs babysitting for the files
// that don't work.
@nicloay
nicloay / SetRendererLayerWizard.cs
Created January 28, 2014 16:42
Unity wizard to change sorting layer and order for one or several objects. Here http://youtu.be/lIx9j5o8uEQ you can find screencast how to use it
using UnityEngine;
using UnityEditor;
using System;
using System.Collections.Generic;
public class SetRendererLayerWizard : ScriptableWizard {
public Renderer renderer;
public Renderer[] rendererList;
public SortingLayer sortingLayer;
@lelandbatey
lelandbatey / whiteboardCleaner.md
Last active June 16, 2024 13:44
Whiteboard Picture Cleaner - Shell one-liner/script to clean up and beautify photos of whiteboards!

Description

This simple script will take a picture of a whiteboard and use parts of the ImageMagick library with sane defaults to clean it up tremendously.

The script is here:

#!/bin/bash
convert "$1" -morphology Convolve DoG:15,100,0 -negate -normalize -blur 0x1 -channel RBG -level 60%,91%,0.1 "$2"

Results

@nicloay
nicloay / IosBuildList.cs
Last active August 29, 2015 14:00
unity3d build manager works on free version. it's just a mockup, after i'll add preprocess build there to manager resource folders
using UnityEngine;
using System.Collections.Generic;
public class IosBuildList : ScriptableObject{
public List<IosBuildConfig> configs;
}
@jonathantneal
jonathantneal / README.md
Last active March 19, 2024 23:31
Local SSL websites on macOS Sierra

Local SSL websites on macOS Sierra

These instructions will guide you through the process of setting up local, trusted websites on your own computer.

These instructions are intended to be used on macOS Sierra, but they have been known to work in El Capitan, Yosemite, Mavericks, and Mountain Lion.

NOTE: You may substitute the edit command for nano, vim, or whatever the editor of your choice is. Personally, I forward the edit command to Sublime Text:

alias edit="/Applications/Sublime\ Text.app/Contents/SharedSupport/bin/subl"