Skip to content

Instantly share code, notes, and snippets.

View sawaYch's full-sized avatar
🐧
Focusing

Sawa sawaYch

🐧
Focusing
View GitHub Profile
@sawaYch
sawaYch / demo.py
Created December 24, 2019 07:19
Set up and bug fixed of python3-keyring package.
import keyring
keyring.get_keyring()
keyring.set_password("nordvpn-nm", "username", "Pa$$w0rd")
print(keyring.get_password("nordvpn-nm","username")) # return Pa$$w0rd
@sawaYch
sawaYch / SteamPlay.md
Last active December 25, 2019 05:42
Notes about steamplay (Proton)

Now Linux can play windows game through SteamPlay and Proton.
Open steam, in the menu -> settings -> Steam Play -> check the following boxes:

  • 'Enable Steam Play for supported titles'
  • 'Enable Steam Play for all other titles';
    For 'Enable Steam Play for all other titles',
    you can use either Proton 4.11-11 or Steam Linux Runtime (Sometimes Steam Linux Runtime is not working...)

One more thing, make sure to install Vulkan driver (of course you need mesa/ nvidia/ amd GPU drivers before that),
otherwise steam will prompt you your GPU driver is not support directX11.
In Ubuntu, you can install it by:

@sawaYch
sawaYch / LUKS-notes.md
Last active August 24, 2023 06:31
Introduction to LUKS.

What is Cryptsetup and LUKS

Cryptsetup is a utility used to conveniently set up disk encryption based
on the DMCrypt kernel module.
These include plain dm-crypt volumes, LUKS volumes, loop-AES
and TrueCrypt (including VeraCrypt extension) formats.
The project also includes a veritysetup utility used to conveniently setup
DMVerity block integrity checking kernel module
and, since version 2.0, integritysetup to setup
DMIntegrity block integrity kernel module.

@sawaYch
sawaYch / app.cpp
Created January 8, 2020 16:06
qt5 (cpp) : how to center the QApp.
#include "app.h"
#include "ui_app.h"
app::app(QWidget *parent)
: QMainWindow(parent)
, ui(new Ui::app)
{
ui->setupUi(this);
connect(this->ui->hashButton, SIGNAL (released()), this, SLOT (handleHashButton()));
this->ui->input->setFocus();
@sawaYch
sawaYch / kde-plasma-panel_meta-key.md
Created January 8, 2020 22:55
Fix meta key mapping problem to kde plasma default panel.

有咩問題?

你應該知道係KDE Plasma有個比較玄嘅設計:
就係Meta key (Windows Key) 係會被map成組合鍵Alt + F1,
而更加奇怪嘅係,
當你用完Lattle Dock, Set好咗呢一個組合鍵去Trigger Application Launcher,再轉翻用default panel之後;
個組合鍵係會神奇地唔work。

解決方法

改一改呢個file:

@sawaYch
sawaYch / logout-neon
Last active January 10, 2020 15:08
KDE Neon "logout"
#!/bin/bash
# Call qdbus logout ksmserver
qdbus org.kde.ksmserver /KSMServer logout 0 0 0
@sawaYch
sawaYch / component.qml
Created January 10, 2020 15:38
QML svg antialiasing example.
LogoImage {
id: distroLogo
Layout.minimumWidth: (implicitWidth < implicitHeight) ? 100*implicitWidth/implicitHeight : 100
Layout.minimumHeight: (implicitHeight < implicitWidth) ? 100*implicitHeight/implicitWidth : 100
Layout.preferredWidth: (Layout.fillWidth) ? Layout.minimumWidth : height * implicitWidth/implicitHeight
Layout.preferredHeight: (Layout.fillHeight) ? Layout.minimumHeight : width * implicitHeight/implicitWidth
Layout.fillWidth: (implicitWidth < implicitHeight) ? false: true
Layout.fillHeight: !Layout.fillWidth
Layout.alignment: Qt.AlignCenter
@sawaYch
sawaYch / Setup.md
Last active January 11, 2020 02:15
My current desktop theme.

Keybase proof

I hereby claim:

  • I am sawaych on github.
  • I am sawaych (https://keybase.io/sawaych) on keybase.
  • I have a public key ASAEQohhSbjyJpQVI6DARwgBqcX3r4UJGh5bcbd6zX18lwo

To claim this, I am signing this object:

@sawaYch
sawaYch / Determination.txt
Last active April 3, 2026 07:06
+ You are filled with Determination +
┏━━━━━━━━━━━━━━┓
┃ |
┃ ❤️ |
| |
┗━━━━━━━━━━━━━━┛