#!/bin/bash
cd /myfiles
while true;
do
sleep_time=10
pwd;
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# | |
# msys2-sshd-setup.sh — configure sshd on MSYS2 and run it as a Windows service | |
# | |
# Please report issues and/or improvements to Sam Hocevar <sam@hocevar.net> | |
# | |
# Prerequisites: | |
# — MSYS2 itself: http://sourceforge.net/projects/msys2/ | |
# — admin tools: pacman -S openssh cygrunsrv mingw-w64-x86_64-editrights | |
# |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# | |
# msys2-sshd-setup.sh — configure sshd on MSYS2 and run it as a Windows service | |
# | |
# Please report issues and/or improvements to Sam Hocevar <sam@hocevar.net> | |
# | |
# Prerequisites: | |
# — MSYS2 itself: http://sourceforge.net/projects/msys2/ | |
# — admin tools: pacman -S openssh cygrunsrv mingw-w64-x86_64-editrights | |
# |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This is a basic workflow to help you get started with Actions | |
name: CD Internal-Lane | |
# Controls when the action will run. Triggers the workflow on push or pull request | |
# events but only for the master branch | |
on: | |
push: | |
tags: | |
- "internal-v*.*.*" # on every version tag will build a new android artifact example: v3.1.2+6 | |
jobs: |
This can be used to backup any directory on your computer (not just Anki). Just take care of the size of the directory you are backing up (in case it is too big you may run out of space).
Requirements:
- MacOS, Windows or Linux with Unix environment tools
bash
zip
rm
cmp
mkdir
tail
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div id="card-front"> | |
<div id="quest"> | |
<div id="quest-display"> | |
{{Characters}} | |
</div> | |
<div id="quest-name"></div> | |
<div class="input"> | |
{{type:Do_Not_Modify}} | |
</div> | |
</div> |
- https://stackoverflow.com/questions/13614803/how-to-check-if-html5-audio-has-reached-different-errors
- https://developer.mozilla.org/en-US/docs/Web/API/MediaError
- https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/error
- https://stackoverflow.com/questions/29681907/check-if-sound-file-exists-javascript
media.addEventListener(
"error",
event => {
let target = event.target;
let message;
let is_running_wrapper = target_function => {
return (...args: any) => {
if (this.is_running_pause) {
return;
}
let result;
this.is_running_pause = true;
try {
result = target_function(...args);
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Test(testName = "Listen for Sound", description = "Check that, when clicking the 'A' key, a sound is played", groups = {"01Drums"}) | |
public void soundPlayTest() throws InterruptedException { | |
driver.findElement(By.xpath("/html/body/div[2]/div[1]")).click(); | |
WebElement aKey = driver.findElement(By.xpath("/html/body/div/div[1]")); | |
Actions builder = new Actions(driver); | |
Action sendAKey = builder.moveToElement(aKey).sendKeys("A").build(); | |
sendAKey.perform(); | |
Thread.sleep(1000); | |
WebElement audio = driver.findElement(By.tagName("audio")); |
You can get detailed performance per function call with this snippet. Edit the lark main and add the setup to the beginning and the result printing to the bottom. Optimally, lark could have a command line option which activates this on its main.
import sys
import io
import pstats
import cProfile
profiller = cProfile.Profile()