Skip to content

Instantly share code, notes, and snippets.

@AnoRebel
AnoRebel / dropterm
Last active May 20, 2022 05:17
Dropdown like terminal script for bspwm rewritten for kitty from https://github.com/Subbeh/dropterm
#!/bin/bash
speed=15
size=1500x500+210+0
name=${1:-dropterm}
main() {
wm=$(xprop -id $(xprop -root -notype _NET_SUPPORTING_WM_CHECK | awk '{print $NF}') -notype -f _NET_WM_NAME 8t | awk '/NAME/{ gsub(/"/,""); print $NF }')
if [ -z $(xdo id -n $name) ]; then
if [[ "$wm" == "bspwm" ]] ; then
@AnoRebel
AnoRebel / TypeWriter.ts
Last active May 11, 2022 13:05
TypeWriter Effect from WebDevSimplified...
type QueueItem = () => Promise<void>
/**
* Check if a string contains a HTML tag or not
*
* @param {String} string String to check for HTML tag
* @return {Boolean} True|False
*
*/
const doesStringContainHTMLTag = (string) => {
@AnoRebel
AnoRebel / Toast.js
Created April 2, 2022 16:29
A notification system I got from @WebDevSimplified. Slowly editing it to suit my needs.
const DEFAULT_OPTIONS = {
autoClose: 5000,
position: "top-right",
onClose: () => {},
canClose: true,
showProgress: true,
};
class Toast {
#toastElem;
@AnoRebel
AnoRebel / lang-servers.txt
Created March 16, 2022 14:10
Language Servers needed for my NeoVim setup
npm i -g dot-language-server bash-language-server vscode-langservers-extracted dockerfile-language-server-nodejs emmet-ls graphql-language-service-cli intelephense sql-language-server @tailwindcss/language-server typescript typescript-language-server vim-language-server @volar/vue-language-server vls
@AnoRebel
AnoRebel / vn.html
Created November 30, 2021 13:05
Voice Note UI
<div class="relative ml-3 text-sm bg-white py-2 px-4 shadow rounded-xl">
<div class="flex flex-row items-center">
<button
class="
flex
items-center
justify-center
bg-indigo-600
hover:bg-indigo-800
rounded-full
@AnoRebel
AnoRebel / bspwm.desktop
Created October 16, 2021 09:10
Bspwm .desktop file for Xsessions detection
[Desktop Entry]
Encoding=UTF-8
Name=Bspwm
Comment=Binary Space Partitioning Tiling Window Manager
Exec=bspwm
TryExec=bspwm
Type=Xsession
X-LightDM-DesktopName=Bspwm
@AnoRebel
AnoRebel / DataTable.vue
Last active August 4, 2022 12:28
A Vue 3, Tailwindcss 2(Windicss 3) DataTable component with sorting and pagination(requires the pagination.js (https://gist.github.com/AnoRebel/2da6d2fdefe2d39ad12f73a34cbf4b30)). Highly customizable, soon to add search with MiniSearch
<template>
<div class="flex flex-col">
<div class="-my-2 overflow-x-auto sm:-mx-6 lg:-mx-8">
<div class="py-2 align-middle inline-block min-w-full sm:px-6 lg:px-8">
<div
class="shadow overflow-hidden border-b border-gray-200 sm:rounded-lg"
>
<table class="min-w-full divide-y divide-gray-200">
<thead class="bg-gray-50">
<tr>
@AnoRebel
AnoRebel / DataTable.vue
Created August 28, 2021 14:37
A Vue 3, Tailwindcss 2(Windicss 3) DataTable component with sorting and <code>pagination</code>(requires the https://gist.github.com/AnoRebel/2da6d2fdefe2d39ad12f73a34cbf4b30(pagination.js)). Highly customizable, soon to add search with MiniSearch
<template>
<div class="flex flex-col">
<div class="-my-2 overflow-x-auto sm:-mx-6 lg:-mx-8">
<div class="py-2 align-middle inline-block min-w-full sm:px-6 lg:px-8">
<div
class="shadow overflow-hidden border-b border-gray-200 sm:rounded-lg"
>
<table class="min-w-full divide-y divide-gray-200">
<thead class="bg-gray-50">
<tr>
@AnoRebel
AnoRebel / DataTable.vue
Created August 28, 2021 14:37
A Vue 3, Tailwindcss 2(Windicss 3) DataTable component with sorting and pagination(requires the https://gist.github.com/AnoRebel/2da6d2fdefe2d39ad12f73a34cbf4b30(pagination.js)). Highly customizable, soon to add search with MiniSearch
<template>
<div class="flex flex-col">
<div class="-my-2 overflow-x-auto sm:-mx-6 lg:-mx-8">
<div class="py-2 align-middle inline-block min-w-full sm:px-6 lg:px-8">
<div
class="shadow overflow-hidden border-b border-gray-200 sm:rounded-lg"
>
<table class="min-w-full divide-y divide-gray-200">
<thead class="bg-gray-50">
<tr>
@AnoRebel
AnoRebel / DataTable.vue
Created August 28, 2021 14:35
A Vue 3, Tailwindcss 2(Windicss 3) DataTable component with sorting and pagination(requires the pagination.js(https://gist.github.com/AnoRebel/2da6d2fdefe2d39ad12f73a34cbf4b30))
<template>
<div class="flex flex-col">
<div class="-my-2 overflow-x-auto sm:-mx-6 lg:-mx-8">
<div class="py-2 align-middle inline-block min-w-full sm:px-6 lg:px-8">
<div
class="shadow overflow-hidden border-b border-gray-200 sm:rounded-lg"
>
<table class="min-w-full divide-y divide-gray-200">
<thead class="bg-gray-50">
<tr>