Skip to content

Instantly share code, notes, and snippets.

Avatar

Alexander Alemayhu aalemayhu

View GitHub Profile
@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
View gh_dependabot.sh
# 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
View anki-basic.html
<!-- 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/
View shell.bash
npm set registry=https://registry.npmjs.org/
@aalemayhu
aalemayhu / example.css
Created January 1, 2022 13:32
Change color of hint
View example.css
/* 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.
View config.json
{
"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
View README.md

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)
View gist:92f4068d241ff826993f257e2d340d03
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
View rpc.notion2anki.json
{
"name": "Cloze Support",
"cards": [
{
"name": "Canberra was founded in {{c1::1913}}",
"back": ""
},
{
"name": "{{c1::Canberra}} was founded in {{c2::1913}}.",
"back": ""
View controllers.application\.js
import Controller from '@ember/controller';
export default class ApplicationController extends Controller {
appName = 'Ember Test';
}
@aalemayhu
aalemayhu / emoji-encoding-reproducer-ruby.md
Created April 8, 2020 19:19
Encoding issue in Ruby head?
View emoji-encoding-reproducer-ruby.md

Hit tab after emoji in irb

➜ rvm use ruby-2.7.0-preview1
Using /Users/ccscanf/.rvm/gems/ruby-2.7.0-preview1
~ ➜ irb
2.7.0-preview1 :001 > “Hello World 🌍” Traceback (most recent call last):        30: from /Users/ccscanf/.rvm/rubies/ruby-2.7.0-preview1/bin/irb:23:in `<main>'
        29: from /Users/ccscanf/.rvm/rubies/ruby-2.7.0-preview1/bin/irb:23:in `load'        28: from /Users/ccscanf/.rvm/rubies/ruby-2.7.0-preview1/lib/ruby/gems/2.7.0/gems/irb-1.0.
0/exe/irb:11:in `<top (required)>'        27: from /Users/ccscanf/.rvm/rubies/ruby-2.7.0-preview1/lib/ruby/2.7.0/irb.rb:388:in `sta
rt'        26: from /Users/ccscanf/.rvm/rubies/ruby-2.7.0-preview1/lib/ruby/2.7.0/irb.rb:430:in `run