Skip to content

Instantly share code, notes, and snippets.

View restush's full-sized avatar
🎯
Focusing

Restu Syibul Huda restush

🎯
Focusing
  • AmoyFeels
  • Indonesia
View GitHub Profile
@gilangvperdana
gilangvperdana / PFwithSSH.md
Last active November 15, 2024 02:24
Port Forwarding on Ubuntu

Local Forwarding

If you want to locally access a cloud application that has the address 192.168.100.2:82 and can only be reached by your VM, you can use the technique below. That way you can access your local localhost:80.

ssh -L LocalPortAccess:AppsIPAddresses:AppsPortAddresses user@VPSPublicIP -pXXXX
ssh -L 80:127.0.0.1:30001 [email protected] -p10013

Remote Forwarding

If you want to access your local application with the application address 127.0.0.1:30001 then you can access it on your VPS on port 80 you can use the technique below:

using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
/// <summary>
/// Layout Group controller that arranges children in columns, fitting as many on a line until total height exceeds parent bounds
/// </summary>
public class HorizontalFlowLayoutGroup : LayoutGroup
{
public float Spacing = 0f;
@codorizzi
codorizzi / HorizontalOrVerticalLayoutGroupEditor.cs
Last active November 7, 2024 13:22
Unity - Smooth Layout Group (using DoTween)
using UnityEditor;
using UnityEngine;
namespace Utility.SLayout {
[CustomEditor(typeof(SHorizontalOrVerticalLayoutGroup), true)]
[CanEditMultipleObjects]
/// <summary>
/// Custom Editor for the HorizontalOrVerticalLayoutGroupEditor Component.
/// Extend this class to write a custom editor for a component derived from HorizontalOrVerticalLayoutGroupEditor.
/// </summary>
@to-osaki
to-osaki / FindMissingEditor.cs
Last active August 17, 2024 15:26
Unity Find missing references
using UnityEngine;
using UnityEditor;
public class FindMissingEditor : EditorWindow
{
[MenuItem(itemName: "Menu/Find Missing References")]
public static void Open()
{
EditorWindow.GetWindow<FindMissingEditor>("Find Missing References").Show();
}
@masa795
masa795 / UnityTextures.cs
Created June 17, 2013 14:12
Unityが持っているアイコンを表示する。 Unityのバージョンによってはパスが使えなくなるかもしれないので使用時は注意。
using System;
using System.Collections.Generic;
using UnityEditor;
using UnityEngine;
//Unity 4.1.5
public class UnityTextures : EditorWindow
{