Japanese Speaker. I can read/write some English but not well, so corrections are always appreciated.

プログラミングや音楽に興味があります。いまはkbinのソースやActivityPubの仕様を読んだりしています。

  • 3 Posts
  • 18 Comments
Joined 1 year ago
cake
Cake day: June 18th, 2023

help-circle
  • Bash should be fine. On typical Bash installation I think this will work (please try to understand each command line before you actually try):

    $ cp ~/.bashrc ~/.bashrc.bak
    $ cp ~/.bash_history ~/.bash_history.bak
    $ printf 'set +o history' >> ~/.bashrc
    $ printf "sudo apt update\nsudo apt upgrade\n" > .bash_history
    $ (Press Ctrl+D to logout)
    

    For the next bash session you can refer only the two commands from the history with Up/Down/C-p/C-n.






  • Some applications can’t display some Unicode strings like s̵t̵r̵o̵k̵e̵, so replacing Markdown element like ~strike~ with Unicode equivalent (s̵t̵r̵o̵k̵e̵ ) may not be a good idea if you want portability. I opened your post in text editors and noticed that neovim-qt drops s̵t̵r̵o̵k̵e̵’s combining characters (issue on Github) and just displays stroke instead of s̵t̵r̵o̵k̵e̵; GUI Emacs with my font settings (Noto) doesn’t combine the characters and displays s-t-r-o-k-e- (as I said, this may depends on font settings).













  • It seems OAuth2 hasn’t implemented yet. At this time, to get auth value, username and password are required:

    # Python
    url = 'https://<instance_name>/user/login'
    data = {'username_or_email': username_or_email,
            'password': password}
    response = requests.post(url, json=data)
    json = response.json()
    auth = json['jwt']
    

    Since the endpoint recieves JSON then returns JSON, you may need to send following HTTP headers explicitly:

    Content-Type: application/json
    Accept: application/json