Skip to content

Instantly share code, notes, and snippets.

@jtsagata
jtsagata / LogiLink.kbd
Last active December 2, 2022 23:16
Kmonad Keyboard konfiguration for Logiling ID0181
@jtsagata
jtsagata / popos_shortcuts.sh
Created June 21, 2022 06:01
PopOS Dynamic shrotcuts
gsettings set org.gnome.mutter dynamic-workspaces false
gsettings set org.gnome.desktop.wm.preferences num-workspaces 8
gsettings set org.gnome.shell.keybindings switch-to-application-1 []
gsettings set org.gnome.shell.keybindings switch-to-application-2 []
gsettings set org.gnome.shell.keybindings switch-to-application-3 []
gsettings set org.gnome.shell.keybindings switch-to-application-4 []
gsettings set org.gnome.shell.keybindings switch-to-application-5 []
gsettings set org.gnome.shell.keybindings switch-to-application-6 []
gsettings set org.gnome.shell.keybindings switch-to-application-7 []
Mar 17 22:43:55 pop-os kernel: usb 3-2.1: new full-speed USB device number 5 using ehci-pci
Mar 17 22:43:55 pop-os kernel: usb 3-2.1: New USB device found, idVendor=2feb, idProduct=0006, bcdDevice= 0.00
Mar 17 22:43:55 pop-os kernel: usb 3-2.1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
Mar 17 22:43:55 pop-os kernel: usb 3-2.1: Product: A15PRO
Mar 17 22:43:55 pop-os kernel: usb 3-2.1: Manufacturer: VEIKK.INC
Mar 17 22:43:55 pop-os kernel: usb 3-2.1: SerialNumber: 0000001
Mar 17 22:43:55 pop-os kernel: input: VEIKK A15 Pro Pen as /devices/pci0000:00/0000:00:16.2/usb3/3-2/3-2.1/3-2.1:1.2/0003:2FEB:0006.0017/input/input50
Mar 17 22:43:55 pop-os kernel: input: VEIKK A15 Pro Keyboard as /devices/pci0000:00/0000:00:16.2/usb3/3-2/3-2.1/3-2.1:1.2/0003:2FEB:0006.0017/input/input51
Mar 17 22:43:55 pop-os kernel: input: VEIKK A15 Pro Gesture Pad as /devices/pci0000:00/0000:00:16.2/usb3/3-2/3-2.1/3-2.1:1.2/0003:2FEB:0006.0017/input/input52
Mar 17 22:43:55 pop-os kernel: veikk 0003:2FEB:0006.0017: hidraw2: U
@jtsagata
jtsagata / snooze.sh
Created July 22, 2020 06:55
Snooze.sh
#!/bin/bash
#hour=$(yad --center --width="90" --height="50" --text-align="center" --entry --numeric --title="Ρύθμιση Χρονόμετρου" --text="Επιλέξτε ώρες για τερματισμό:" --entry-text="0")
#minute=$(yad --center --width="90" --height="50" --entry --numeric --title="Ρύθμιση Χρονόμετρου" --text="Επιλέξτε λεπτά για τερματισμό:" --entry-text="0")
function insertTime()
{
frmdata=$(yad --center --width="260" --height="50" --title="Ρύθμιση Χρονομέτρου" \
--text='<span foreground="green" font="16">Εισάγετε χρόνο για τερματισμό:</span>' \
--button="Έντάξει" --button="Άκυρο" --form \
--field=" Ώρες:":NUM "0" \
--field=" Λεπτά:":NUM "0")
@jtsagata
jtsagata / riskSet.cpp
Last active August 27, 2019 10:35
Risk Card Set Kata
#include <algorithm>
#include <cassert>
#include <vector>
//#include <set>
using namespace std;
using card_t=char;
const card_t Jocker = 'J';
// Check if vector contains element
using Nat = unsigned long long;
Nat naive_sum(Nat div1, Nat div2, Nat user_value) {
Nat sum{};
for (Nat i = 0; i <= user_value; i++) {
if ((i % div1 == 0) || (i % div2 == 0)) {
sum = sum + i;
}
}
@jtsagata
jtsagata / analyze.sh
Last active August 5, 2019 09:39
analyze
#!/usr/bin/env bash
dir=$(dirname "$0")
top_dir=$(git rev-parse --show-toplevel)
cd "${top_dir}" || exit
find src test -name "*.cpp" | xargs sed -i "1i// This is an open source non-commercial project. Dear PVS-Studio, please check it.\n// PVS-Studio Static Code Analyzer for C, C++, C#, and Java: http://www.viva64.com"
cd "${top_dir}/cmake-build-debug" || exit
pvs-studio-analyzer trace -- make -j 8
#!/bin/bash
#
# DESC: Install Nerd fonts
# https://github.com/ryanoasis/nerd-fonts/
# https://github.com/ryanoasis/nerd-fonts/releases/tag/v2.1.0
#
nerd_fonts=(
'UbuntuMono'
@jtsagata
jtsagata / cm-build
Created July 25, 2019 11:14
cmake build compile run script
#!/usr/bin/env bash
curr_dir=$(pwd)
function build_with_cmake() {
cmake .. \
-DCMAKE_BUILD_TYPE="${build_type}" -G "${GENERATOR}" \
-DCMAKE_TOOLCHAIN_FILE=support/clang-toolchain.cmake
return $?
}
@jtsagata
jtsagata / install_rust.sh
Created July 24, 2019 07:36
Install rust using rustup
#!/bin/bash
dir=$(dirname "$0")
#
# DESC: Install Rust language and rust tools
#
reset=`tput sgr0`
red=`tput sgr0; tput setaf 1`