Skip to content

Instantly share code, notes, and snippets.

View sawaYch's full-sized avatar
🐧
Focusing

Sawa sawaYch

🐧
Focusing
View GitHub Profile
@sawaYch
sawaYch / twitter.sh
Created January 30, 2020 06:22 — forked from nikhan/twitter.sh
twitter ffmpeg
ffmpeg -i test.mov -vcodec libx264 -vf 'scale=640:trunc(ow/a/2)*2' -acodec aac -vb 1024k -minrate 1024k -maxrate 1024k -bufsize 1024k -ar 44100 -strict experimental -r 30 out.mp4
@sawaYch
sawaYch / network-probloms-notes-22Jan20.md
Last active February 17, 2020 19:53
AcherC7 5Ghz wifi problems; and my X390 ethernet speed fuckup.

Arher C7 5Ghz problems

好耐之前刷完Openwrt之後,config完一輪keep完用都冇乜事(雖然冇事但我都想換)
今朝搞咗陣個network試嘢改咗啲config之後
個5Ghz ac wifi就跪低咗 (Wireless is disabled or not associated to network)
轉咗做low freq嘅channel (channel 40) 先穩定用到
唯有係咁先。

Thinkpad X390 ethernet bugs on Linux

個driver冇問題 但default個ethernet config唔知做乜搞到bandwidth限咗100mbps
個fix:

@sawaYch
sawaYch / Determination.txt
Last active January 15, 2024 10:46
+ You are filled with Determination +
┏━━━━━━━━━━━━━━┓
┃ ┃
┃ ❤️ |
| |
┗━━━━━━━━━━━━━━┛

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 / Setup.md
Last active January 11, 2020 02:15
My current desktop theme.
@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 / 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 / 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 / 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 / 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.