Skip to content

Instantly share code, notes, and snippets.

I got a great smile

Kristján Oddsson koddsson

I got a great smile
Block or report user

Report or block koddsson

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
koddsson / n
Created Jun 26, 2019
Simple Bash script that let's me post a micropub note from my terminal
View n
#! /bin/bash
CODE=$(cat token)
STATUS_CODE=$(curl -sw '%{http_code}' -o /dev/null -d "code=$CODE&redirect_uri=$ME"
if [ $STATUS_CODE -eq 404 ]; then

await in getter.

Since you can't make getters async in JavaScript classes it's impossible to do something like this:

class Foobar {
  set src(url) {
    this.src = url
    await this.fetchResults() // Unexpected keyword since the function isn't marked as `async`
View gist:ac642e3986f430852618f8ee2517e0e5

Keybase proof

I hereby claim:

  • I am koddsson on github.
  • I am koddsson ( on keybase.
  • I have a public key ASDwi_uJqSvD3Q_-HXzwzFS1lFeiI0w5tUbP4ayRTJK8Qwo

To claim this, I am signing this object:

#!/usr/bin/env bash
# fork from
changed_files="$(git diff-tree -r --name-only --no-commit-id $1 $2)"
check_run() {
echo "$changed_files" | grep --quiet "$1" && eval "$2"
check_run package.json "yarn"
View .gittemplate
# 50-character subject line ^
# 72-character wrapped longer description. This should answer: ^
# * Why was this change necessary?
# * How does it address the problem?
# * Are there any side effects?
Related-to: [ISSUE]
You can’t perform that action at this time.