Skip to content

Instantly share code, notes, and snippets.

View h3ssan's full-sized avatar

Hassan A Hashim h3ssan

View GitHub Profile
@h3ssan
h3ssan / Dynamic Window Manager.md
Last active August 10, 2021 23:47
DWM configuration for Gentoo Linux

Enable Touchpad tapping

I think you don't need to build dwm youself and write a special script which setup xinput properties. You can just use Xorg configuration file instead

Create a file /etc/X11/xorg.conf.d/30-touchpad.conf that contains this:

Section "InputClass"
    Identifier "touchpad catchall"
    Driver "libinput"
    Option "Tapping" "on"
EndSection
@h3ssan
h3ssan / Qt5.15 configure options
Created September 4, 2021 07:57
Qt 5.15 available configure options
Usage: configure [options] [assignments]
Configure understands variable assignments like VAR=value on the command line.
Each uppercased library name (obtainable with -list-libraries) supports the
suffixes _INCDIR, _LIBDIR, _PREFIX (INCDIR=PREFIX/include, LIBDIR=PREFIX/lib),
_LIBS, and - on Windows and Darwin - _LIBS_DEBUG and _LIBS_RELEASE. E.g.,
ICU_PREFIX=/opt/icu42 ICU_LIBS="-licui18n -licuuc -licudata".
It is also possible to manipulate any QMAKE_* variable, to amend the values
from the mkspec for the build of Qt itself, e.g., QMAKE_CXXFLAGS+=-g3.
@h3ssan
h3ssan / Qt6 configure options
Created September 5, 2021 02:09
Qt 6.0.1 configuration options list
+ cd qtbase
Usage: configure [options] [-- cmake-options]
This is a convenience script for configuring Qt with CMake.
Options after the double dash are directly passed to CMake.
Top-level installation directories:
-prefix <dir> ...... The deployment directory, as seen on the target device.
[/usr/local/Qt-$QT_VERSION; qtbase build directory if
-developer-build]
@h3ssan
h3ssan / JetBrains trial reset.md
Last active November 15, 2024 07:33
Reset all JetBrains products trial in Linux

In some cases, only these lines will work

for product in IntelliJIdea WebStorm DataGrip PhpStorm CLion PyCharm GoLand RubyMine; do
    rm -rf ~/.config/$product*/eval 2> /dev/null
    rm -rf ~/.config/JetBrains/$product*/eval 2> /dev/null
done

But if not, try these

@h3ssan
h3ssan / Git PGP Signing.md
Last active May 10, 2022 02:46
Sign git commits with PGP key.
  1. git config --global commit.gpgSign true
  2. git config --global user.email email
  3. git config --global user.name name

Get the RSA/[A-Z0-9]+ string

  1. gpg --list-secret-keys --keyid-format=long

Use the RSA/[A-Z0-9]+ string

  1. git config --global user.signingkey RSA/[A-Z0-9]+
  2. echo 'export GPG_TTY=$(tty)' &gt;&gt; ~/.bashrc
@h3ssan
h3ssan / Build Java Runtimes.md
Last active May 10, 2022 02:44
Using jlink to build custom Java runtime (JRE)
  1. jdeps --list-deps app.jar to check all dependencies of your app.
  2. java --list-modules to get a list of all openjdk modules available.
  3. jlink --no-header-files --no-man-pages --compress=2 --add-modules <Comma-separated modules> --output java-runtime.

Using javaFX ?

java --module-path /opt/javafx-sdk-11/lib --add-modules=javafx.controls -jar app.jar

References

@h3ssan
h3ssan / networkmanager not showing up my network.md
Created May 10, 2022 02:53
[Gentoo Linux] NetworkManager is not showing up / detecting MY network / WIFI

[Gentoo] NetworkManager is not showing up / detecting MY network / WIFI

Solution is as simple as re-compiling net-wireless/wpa_supplicant with tkip USE flag.

@h3ssan
h3ssan / compressions.md
Created May 23, 2022 21:34
Best compression algorithms in Linux

Recommended Compression by Extention

Extention compression
.burp .tar.xz
.cap | .pcap | .pcapng .tar.xz

Examples

In the following examples, I'll compress a directory named data to archive named compressed followed with its extention.

@h3ssan
h3ssan / powershell.md
Last active June 20, 2022 21:57
Some useful powershell scripts

Downloading

Invoke-WebRequest [ iwr ]

A progress bar included by default

Usage:

Invoke-WebRequest -OutFile "C:\somefile" -Uri https://www...;
@h3ssan
h3ssan / nuGet_visual_studio.md
Created June 23, 2022 13:04
Add nuGet package manager to Visual Studio

nuGet source API

nuGet Package Source: https://api.nuget.org/v3/index.json