Skip to content

Instantly share code, notes, and snippets.

View unitycoder's full-sized avatar
✅
‏‏‎

mika unitycoder

✅
‏‏‎
View GitHub Profile
@unitycoder
unitycoder / wordpress-redirect.txt
Last active March 17, 2017 10:07
Wordpress Redirect Old Domain to New Domain with wordpress installed in subfolder
# redirect all traffic from old domain to new domain, in same hosting
# new domain is add-on domain
# wordpress is installed in folder (not in root)
# placed on top part of the .htaccess in yourblogfolder/ (the wordpress installation folder)
# in this example, domains would be: old.com > new.com
# *or place it in the root .htaccess
RewriteCond %{HTTP_HOST} ^old\.com$ [OR]
RewriteCond %{HTTP_HOST} ^www\.old\.com$
RewriteRule ^(.*)$ "http\:\/\/new\.com\/yourblogfolder\/$1" [R=301,L,QSA]
@unitycoder
unitycoder / Pixel2WorldAndWorld2Pixel.cs
Last active January 5, 2021 18:37
Texture Pixels to World Position (horizontal plane) and World To Pixel Position (without raycasthit texcoord)
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class Pixel2World : MonoBehaviour
{
public Transform worldObject;
void Update()
{
@unitycoder
unitycoder / AccordFrameworkTest.cs
Last active January 20, 2019 12:46
Accord.NET Framework with Unity
using System.Collections;
using UnityEngine;
using Accord.Imaging.Filters;
// More info: http://unitycoder.com/blog/2016/11/04/using-accord-net-with-unity/
public class AccordFrameworkTest : MonoBehaviour
{
public Renderer sourceRenderer; // our source texture is assigned on this gameobject
public Renderer targetRenderer;
@unitycoder
unitycoder / install-node-centos.txt
Last active July 27, 2018 15:23
Install Node.js on Centos 6.7
// install
sudo yum install epel-release
// then can *Note: this installs latest version v0.10...
sudo yum install nodejs
// instead you can install specific version
curl -sL https://rpm.nodesource.com/setup_4.x | bash -
yum install -y nodejs
@unitycoder
unitycoder / install-python-centos.txt
Last active June 6, 2018 04:03
Install Python 2.7 on Centos 6.7
// updates?
yum install centos-release-SCL
yum groupinstall -y development
yum install zlib-devel bzip2-devel openssl-devel ncurses-devel sqlite-devel
// didnt work..
yum install python27
// try manually *Note run as ROOT (su)
cd ~
@unitycoder
unitycoder / UnityPackage-Importing.txt
Created November 1, 2016 09:29
UnityPackage Importing Info
// unpacking for preview list
"C:\Software\Unity55\Editor\Data\Tools\7z.exe" "x" "C:/Users/benchman/Downloads/huge.unitypackage" "-oTemp/TarGZ" "-r" "-y"
//
@unitycoder
unitycoder / StringBuilder_Clear_unity.cs
Last active November 19, 2016 06:23
StringBuilder Clear 3.5
// StringBuilder.Clear() doesn't support .Net 3.5...
// "Capasity = 0" doesn't work....
sb = new StringBuilder(0);
@unitycoder
unitycoder / gmcs.rsp
Last active November 26, 2016 13:41
Enable Unsafe For unity (place these 2 files into your project and restart unity) *For unity 5.5+ take mcs.rsp file also
-unsafe
@unitycoder
unitycoder / how-to-make-game-noob.txt
Last active October 20, 2016 08:21
How to make a game for total beginner
Good info on how to learn to make a game (for total beginner)
(around 1.20-)
https://www.youtube.com/watch?v=NXsWViTB238
How to get started (on learning)
day#1: Create a sphere, make a build
day#2: Make sphere to move
...
@unitycoder
unitycoder / UnityWebRequest-https-error.txt
Created October 19, 2016 06:18
UnityWebRequest javax.net.ssl.SSLHandshakeException
Problem:
Loading data with unitywebrequest from custom server, with HTTPS (with not paid/proper certificates)
Error in logcat:
javax.net.ssl.SSLHandshakeException: java.security.cert.CertPathValidatorException: Trust anchor for certification path not found.
More info:
use device browser to check, probably gives error also if go to the same url
https://forum.unity3d.com/threads/how-do-you-use-www-with-https-in-android-im-getting-an-sslhandshakeexception.214950/#post-2787232