Skip to content

Instantly share code, notes, and snippets.

View Rudo2204's full-sized avatar

Rudo Rudo2204

View GitHub Profile
@Rudo2204
Rudo2204 / appsScript_ListFilesFolders_ver.2.js
Created July 23, 2019 00:12 — forked from mesgarpour/appsScript_ListFilesFolders_ver.2.js
[Google Apps Script] List all files & folders in a Google Drive folder, & write into a speadsheet
/*
* Copyright 2017 Mohsen Mesgarpour
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
@Rudo2204
Rudo2204 / git-recover-branch.md
Created February 18, 2020 19:22 — forked from jbgo/git-recover-branch.md
How to recover a git branch you accidentally deleted

UPDATE: A better way! (August 2015)

As pointed out by @johntyree in the comments, using git reflog is easier and more reliable. Thanks for the suggestion!

 $ git reflog
1ed7510 HEAD@{1}: checkout: moving from develop to 1ed7510
3970d09 HEAD@{2}: checkout: moving from b-fix-build to develop
1ed7510 HEAD@{3}: commit: got everything working the way I want
70b3696 HEAD@{4}: commit: upgrade rails, do some refactoring
@Rudo2204
Rudo2204 / oneshot_linux_fix.md
Created September 4, 2020 14:57
Oneshot (the game) does not start on MXLinux 19.3 fix

First, if your game also does not start up properly, start debugging by cd-ing into your OneShot directory of Steam. ($HOME/.steam/steam/steamapps/common/OneShot in most cases). And then start OneShot with ./steamshim. In my case: I got this error:

libGL error: MESA-LOADER: failed to open iris (search paths /usr/lib/x86_64-linux-gnu/dri:\$${ORIGIN}/dri:/usr/lib/dri)
libGL error: failed to load driver: iris
libGL error: MESA-LOADER: failed to open iris (search paths /usr/lib/x86_64-linux-gnu/dri:\$${ORIGIN}/dri:/usr/lib/dri)
libGL error: failed to load driver: iris
libGL error: MESA-LOADER: failed to open swrast (search paths /usr/lib/x86_64-linux-gnu/dri:\$${ORIGIN}/dri:/usr/lib/dri)
libGL error: failed to load driver: swrast
@Rudo2204
Rudo2204 / firefox_tearing_fix.md
Created October 25, 2020 08:44
Firefox tearing fix

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

@Rudo2204
Rudo2204 / scrot_ocr
Created December 22, 2020 06:47
scrot into tesseract, copy to clipboard
#!/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 / flameshot_tesseract
Created December 22, 2020 07:50
Flameshot capture into tesseract, copy to clipboard
#!/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 / mainnight.css
Created March 9, 2021 10:11
Itazuraneko mainnight.css as alternate css style
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);

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 / downwell_proton.txt
Created September 4, 2020 12:04
Downwell protondb review
If the game crashes randomly after 2-3 minutes try to increase file descriptors. (See https://github.com/zfigura/wine/blob/esync/README.esync).
Other than that, the game runs smoothly at 60fps with no other compatibility bugs.
@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

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.