Skip to content

20th Week of 2022


  • New: Get assets url.

    If you're using Vite, you can save the assets such as images or audios in the src/assets directory, and you can get the url with:

    getImage() {
      return new URL(`../assets/pictures/${this.active_id}.jpg`, import.meta.url).href

    This way it will give you the correct url whether you're in the development environment or in production.

  • New: Play audio files.

    You can get the file and save it into a data element with:

    getAudio() { = new Audio(new URL(`../assets/audio/${this.active_id}.mp3`, import.meta.url).href)

    You can start playing with, and stop with

  • New: Vue Router.

    Creating a Single-page Application with Vue + Vue Router feels natural, all we need to do is map our components to the routes and let Vue Router know where to render them.

  • New: Deploy static site on github pages.


Python Snippets

Operating Systems


Linux Snippets