Skip to content

Instantly share code, notes, and snippets.

Avatar

Rudo Rudo2204

View GitHub Profile
@Rudo2204
Rudo2204 / add_driver_controller_xbox_nobrand.md
Last active March 7, 2023 07:40
Cài driver linux cho tay cầm XBOX One X tà đạo no brand từ Trung Quốc
View add_driver_controller_xbox_nobrand.md

Link mua hàng:

Ai dùng linux cũng biết là thường khi có thiết bị mới cắm vào máy mà không chạy ngay lần đầu thì tức không có sẵn driver trong kernel và ta phải tự compile driver cho thiết bị đó.

Thường thì khả năng thực hiện việc cài driver ngoài này không thành công là khá cao (vì nếu thiết bị được hỗ trợ thì đã được merge lên upstream rồi).

Tuy nhiên dù gì thì cũng mới nhận hàng vài tiếng trả lại thì tốn thời gian của cả 2 bên quá, nên thử tìm hiểu tí về driver tay cầm trên linux xem sao.

@Rudo2204
Rudo2204 / batch_editor_pkhex_status_condition.txt
Created March 27, 2022 18:09
Batch Editor PKHeX to give pokemon status condition (useful for nuzlocke idk)
View batch_editor_pkhex_status_condition.txt
=OT_Name=Rosa
=Slot=6
.Status_Condition=05
First line will narrow down to the mons of trainer Rosa (for more accurate filter, use TID, which you can get from SAV -> Trainer Info)
=TID=23569 or whatever
Then second line will narrow down to the slot 6 (then click Party on top of the Batch Editor to apply to the slot 6 of the current party)
Then the third line will give it the status
1 = paralysis
@Rudo2204
Rudo2204 / cdemu_mx_linux.md
Created July 4, 2021 08:51
cdemu mx linux
View cdemu_mx_linux.md

NOTE

The cdemu packages from deb multimedia repo is broken, so we will have to use ubuntu PPA for this.

Add ubuntu PPA Ref link

sudo nano /etc/apt/sources.list.d/cdemu.list with content:

# cdemu source
deb http://ppa.launchpad.net/cdemu/ppa/ubuntu/ bionic main  
deb-src http://ppa.launchpad.net/cdemu/ppa/ubuntu/ bionic main
View keybase.md

Keybase proof

I hereby claim:

  • I am Rudo2204 on github.
  • I am rudo2204 (https://keybase.io/rudo2204) on keybase.
  • I have a public key whose fingerprint is 4E50 E916 5AF3 72D5 F8E4 89B8 8F1B 9F11 8267 E3A1

To claim this, I am signing this object:

@Rudo2204
Rudo2204 / moeway_handlebars.md
Last active April 9, 2023 22:20
Selecting specific dictionary's entry from yomichan for making cards.
View moeway_handlebars.md

Download:

https://gist.github.com/Rudo2204/7327a5bd25a60aefee963fd65327a9b7

How to:

  • Add it to your yomichan.
  • It supports 8 dictionaries (the "recommended for first time monolingual users" from the guide).
glossary-jmdict
glossary-jmdict-compact : same as above, it only replaces linebreak with one single space to make it more compact. Could be useful.
glossary-kenkyusha
glossary-kensyusha-ne : ne stands for no-example. This basically removes all the example sentences from the entry.
@Rudo2204
Rudo2204 / moe.hbs
Last active April 10, 2023 13:16
yomichan's handlebars for moeway's server
View moe.hbs
{{#*inline "glossary-single"}}
{{~#if (op "||" (op "===" targetDictionary undefined) (op "===" targetDictionary dictionary))~}}
{{~#unless brief~}}
{{~#scope~}}
{{~#set "any" false}}{{/set~}}
{{~#each definitionTags~}}
{{~#if (op "||" (op "!" @root.compactTags) (op "!" redundant))~}}
{{~#if (get "any")}}, {{else}}<i>({{/if~}}
{{name}}
{{~#set "any" true}}{{/set~}}
@Rudo2204
Rudo2204 / mainnight.css
Created March 9, 2021 10:11
Itazuraneko mainnight.css as alternate css style
View mainnight.css
html * {
max-height:1000000px;
}
body {
background-color: #222222;
font-family: "Libre Franklin","Helvetica Neue",helvetica,arial,sans-serif;
font-size: 100%;
line-height: 1.63;
color: rgb(217, 217, 217);
@Rudo2204
Rudo2204 / flameshot_tesseract
Created December 22, 2020 07:50
Flameshot capture into tesseract, copy to clipboard
View flameshot_tesseract
#!/bin/bash
# Dependencies: tesseract-ocr flameshot
#select tesseract_lang in jpn jpn_vert ;do break;done
# Quick language menu, add more if you need other languages.
flameshot gui -r | tesseract -l jpn_vert stdin stdout | sed '$ s/..$//' | tr -d '\n' | xclip -sel clip
@Rudo2204
Rudo2204 / scrot_ocr
Created December 22, 2020 06:47
scrot into tesseract, copy to clipboard
View scrot_ocr
#!/bin/bash
# Dependencies: tesseract-ocr scrot
#select tesseract_lang in jpn jpn_vert ;do break;done
# Quick language menu, add more if you need other languages.
SCR_IMG=`mktemp`
trap "rm $SCR_IMG*" EXIT
scrot -s $SCR_IMG.png -q 100
@Rudo2204
Rudo2204 / firefox_tearing_fix.md
Created October 25, 2020 08:44
Firefox tearing fix
View firefox_tearing_fix.md

layers.acceleration.force-enabled = true in about:config