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 July 12, 2024 06:36
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 student@lab4.btech.id -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:

@eAi
eAi / HorizontalFlowLayoutGroup.cs
Created March 9, 2022 14:54
A layout group, based on https://github.com/StompyRobot/SRF/blob/master/Scripts/UI/Layout/FlowLayoutGroup.cs that lays items out in columns rather than rows
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 August 25, 2024 18:07
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
{