Skip to content

Instantly share code, notes, and snippets.

View Chizaruu's full-sized avatar

Abdul-Kadir Coskun Chizaruu

View GitHub Profile
@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',
@Chizaruu
Chizaruu / +DynamicColourViaSSR.md
Last active October 2, 2024 16:01
Set your color schemes using server-side environment variables for effortless, dynamic theming in Svelte Tailwind apps.

Hey there! I've developed a practical method for managing color schemes in Svelte applications using server-side environment variables. This approach offers a streamlined way to dynamically alter an app's visual theme without modifying the codebase. Here's how it works:

  • Color schemes are defined in the Tailwind configuration file.
  • A custom Node.js script converts these schemes into CSS custom properties.
  • The desired color scheme is set via a server-side environment variable.
  • The application applies the selected scheme using CSS and Svelte's server-side rendering.

Key features:

@Chizaruu
Chizaruu / logothumbnailmaker.py
Last active April 24, 2024 10:43
LogoThumbnailMaker
# Install the required dependencies by running the following command in the terminal:
# pip install pillow
import os
from PIL import Image, ImageDraw, ImageFont
# Define the background color
bg_color = (54, 57, 63)
# Define the image size
@Chizaruu
Chizaruu / unity_embedded_app_sdk_1.md
Created April 20, 2024 11:01 — forked from Furnyr/unity_embedded_app_sdk_1.md
Using Unity 2022.3.8f1 with the Discord Embedded App SDK

April 13, 2024 Edit

I recently published the first complete version of a project that can help with creating activities with Unity. If you want to check it out here's the repository: Dissonity

Introduction

This file contains information about my experience using Unity with the Embedded App SDK, so if you plan to make a Discord activity with Unity you may find this helpful. I am not a professional developer though, and the SDK has become public just recently, so take my words with a pinch of salt.

I used Unity 2022.3.8f1, I haven't tested other versions but it may work similarly.

@Chizaruu
Chizaruu / EasingFunctions.cs
Last active June 11, 2023 18:26 — forked from Kryzarel/EasingFunctions.cs
C# Easing Functions for UnityEngine
using static Unity.Mathematics.math;
namespace TSK.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
@Chizaruu
Chizaruu / C# Tutorial 1
Last active December 14, 2022 06:22
Snippet for Part 1 of my C# Tutorial
using System;
namespace MyProject
{
class Program
{
static void Main(string[] args)
{
// Declare and initialise variables here
}
@Chizaruu
Chizaruu / gh-pages-tips-and-tricks.md
Last active April 30, 2022 09:23
My tips and tricks to using Github Pages

CSS hasn't updated on your page after you deployed an update?

Let it be for 5-15 minutes as Github Pages needs time to change CSS files, panic after if it hasn't.

Having issues with node_modules and you aren't using jeryll?

Try adding an empty .nojeryll txt file

@Chizaruu
Chizaruu / generate-vertical-sprite-from-video.sh
Created April 29, 2022 10:49 — forked from zomars/generate-vertical-sprite-from-video.sh
generate a vertical sprite sheet from video file
# fps=10
ffmpeg -i video.mp4 -f image2 -vf fps=fps=10 img%03d.jpg
# vertical sprite
files=$(ls img*.jpg | sort -t '-' -n -k 2 | tr '\n' ' ')
convert $files -append output.jpg
# references:
# http://www.imagemagick.org/script/command-line-options.php#append
# http://www.imagemagick.org/script/command-line-options.php#resize
@Chizaruu
Chizaruu / MoneyToText.cs
Created February 25, 2022 13:42
Made for Niels in the Samyam Discord. "im trying to output an int for money and then GBC as the currency."
using UnityEngine;
using TMPro;
public class MoneyToText : MonoBehaviour
{
[SerializeField] private int money;
[SerializeField] private string currency = "GBC";
[SerializeField] private TextMeshProUGUI moneyText;
@Chizaruu
Chizaruu / VoiceOverTrigger.cs
Last active February 9, 2022 05:47
A simple Voice Over Trigger script - Credits to Thomas Brush.
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class VoiceOverTrigger : MonoBehaviour
{
public AudioSource audioSource;
public AudioClip audioClip;