Skip to content

Instantly share code, notes, and snippets.

View Troyciv's full-sized avatar

Troyciv

View GitHub Profile
@Troyciv
Troyciv / top200.txt
Last active July 6, 2018 14:46
top 200 spanish verbs
ser
haber
estar
tener
hacer
poder
decir
ir
ver
dar
@Troyciv
Troyciv / yt-wrapper.py
Last active June 30, 2018 19:37
runs youtube-dl until return code is 0
#!/usr/bin/env python3
import getopt, subprocess, sys
cmd = [
'youtube-dl',
# '-s', # for simulating download
# '-v', # verbose
'--abort-on-error',
'--abort-on-unavailable-fragment',
'--fragment-retries',
@Troyciv
Troyciv / anki_autoplay.js
Created June 19, 2018 12:58
java script that auto plays audio files on anki cards
<script>
if (typeof(py) == "object") { // AnkiDesktop
var audioRe = /\[sound\:([^\]]+)\]/;
audioSrc = audioRe.exec(document.body.innerHTML)[1];
py.link("ankiplay" + audioSrc);
} else { // AnkiDroid
document.querySelector(".replaybutton").click();
}
</script>
We can't make this file beautiful and searchable because it's too large.
1,"и","and",[sound:00001.mp3]
2,"в","in, to",[sound:00002.mp3]
3,"не","not",[sound:00003.mp3]
4,"на","on, onto",[sound:00004.mp3]
5,"я","I, me",[sound:00005.mp3]
6,"быть","be",[sound:00006.mp3]
7,"с","with, from",[sound:00007.mp3]
8,"он","he",[sound:00008.mp3]
9,"что","that",[sound:00009.mp3]
10,"а","and, but",[sound:00010.mp3]
@Troyciv
Troyciv / back.html
Created June 12, 2018 12:59
/u/trainofpotatoes anki card style back
<div class=frontbg>
{{Word}}
{{#Reading}}
<div class=hira>
{{Reading}}
</div>
{{/Reading}}
@Troyciv
Troyciv / front.html
Created June 12, 2018 12:58
/u/trainofpotatoes ankiy style front
<div class=frontbg>
{{Word}}
</div>
<!-- This line is Added by Cloze Furigana Tools to make its various features work. CFT.260.00 --><script>var rubys = document.getElementsByTagName('ruby'); var spans = document.getElementsByTagName('span'); for (var i=0; i < rubys.length; i++) { for (var s=0; s < spans.length; s++) { if ( spans[s].className === "cloze" && rubys[i].contains(spans[s])) { rubys[i].className = "cloze_container"; break; }}} </script>
@Troyciv
Troyciv / trainofpotatoes.css
Created June 12, 2018 12:57
/u/trainofpotatoes anki card styl
ruby rt {
visibility: hidden;
}
ruby:hover rt {
visibility: visible;
}
.card {
font-family: Noto Sans CJK JP Regular;
<!-- FRONT -->
<div class="content">
<div class="frontbg">
<span class="additional">conjugação</span>
<hr>
<div class="additional">pretérito perfeito</div>
{{#preterito_perfeito_voce}}
<div class="question">ele/ela</div>
<div class="singleword">{{infinitiv}}</div>
{{/preterito_perfeito_voce}}
/*==================================================
*Anki card style - A material design card style sheet optimized for Ankidroid
*Written in 2017 by /u/troy_civ
*License: Creative Commons Zero v1.0 Universal
*https://creativecommons.org/publicdomain/zero/1.0/
*==================================================*/
/* FONTS */
@font-face {
font-family: "Noto";
<div class="content">
<div class="frontbg">
<span class="additional">conjugação</span>
<hr>
<div class="additional">pretérito perfeito</div>
{{#preterito_perfeito_voce}}
<div class="question">ele/ela</div>
<div class="singleword">{{infinitiv}}</div>
{{/preterito_perfeito_voce}}