Skip to content

Instantly share code, notes, and snippets.

@mjbalcueva
mjbalcueva / calendar.tsx
Last active November 16, 2024 19:46
shadcn ui calendar custom year and month dropdown
"use client"
import * as React from "react"
import { buttonVariants } from "@/components/ui/button"
import { ScrollArea } from "@/components/ui/scroll-area"
import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from "@/components/ui/select"
import { cn } from "@/lib/utils"
import { ChevronLeft, ChevronRight } from "lucide-react"
import { DayPicker, DropdownProps } from "react-day-picker"
@lennartb-
lennartb- / GameOfLife.cs
Last active September 4, 2024 21:04
Conway's Game of Life in C# (Console App) with basic arrays and without any fancy complicated stuff. No error checking included.
using System;
namespace GameOfLife {
public class LifeSimulation {
private int Heigth;
private int Width;
private bool[,] cells;
/// <summary>
@joeyv
joeyv / PhoneNum.java
Last active September 21, 2023 13:41
Generates a random phone number
import java.util.*;
public class Phone
{
public static void main(String[] args)
{
int num1, num2, num3; //3 numbers in area code
int set2, set3; //sequence 2 and 3 of the phone number
Random generator = new Random();