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 / 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": ""
import Controller from '@ember/controller';
export default class ApplicationController extends Controller {
appName = 'Ember Test';
}
@aalemayhu
aalemayhu / 256-challenge.md
Last active April 11, 2020 05:47
256 Weekly challenge footer

I’m Alexander and work as a Web Developer at Scrimba - The mind blowing way to learn how to code. This post is a part of my personal weekly challenge of writing 256 words per week to improve my writing on technical topics.

I hope you found it useful. Thank you for reading.

@aalemayhu
aalemayhu / emoji-encoding-reproducer-ruby.md
Created April 8, 2020 19:19
Encoding issue in Ruby head?

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
@aalemayhu
aalemayhu / stack.md
Last active April 8, 2020 07:40
The Tools
let t =  ['Imba', 'vim', 'Bulma', 'Netlify', 'Paddle', 'Postico', 'Adobe XD', 'Convertkit']
console.log('# Preffered Tools', t.map(do |x| "0. {x}").join('\n'))
Description
Imba Programming language
Vim Text Editor
Bulma CSS Framework
@aalemayhu
aalemayhu / index.html
Created April 6, 2020 10:04
Simple Bulma HTML Page
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Hello Bulma!</title>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/bulma/0.7.1/css/bulma.min.css">
<script defer src="https://use.fontawesome.com/releases/v5.0.7/js/all.js"></script>
</head>
<body>
# /usr/bin/notify-site-is-down.rb
require "rubygems"
require "twilio-ruby"
account_sid = ENV["TWILIO_ACCOUNT_SID"]
auth_token = ENV["TWILIO_AUTH_TOKEN"]
@client = Twilio::REST::Client.new account_sid, auth_token
@aalemayhu
aalemayhu / x.md
Created September 6, 2019 08:29
markdown test

single line snippet

@aalemayhu
aalemayhu / without-newline.imba
Created August 21, 2019 08:34
Log without a newline in Imba
# Inside of a script you can always do
process:stdout:write("Hei")