Skip to content

Instantly share code, notes, and snippets.

View tsulatsitamim's full-sized avatar

Tsulatsi Tamim tsulatsitamim

View GitHub Profile
@tsulatsitamim
tsulatsitamim / shadcn-month-picker.tsx
Last active July 27, 2024 21:36
Shadcn Month Picker
import { Dispatch, SetStateAction, useState } from "react"
import { Popover, PopoverContent, PopoverTrigger } from "@components/ui/popover"
import { Button } from "@components/ui/button"
import { CalendarIcon, ChevronLeft } from "lucide-react"
const months = new Array(12)
.fill(0)
.map((_, i) =>
new Intl.DateTimeFormat("id-ID", { month: "short" }).format(
new Date(2000, i, 1)
server {
listen 8080;
server_name _;
root /usr/share/nginx/html;
index index.html;
location / {
try_files $uri $uri/ $uri.html /index.html;
}
}
@tsulatsitamim
tsulatsitamim / gist:884c25163dc50686b55b879608a32044
Created October 10, 2020 12:25
Get Height and Width of PDF File
$pdf = new Fpdi();
$source = $pdf->setSourceFile('filename.pdf');
$template = $pdf->importPage($source);
$size = $pdf->getTemplateSize($template);
@tsulatsitamim
tsulatsitamim / VueSelect.vue
Last active June 18, 2022 05:25
Vue Bootstrap Wrapper for Select2
<template>
<ValidationProvider
ref="validator"
v-slot="{ errors }"
:name="errorLabel || label"
:rules="rules"
>
<b-form-group
:label="label"
:label-for="uid"
@tsulatsitamim
tsulatsitamim / index.html
Created May 12, 2018 23:52
Simple jQuery Gallery With Thumbnails
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>Simple jQuery Gallery With Thumbnails</title>
</head>
<body>
<div><img id="holder" src="" alt=""></div>
<div>