Skip to content

Instantly share code, notes, and snippets.

View Chizaruu's full-sized avatar

Abdul-Kadir Coskun Chizaruu

View GitHub Profile
@Chizaruu
Chizaruu / generate-types.ts
Last active December 22, 2025 23:27
Parses SQL migrations directly. Handles JSONB defaults, SQL comments → JSDoc, and geometric types (Point/Polygon as structured types, not unknown). Auto-detects Prettier. Works offline. npm install -D type-fest npx tsx generate-types.ts
#!/usr/bin/env tsx
/* eslint-disable @typescript-eslint/no-unused-vars */
/* eslint-disable no-console */
/* eslint-disable camelcase */
/**
* Complete Supabase Type Generator - Schema-File First with Index Support
*
* This script:
* 1. Reads SQL schema files from your Supabase directory (default for --local)
@Chizaruu
Chizaruu / languages.ts
Last active November 13, 2024 09:22
The World's langauges in one neat typescript array.
interface Language {
label: string;
value: string;
iso639_1?: string;
iso639_2: string;
}
const languages: Language[] = [
{
label: 'Afrikaans',
@AndrewLester
AndrewLester / pages.yml
Last active January 10, 2026 09:19
Github Actions Workflow Deploy SvelteKit Github Pages
# Updated from SvelteKit docs. See https://kit.svelte.dev/docs/adapter-static#github-pages for more information
name: Deploy to GitHub Pages
on:
push:
branches: 'main'
jobs:
build_site:
@TrueBrain
TrueBrain / integration.md
Last active March 26, 2023 14:50
Steam / Discord integration (Rich Presence)

To start with, few things to keep in mind:

  • I am not a lawyer.
  • Neither are you.
  • 1000 people 1000 opinions; this is not so much about opinions, but about facts, options, and risk.
  • I did a morning of searching the web to gather this information, just so we have something to talk about. To bring this a bit more into facts rather than opinions we all have on what GPL is and isn't :D

Problem description

With us going to Steam, the request for Steam integration has increased.

@loilo
loilo / readme.md
Last active May 9, 2025 22:23
Sass Dark/Light Theme Mixin

Sass Dark/Light Theme Mixin

This is a Sass mixin to handle a 3-way dark mode. It relies on a data-theme attribute on your <html> element with a value of light or dark. If data-theme is absent (i.e. it's neither light nor dark), the system's preferred mode is used.

body {
  // matches data-theme="light" or data-theme="auto" with system instructing light mode
  @include light {
    background: white;
 color: black;
@Kryzarel
Kryzarel / EasingFunctions.cs
Last active December 9, 2025 05:13
C# Easing Functions
using System;
namespace Kryz.Tweening
{
// Made with the help of this great post: https://joshondesign.com/2013/03/01/improvedEasingEquations
// --------------------------------- Other Related Links --------------------------------------------------------------------
// Original equations, bad formulation: https://github.com/danro/jquery-easing/blob/master/jquery.easing.js
// A few equations, very simplified: https://gist.github.com/gre/1650294
// Easings.net equations, simplified: https://github.com/ai/easings.net/blob/master/src/easings/easingsFunctions.ts
@yuujii
yuujii / PixabayImageSearchExample.cs
Last active February 28, 2022 08:11
Unity C# Pixabay API Search Images https://pixabay.com/ja/service/about/api/ #Unity
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.Networking;
using UnityEngine.UI;
namespace Yu
{
/// <summary>
/// Pixabay API - Search Images
@matthewzring
matthewzring / markdown-text-101.md
Last active January 10, 2026 14:28
A guide to Markdown on Discord.

Markdown Text 101

Want to inject some flavor into your everyday text chat? You're in luck! Discord uses Markdown, a simple plain text formatting system that'll help you make your sentences stand out. Here's how to do it! Just add a few characters before & after your desired text to change your text! I'll show you some examples...

What this guide covers:

@itsmejkumar
itsmejkumar / GCM.java
Created April 14, 2017 05:46
Android custom push notification sample
public static void createNotification(String title, String body,String image_url, Context context, int notificationsId, String single_id) {
Intent notificationIntent;
long when = System.currentTimeMillis();
int id = (int) System.currentTimeMillis();
Bitmap bitmap = getBitmapFromURL(image_url);
NotificationCompat.BigPictureStyle notifystyle = new NotificationCompat.BigPictureStyle();
notifystyle.bigPicture(bitmap);
RemoteViews contentView = new RemoteViews(context.getPackageName(), R.layout.custom_notification_layout);
@indefinit
indefinit / ffmpeg_cheat_sheet.sh
Last active May 29, 2022 12:45
A working cheat sheet for ffmpeg
#use case: converting image sequence to .mp4 video
#official documentation: https://trac.ffmpeg.org/wiki/Create%20a%20video%20slideshow%20from%20images
#description:
# An image sequence follows the pattern, defaultCanvas0-000000000.png (9 zeros)
# video codec is libx264
# pixel format yuv420p
# output file is named out.mp4
ffmpeg -i 'defaultCanvas0-%9d.png' -c:v libx264 -pix_fmt yuv420p out.mp4
#if you want your image sequence to start on a different number than index 0, use the -start_number parameter