Skip to content

Instantly share code, notes, and snippets.

View apudiu's full-sized avatar
🏠
Working from home

Mohammad A. Apu apudiu

🏠
Working from home
View GitHub Profile
@ironbyte
ironbyte / seed_drizzle_zod_faker.ts
Last active April 28, 2024 15:22
TS Seed Script: Drizzle ORM + Zod + Faker (Minimal)
// tsx seed.ts
import { faker } from '@faker-js/faker';
import { pgTable, text, varchar, timestamp } from 'drizzle-orm/pg-core';
import { drizzle, PostgresJsDatabase } from 'drizzle-orm/postgres-js';
import { createInsertSchema } from 'drizzle-zod';
import { customAlphabet } from 'nanoid';
import postgres from 'postgres';
import { z } from 'zod';
@odahcam
odahcam / ImageGD.php
Created September 27, 2017 04:13
A PHP class to wrap imageGD PHP library into a OO class.
<?php
/**
* @author Luiz Filipe Machado Barni <luiz@h2k.com.br>
*
* @version 0.2.0
*/
class ImageGD
{
public $image_src; // the source of the image
@bobbybouwmann
bobbybouwmann / User.php
Last active May 18, 2024 16:05
Laravel Absolute vs Relative Dates with Carbon
<?php
namespace App;
use Carbon\Carbon;
use Illuminate\Database\Eloquent\Model;
class User extends Model
{
/**
@yetithefoot
yetithefoot / stuns
Last active April 2, 2024 10:49 — forked from zziuni/stuns
STUN+TURN servers list
{url:'stun:stun01.sipphone.com'},
{url:'stun:stun.ekiga.net'},
{url:'stun:stun.fwdnet.net'},
{url:'stun:stun.ideasip.com'},
{url:'stun:stun.iptel.org'},
{url:'stun:stun.rixtelecom.se'},
{url:'stun:stun.schlund.de'},
{url:'stun:stun.l.google.com:19302'},
{url:'stun:stun1.l.google.com:19302'},
{url:'stun:stun2.l.google.com:19302'},