Skip to content

Instantly share code, notes, and snippets.

View Haeyzed's full-sized avatar

Haeyzed Haeyzed

View GitHub Profile
@Haeyzed
Haeyzed / password-input.tsx
Created February 18, 2024 03:44 — forked from chornthorn/password-input.tsx
shadcn ui custom password input
"use client"
import { forwardRef, useState } from "react"
import { EyeIcon, EyeOffIcon } from "lucide-react"
import { Button } from "@/components/ui/button"
import { Input, InputProps } from "@/components/ui/input"
import { cn } from "@/lib/utils"
const PasswordInput = forwardRef<HTMLInputElement, InputProps>(
({ className, ...props }, ref) => {

Assigning Static IP Addresses in WSL2

WSL2 uses Hyper-V for networking. The WSL2 network settings are ephemeral and configured on demand when any WSL2 instance is first started in a Windows session. The configuration is reset on each Windows restart and the IP addresses change each time. The Windows host creates a hidden switch named "WSL" and a network adapter named "WSL" (appears as "vEthernet (WSL)" in the "Network Connections" panel). The Ubuntu instance creates a corresponding network interface named "eth0".

Assigning static IP addresses to the network interfaces on the Windows host or the WSL2 Ubuntu instance enables support for the following scenarios:

@Haeyzed
Haeyzed / Response.php
Created October 13, 2022 16:04 — forked from jeffochoa/Response.php
Laravel HTTP status code
<?php
// This can be found in the Symfony\Component\HttpFoundation\Response class
const HTTP_CONTINUE = 100;
const HTTP_SWITCHING_PROTOCOLS = 101;
const HTTP_PROCESSING = 102; // RFC2518
const HTTP_OK = 200;
const HTTP_CREATED = 201;
const HTTP_ACCEPTED = 202;
@Haeyzed
Haeyzed / nginx-ssl-config
Created August 31, 2022 16:22 — forked from apollolm/nginx-ssl-config
Nginx Configuration with multiple port apps on same domain, with SSL.
# the IP(s) on which your node server is running. I chose port 3000.
upstream app_geoforce {
server 127.0.0.1:3000;
}
upstream app_pcodes{
server 127.0.0.1:3001;
}
@Haeyzed
Haeyzed / dashboard.markdown
Created December 22, 2021 05:01
Dashboard
@Haeyzed
Haeyzed / dashboard-ui-1-project-management-with-charts.markdown
Created December 22, 2021 04:59
Dashboard UI #1 : Project management with Charts

Dashboard UI #1 : Project management with Charts

Basic project management dashboard. This particular view shows the list of all the projects and some basic info, like who's the PM, has the project been started yet, is there any items that require urgent action to be taken, etc. On the right side there's also an Actions dropdown, which gives the admins (like the Product Owner) a quick set of actions, like "Start project", "Send an invoice", etc.

A Pen by Olsi Odobashi on CodePen.

License.

@Haeyzed
Haeyzed / index.html
Created December 22, 2021 04:36
Light/Dark Theme Toggle with CSS Variables (CSS, JS)
<div class="wrapper">
<div class="circle"></div>
<article>
<h2>Too bright?</h2>
<p>Look no further. Here we have a buttony twist on the classic checkbox toggler to carelessly toggle site theme between <span id="shift">lighter and darker<span>.</p><p>Go ahead and toggle a toggler below.</p>
<p>&#128071 &#128071 &#128071</p>
</article>
<button class="toggle" id="toggle"></button>
</div>
@Haeyzed
Haeyzed / index.html
Created December 22, 2021 04:14
Weekly Coding Challenge #1 - Double slider Sign in/up Form - Desktop Only
<h2>Weekly Coding Challenge #1: Sign in/up Form</h2>
<div class="container" id="container">
<div class="form-container sign-up-container">
<form action="#">
<h1>Create Account</h1>
<div class="social-container">
<a href="#" class="social"><i class="fab fa-facebook-f"></i></a>
<a href="#" class="social"><i class="fab fa-google-plus-g"></i></a>
<a href="#" class="social"><i class="fab fa-linkedin-in"></i></a>
</div>