Skip to content

Instantly share code, notes, and snippets.

View SparkySimp's full-sized avatar
🪶
dissociating

Kıvılcım Öztürk SparkySimp

🪶
dissociating
View GitHub Profile
@SparkySimp
SparkySimp / bootstrap-autotheme.js
Created February 15, 2024 18:55
Automatic application of the Boootstrap dark and light color schemes in a responsive manner
document.addEventListener('DOMContentLoaded', (event) => {
if (window.matchMedia('(prefers-color-scheme: light)').matches) {
document.documentElement.setAttribute("data-bs-theme", "light");
} else if (window.matchMedia('(prefers-color-scheme: dark)').matches) {
document.documentElement.setAttribute("data-bs-theme", "dark");
}
});
window.matchMedia('(prefers-color-scheme: light)').addEventListener('change', event => {
if (event.matches) {
document.documentElement.setAttribute("data-bs-theme", "light");
@SparkySimp
SparkySimp / .Xresources
Created August 19, 2023 19:21
Fedora NsCDE resources
! Default foreground and background colors
URxvt*foreground: #cccccc
URxvt*background: #000000
! Colors for normal text
URxvt*color0: #000000
URxvt*color1: #ff0000
URxvt*color2: #00ff00
URxvt*color3: #ffff00
URxvt*color4: #0000ff
@SparkySimp
SparkySimp / its-linux.md
Created July 24, 2023 15:27
no richard its linux

No, Richard, it's 'Linux', not 'GNU/Linux'. The most important contributions that the FSF made to Linux were the creation of the GPL and the GCC compiler. Those are fine and inspired products. GCC is a monumental achievement and has earned you, RMS, and the Free Software Foundation countless kudos and much appreciation.

Following are some reasons for you to mull over, including some already answered in your FAQ.

One guy, Linus Torvalds, used GCC to make his operating system (yes, Linux is an OS -- more on this later). He named it 'Linux' with a little help from his friends. Why doesn't he call it GNU/Linux? Because he wrote it, with more help from his friends, not you. You named your stuff, I named my stuff -- including the software I wrote using GCC -- and Linus named his stuff. The proper name is Linux because Linus Torvalds says so. Linus has spoken. Accept his authority. To do otherwise is to become a nag. You don't want to be known as a nag, do you?

(An operating system) != (a distribution). Linux is

@SparkySimp
SparkySimp / 40_custom.sh
Last active August 2, 2023 05:06
ACPI for GRUB
#!/usr/bin/sh
exec tail -n +3 $0
# This file provides an easy way to add custom menu entries. Simply type the
# menu entries you want to add after this comment. Be careful not to change
# the 'exec tail' line above.
submenu "ACPI for GRUB" {
menuentry "ACPI for GRUB (0.4.1) - Reboot" {
echo "Rebooting..."
reboot
}
@SparkySimp
SparkySimp / fn.sml
Last active May 25, 2023 06:49
12 functions
open Math
(* sine and cosine graphs for the artwork *)
fun f1 x r k = sin(xr)k
fun f2 x r k = cos(xr)k
fun f3 x r k = cos((x+3)r)k
fun f4 x r k = sin((x+3)r)k
fun f5 x r k = sin((x+6)r)k
fun f6 x r k = cos((x+6)r)k
fun f7 x r k = sin((x+9)r)k
fun f8 x r k = cos((x+9)r)k
@SparkySimp
SparkySimp / degiskenler.md
Last active October 6, 2022 12:58
Değişkenler Notlarım (C#)

Değişkenler ve Temel Veri Türleri

Değişkenler, programlarda çeşitli türlerde verileri saklayan yapılardır.

Değişkenlerin Özellikleri

  • Her değişkenin benzersiz bir adı bulunur, bu isim değişkene erişmek için kullanılır.
  • Bu değişkenlerin içindeki değerin bir türü vardır; bu tür, değişkenin bellekte ne kadar yer kaplayacağını belirler (1 bit, 8 bit, 128 bit vs.)
  • Ve değişkenlerin var oluş amacı, programın çalışma zamanı sırasında değişebilecek
@SparkySimp
SparkySimp / IntegerExtension.cs
Created October 6, 2022 08:32
IntegerExtension.cs for NTP_100622_01
public static class IntegerExtensions
{
/// <summary>
/// Determines wheter an integer is odd or not.
/// </summary>
/// <param name="n">The number to test</param>
/// <returns>Wheter n is odd or not</returns>
public static bool IsOdd(this int n) => n % 2 != 0;
/// <summary>
/// Determines wheter an integer is even or not.
@SparkySimp
SparkySimp / tdk.py
Created April 3, 2022 12:27
Turkish Language Association Dictionary Search CLI in Python
#!/bin/python
import urllib.parse
import argparse
import requests as req
import json
from pprint import pp
import sys
## Komut Satırı Girdileri Çözümleyicisini oluştur
parser = argparse.ArgumentParser(description="Türk Dil Kurumu Sözlüklerinde ara")