Skip to content

Instantly share code, notes, and snippets.

View hto's full-sized avatar
👀
./hto

Halil Tuğcan Özaktaş hto

👀
./hto
View GitHub Profile
@James-Frowen
James-Frowen / MirrorPrefabPool.cs
Last active May 9, 2024 08:38
Prefab Pool for Unity and Mirror Networking, see simple example here https://gist.github.com/James-Frowen/46ca5e8fd76d62527be7b958ca8dbaf1
using Mirror;
using UnityEngine;
namespace JamesFrowen.Spawning
{
public class MirrorPrefabPool : PrefabPool
{
private readonly NetworkIdentity _networkPrefab;
private bool _handlersRegistered;
@EQuimper
EQuimper / clear.txt
Created June 16, 2017 16:17
React-Native clear Watchman + Cache
watchman watch-del-all && rm -rf node_modules/ && yarn cache clean && yarn install && yarn start -- --reset-cache
@vincenzodibiaggio
vincenzodibiaggio / gist:5965342
Created July 10, 2013 10:50
php array diff recursive (from php.net site)
private function arrayRecursiveDiff($aArray1, $aArray2) {
$aReturn = array();
foreach ($aArray1 as $mKey => $mValue) {
if (array_key_exists($mKey, $aArray2)) {
if (is_array($mValue)) {
$aRecursiveDiff = $this->arrayRecursiveDiff($mValue, $aArray2[$mKey]);
if (count($aRecursiveDiff)) { $aReturn[$mKey] = $aRecursiveDiff; }
} else {
if ($mValue != $aArray2[$mKey]) {
@jeffrafter
jeffrafter / handler.js
Created April 2, 2010 20:59
Simple HTTP Server and Router in node.js
exports.createHandler = function (method) {
return new Handler(method);
}
Handler = function(method) {
this.process = function(req, res) {
params = null;
return method.apply(this, [req, res, params]);
}
}