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 / 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 / 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);
@Rudo2204
Rudo2204 / moe.hbs
Last active April 10, 2023 13:16
yomichan's handlebars for moeway's server
{{#*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 / moeway_handlebars.md
Last active December 16, 2023 12:57
Selecting specific dictionary's entry from yomichan for making cards.

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.