Skip to content

Instantly share code, notes, and snippets.

View Lokawn's full-sized avatar

Harshit Lawaniya Lokawn

View GitHub Profile
@Lokawn
Lokawn / Technical-Awesome-List.md
Created July 26, 2022 07:19 — forked from Naedri/Awesome-IT-BookMarks.md
To bookmark online knowledge resources and trendy new technologies in the field of computer science.

Technical-Awesome-List

To bookmark online knowledge resources and trendy new technologies in the field of computer science.

Table of content

[TOC]

Content

@Lokawn
Lokawn / compareHash.sh
Created May 22, 2022 04:33
Bash Functions
#!/bin/bash
#compareHash(){
if [[ -f $1 ]]; then # $1 should always be a file
if [[ -f $2 ]]; then
# $2 can be a file to be compared with $1 using sha256
[[ $(sha256sum "$1" | cut -d ' ' -f 1) == "$(sha256sum "$2" | cut -d ' ' -f 1)" ]] && echo "Both files are same." || echo "Files are different."
else
# $2 can be a string containing the hash to be checked for $1
hash=$2
if [[ ${#hash} == 32 ]]; then
@Lokawn
Lokawn / 01-setup-mini7.md
Last active June 2, 2022 19:05
Setup XP-Pen Deco Mini 7

Set-up express keys and stylus keys:

  • When Stylus comes in proximity of PenTablet BTN_TOOL_PEN code is generated,
  • On pressing lower button BTN_STYLUS code is generated
  • On pressing upper button BTN_TOOL_RUBBER, BTN_TOUCH codes are generated.
  • Different Scancodes are generated with the express keys which need to be mapped to keycodes and then can be used.

-> Get scancodes & device identification info using evtest/evemu-record.

sudo evtest | grep -B1 "value 1"