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 / recipe.md
Last active July 23, 2023 11:37
Steps to add new cname to pagekite
  1. Create a new CNAME in DNS entries for www.example.com.
  2. Install pagekite curl -s https://pagekite.net/pk/ |sudo bash
  3. Run pagekite.py 80 example.pagekite.me
  4. Update nginx redirect.
  5. systemctl restart nginx

nginx:

@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 / gs_gofmt.bash
Created March 17, 2017 09:36
Run gofmt on changed files
for x in `git status -s|awk '{ print $2}'`; do gofmt -w $x; done
@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.