Skip to content

Instantly share code, notes, and snippets.

@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"

@Lokawn
Lokawn / Technical-Awesome-List.md
Created July 26, 2022 07:19 — forked from Naedri/Awesome-IT.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

Master

"Knowledge is powerful, be careful how you use it!"

A collection of inspiring lists, manuals, cheatsheets, blogs, hacks, one-liners, cli/web tools and more.

--------------------------
2018_04_24
------------
----------------
* [How to fork your own repo in Github](http://kroltech.com/2014/01/01/quick-tip-how-to-fork-your-own-repo-in-github/)
* [Directory](https://apis.guru/openapi-directory/)
* [Top 20 Best Tech Websites & Blogs](http://www.grafdom.com/blog/top-20-best-tech-websites-and-blogs/)
* [Indie Hackers: Work Together to Build Profitable Online Businesses](https://www.indiehackers.com/)
@Lokawn
Lokawn / README.md
Created July 26, 2022 07:23 — forked from ruario/README.md
Run Vivaldi Package (rpm, deb or recompressed contents)

Run Vivaldi Package

The attached script (rvp.sh) will allow you to directly run a Vivaldi .deb or .rpm package without “installing” it. This works by quickly extracting the package contents into /var/tmp and then executing the binary therein (the extracted files are removed when you close Vivaldi).

Vivaldi is run with a temporary user data (settings) that are specific to that exact version. This is to avoid messing up the main install's user data.

To run Vivaldi in this way, make rvp.sh executable and start a build like so:

./rvp.sh vivaldi-snapshot-1.15.1159.7-1.x86_64.rpm
@Lokawn
Lokawn / exciting-repos.md
Created July 26, 2022 07:23 — forked from IronBlood/exciting-repos.md
Exciting Repos

Exciting Repos

Disclaimer

These repos are selected from GitHub Explore daily / weekly newsletters based on my interests since 2018. There're tons of exciting / awesome repos on github, here's only part of them selected for my furthur studies, and wish they're useful to you as well. Listed in alphabetical order.

这些的 repo 摘选自从 2018 年起 GitHub Explore 基于我个人兴趣生成的日报或者周报。GitHub 上有非常多优秀的开源仓库,这里仅仅是一小部分我个人未来学习参考的项目,希望它们也能给您带来帮助。仓库按照字母表排序。

Table of Content

@Lokawn
Lokawn / unixToolbox.md
Created July 26, 2022 08:01 — forked from tokhi/unixToolbox.md
Collection of Unix/Linux/BSD commands and tasks which are useful for IT work or for advanced users.

#Unix Toolbox

This document is a collection of Unix/Linux/BSD commands and tasks which are useful for IT work or for advanced users. This is a practical guide with concise explanations, however the reader is supposed to know what s/he is doing.

##Unix Toolbox revision 14.4

The latest version of this document can be found at http://cb.vu/unixtoolbox.xhtml. Replace .xhtml on the link with .pdf for the PDF version and with .book.pdf for the booklet version. On a duplex printer the booklet will create a small book ready to bind. This XHTML page can be converted into a nice PDF document with a CSS3 compliant application (see the script example). See also the about page.
Error reports and comments are m