Skip to content

Instantly share code, notes, and snippets.

View aalemayhu's full-sized avatar
💭
If at first the idea is not absurd, then there is no hope for it - Albert

Alexander Alemayhu aalemayhu

💭
If at first the idea is not absurd, then there is no hope for it - Albert
View GitHub Profile
@aalemayhu
aalemayhu / x.ts
Created December 11, 2023 18:33
Example of finding unused npm packages using git grep
import { exec } from 'node:child_process';
import packages from './package.json';
for (const pkg in packages.dependencies) {
exec(`"/usr/local/bin/git" grep ${pkg} src`, (err, stdout, stderr) => {
if (err) {
console.log(`${pkg} can be removed`);
}
});
@aalemayhu
aalemayhu / Data from November 2, 07:25 to December 2, 07:25.md
Last active December 2, 2023 08:05
Survey report: 2anki - 10 website survey questions

Summary of Survey report

Overall, the survey results indicate that users find the ability to convert Notion pages to Anki flashcards as the most important feature of 2anki.net. Users appreciate the time-saving aspect and the convenience it provides to their workflow. However, some users mentioned that clearer instructions and more options for image conversion would improve the experience. The survey also revealed that privacy concerns and doubts about card quality were initial barriers for some users, but these concerns were alleviated after using the website. Overall, the feedback is positive with some room for improvement.

Findings

  • The ability to convert Notion pages to Anki flashcards is highly valued by users.
  • Clearer instructions and more options for image conversion would enhance the user experience.
  • Privacy concerns and doubts about card quality were initial barriers for some users, but were resolved after using the website.
@aalemayhu
aalemayhu / gh_dependabot.sh
Created March 26, 2023 08:53 — forked from robcowie/gh_dependabot.sh
gh cli commands to work with Dependabot PRs
# Github CLI commands to work with dependabot PRs
# List dependabot PRs that need review
gh pr list -l dependencies --search "status:success review:none"
gh pr list -A app/dependabot --search "status:success review:none"
# Instruct dependabot to merge all reviewed PRs, oldest first
gh pr list \
-A app/dependabot \
--search "status:success review:approved" \
@aalemayhu
aalemayhu / anki-basic.html
Created August 28, 2022 12:33
Anki Basic centered flashcard
<!-- Front template -->
<div class="front">
{{Front}}
</div>
<!-- Back template -->
<div class="back">
{{FrontSide}}
<hr id=answer>
@aalemayhu
aalemayhu / shell.bash
Created April 24, 2022 08:15
How to fix npm notice Beginning October 4, 2021, all connections to the npm registry - including for package installation - must use TLS 1.2 or higher. You are currently using plaintext http to connect. Please visit the GitHub blog for more information: https://github.blog/2021-08-23-npm-registry-deprecating-tls-1-0-tls-1-1/
npm set registry=https://registry.npmjs.org/
@aalemayhu
aalemayhu / example.css
Created January 1, 2022 13:32
Change color of hint
/* This will change the hint's text color to black */
.hint {
/* Find more colors here https://www.w3.org/wiki/CSS/Properties/color/keywords */
color: black;
}
@aalemayhu
aalemayhu / config.json
Created July 25, 2021 15:19
Workaround to fix Polar sync issues in latest Anki.
{
"apiKey": null,
"apiLogPath": null,
"ignoreOriginList": [],
"webBindAddress": "127.0.0.1",
"webBindPort": 8765,
"webCorsOriginList": [
"http://localhost",
"https://app.getpolarized.io"
]
@aalemayhu
aalemayhu / README.md
Last active August 22, 2020 07:16
About Alexander Alemayhu

Hei there 👋🏾 I was born in Kenya (Nairobi) but now I'm a developer living in Norway and work at Scrimba. I love learning new things especially about spoken and programming languages.

I have been writing code since 2010 and started working professionally as a developer in 2011.

Now a days I work as Web Developer but on my own time I am learning about web design, teaching, Imba and running.

@aalemayhu
aalemayhu / gist:92f4068d241ff826993f257e2d340d03
Created August 16, 2020 11:04
Error with Polar Connect and Anki Version 2.1.30 (06a69c25)
Error
An error occurred. Please start Anki while holding down the shift key, which will temporarily disable the add-ons you have installed.
If the issue only occurs when add-ons are enabled, please use the Tools > Add-ons menu item to disable some add-ons and restart Anki, repeating until you discover the add-on that is causing the problem.
When you've discovered the add-on that is causing the problem, please report the issue on the add-on support site.
Debug info:
Anki 2.1.30 (06a69c25) Python 3.8.0 Qt 5.14.2 PyQt 5.14.2
Platform: Mac 10.15.6
Flags: frz=True ao=True sv=1
Add-ons, last update check: 2020-08-15 21:06:43
Add-ons possibly involved: ⁨Polar Connect - PDF and Incremental Reading with Anki Sync⁩
@aalemayhu
aalemayhu / rpc.notion2anki.json
Created July 29, 2020 19:33
New WIP format for passing data to python process
{
"name": "Cloze Support",
"cards": [
{
"name": "Canberra was founded in {{c1::1913}}",
"back": ""
},
{
"name": "{{c1::Canberra}} was founded in {{c2::1913}}.",
"back": ""