Blog

  • geet

    Build Status

    Geet

    Command line interface for performing Git hosting service operations.

    This tool is a provider-independent version of Hub and Lab.

    Development status/plan

    The current focus is implementing Gitlab functionalities (0.3.x series).

    Everything is tracked in detail via issues and milestones.

    Operation/providers support

    The functionalities currently supported are:

    • Github/Gitlab:
      • create label
      • list issues, labels, milestones, MR/PRs
      • merge MR/PR
      • open repository
    • Github:
      • comment PR
      • create gist, issue, milestone, PR

    Samples

    Prerequisite(s)

    Geet requires the API token environment variable to be set, eg:

    export GITHUB_API_TOKEN=0123456789abcdef0123456789abcdef    # for GitHub
    export GITLAB_API_TOKEN=0123456789abcd-ef0-1                # for GitLab
    

    All the commands need to be run from the git repository.

    Create an issue (with label and assignees)

    Basic creation of an issue:

    $ geet issue create
    

    The default editor will be used for title/description:

    Issue creation editing screenshot

    Labels, milestone and assignees will be asked with menu selection:

    Please select the label(s): (Use arrow keys, press Space to select and Enter to finish, and alphanumeric/underscore characters to filter)
    ‣ ⬡ bug
      ⬡ enhancement
      ⬡ not_an_issue
      ⬡ requires_design
    

    Labels, milestone and assignees can be directly specified with the respective parameters:

    $ geet issue create --labels bug,wip --assignees johncarmark --milestone 1.0
    

    After creation, the issue page will be automatically opened in the default browser.

    Create a PR (with label, reviewers, and assigned to self)

    Basic creation of a PR:

    $ geet pr create
    

    The default editor will be used for title/description:

    Issue creation editing screenshot

    More advanced PR creation, with label and reviewers, assigned to self:

    $ geet pr create --labels "code review" --reviewers kevin,tom,adrian
    

    After creation, the issue page will be automatically opened in the default browser.

    List issues/PRs

    List the open issues, in default order (inverse creation date):

    $ geet issue list
    > 16. Implement issue opening (https://github.com/saveriomiroddi/geet/issues/16)
    > 14. Update README (https://github.com/saveriomiroddi/geet/issues/14)
    > 8. Implement milestones listing/show (https://github.com/saveriomiroddi/geet/issues/8)
    > 4. Allow writing description in an editor (https://github.com/saveriomiroddi/geet/issues/4)
    > 2. Support opening PR into other repositories (https://github.com/saveriomiroddi/geet/issues/2)
    

    List the open PRs, in default order (inverse creation date):

    $ geet pr list
    > 21. Add PRs listing support (https://github.com/saveriomiroddi/geet/pull/21)
    

    List milestones

    $ geet milestone list
    > 9. 0.2.0
    >   4. Allow writing description in an editor (https://github.com/saveriomiroddi/geet/issues/4)
    > 6. 0.2.1
    >   69. Display warning when some operations are performed on a forked repository (https://github.com/saveriomiroddi/geet/issues/69)
    >   60. Update Create PR test suite; the UTs are not inspecting some of the changes (https://github.com/saveriomiroddi/geet/issues/60)
    >   51. Services should take repository in the initializer (https://github.com/saveriomiroddi/geet/issues/51)
    > 7. 0.2.2
    >   43. PR Merging: upstream support (https://github.com/saveriomiroddi/geet/issues/43)
    >   35. Improve design of repository-independent actions (https://github.com/saveriomiroddi/geet/issues/35)
    

    List labels

    $ geet label list
    > - bug (#ee0701)
    > - enhancement (#84b6eb)
    > - technical_debt (#ee0701)
    > - top_priority (#d93f0b)
    

    Create a gist

    Create a private gist:

    $ geet gist create /path/to/myfile
    

    Create a public gist, with description:

    $ geet gist create --public /path/to/myfile 'Gist description'
    

    Using menus for options selection

    Menus can be used for selecting attributes (labels, collaborators, milestones…).

    This is an example of multiple choice selection:

    Please select the label(s): (Use arrow keys, press Space to select and Enter to finish, and alphanumeric/underscore characters to filter)
    ‣ ⬡ bug
      ⬡ enhancement
      ⬡ not_an_issue
      ⬡ requires_design
    

    Typing alphanumeric keys and underscore will enable filtering:

    Please select the label(s): (Filter: "b")
    ‣ ⬡ bug
      ⬡ technical_debt
    

    When a filter is active, use Backspace to cancel the last character, and Canc to reset it.

    Help

    Display the help:

    $ geet [command [subcommand]] --help
    

    Examples:

    $ geet --help
    $ geet pr --help
    $ geet pr create --help
    
    Visit original content creator repository https://github.com/64kramsystem/geet
  • geet

    Build Status

    Geet

    Command line interface for performing Git hosting service operations.

    This tool is a provider-independent version of Hub and Lab.

    Development status/plan

    The current focus is implementing Gitlab functionalities (0.3.x series).

    Everything is tracked in detail via issues and milestones.

    Operation/providers support

    The functionalities currently supported are:

    • Github/Gitlab:
      • create label
      • list issues, labels, milestones, MR/PRs
      • merge MR/PR
      • open repository
    • Github:
      • comment PR
      • create gist, issue, milestone, PR

    Samples

    Prerequisite(s)

    Geet requires the API token environment variable to be set, eg:

    export GITHUB_API_TOKEN=0123456789abcdef0123456789abcdef    # for GitHub
    export GITLAB_API_TOKEN=0123456789abcd-ef0-1                # for GitLab
    

    All the commands need to be run from the git repository.

    Create an issue (with label and assignees)

    Basic creation of an issue:

    $ geet issue create
    

    The default editor will be used for title/description:

    Issue creation editing screenshot

    Labels, milestone and assignees will be asked with menu selection:

    Please select the label(s): (Use arrow keys, press Space to select and Enter to finish, and alphanumeric/underscore characters to filter)
    ‣ ⬡ bug
      ⬡ enhancement
      ⬡ not_an_issue
      ⬡ requires_design
    

    Labels, milestone and assignees can be directly specified with the respective parameters:

    $ geet issue create --labels bug,wip --assignees johncarmark --milestone 1.0
    

    After creation, the issue page will be automatically opened in the default browser.

    Create a PR (with label, reviewers, and assigned to self)

    Basic creation of a PR:

    $ geet pr create
    

    The default editor will be used for title/description:

    Issue creation editing screenshot

    More advanced PR creation, with label and reviewers, assigned to self:

    $ geet pr create --labels "code review" --reviewers kevin,tom,adrian
    

    After creation, the issue page will be automatically opened in the default browser.

    List issues/PRs

    List the open issues, in default order (inverse creation date):

    $ geet issue list
    > 16. Implement issue opening (https://github.com/saveriomiroddi/geet/issues/16)
    > 14. Update README (https://github.com/saveriomiroddi/geet/issues/14)
    > 8. Implement milestones listing/show (https://github.com/saveriomiroddi/geet/issues/8)
    > 4. Allow writing description in an editor (https://github.com/saveriomiroddi/geet/issues/4)
    > 2. Support opening PR into other repositories (https://github.com/saveriomiroddi/geet/issues/2)
    

    List the open PRs, in default order (inverse creation date):

    $ geet pr list
    > 21. Add PRs listing support (https://github.com/saveriomiroddi/geet/pull/21)
    

    List milestones

    $ geet milestone list
    > 9. 0.2.0
    >   4. Allow writing description in an editor (https://github.com/saveriomiroddi/geet/issues/4)
    > 6. 0.2.1
    >   69. Display warning when some operations are performed on a forked repository (https://github.com/saveriomiroddi/geet/issues/69)
    >   60. Update Create PR test suite; the UTs are not inspecting some of the changes (https://github.com/saveriomiroddi/geet/issues/60)
    >   51. Services should take repository in the initializer (https://github.com/saveriomiroddi/geet/issues/51)
    > 7. 0.2.2
    >   43. PR Merging: upstream support (https://github.com/saveriomiroddi/geet/issues/43)
    >   35. Improve design of repository-independent actions (https://github.com/saveriomiroddi/geet/issues/35)
    

    List labels

    $ geet label list
    > - bug (#ee0701)
    > - enhancement (#84b6eb)
    > - technical_debt (#ee0701)
    > - top_priority (#d93f0b)
    

    Create a gist

    Create a private gist:

    $ geet gist create /path/to/myfile
    

    Create a public gist, with description:

    $ geet gist create --public /path/to/myfile 'Gist description'
    

    Using menus for options selection

    Menus can be used for selecting attributes (labels, collaborators, milestones…).

    This is an example of multiple choice selection:

    Please select the label(s): (Use arrow keys, press Space to select and Enter to finish, and alphanumeric/underscore characters to filter)
    ‣ ⬡ bug
      ⬡ enhancement
      ⬡ not_an_issue
      ⬡ requires_design
    

    Typing alphanumeric keys and underscore will enable filtering:

    Please select the label(s): (Filter: "b")
    ‣ ⬡ bug
      ⬡ technical_debt
    

    When a filter is active, use Backspace to cancel the last character, and Canc to reset it.

    Help

    Display the help:

    $ geet [command [subcommand]] --help
    

    Examples:

    $ geet --help
    $ geet pr --help
    $ geet pr create --help
    
    Visit original content creator repository https://github.com/64kramsystem/geet
  • tfidf-ir-system

    IR System – TFIDF Implementation to search relevant covid19 clinical trails

    Prerequisties

    • Python Version – 3.9.x
    • Recommendation (Optional)
      • Create a virtual environment for python 3.9 incase you have a different version installed using the below command
        • conda create --name py39 python=3.9
    • Install dependencies using the following command (Requirements.txt is in the root folder)
      • pip install -r requirements.txt
    • Create a folder meta in the application root directory, This is where the indexes cached for quick queries!

    Running the application

    • Run app.py
      – python3 app.py
      – Eg. python3 app.py test-data
    • On querying, Application attempts to return top 10 relevant documents with their titles, filename, similarity score

    Data set files and index construction

    Since the actual data is huge. I created a medium size version which contain 500 files. along with indexes cached.
    Files in meta folder can be removed to reconstruct the indexes. If you attempt to create a new index with much bigger clinical trails data.
    Use the link below to download the original dataset and delete the index files in meta/, so the index is re created.

    1. Meta folder is already present in the folder. You could use the already constructed index of original set or recreate by not
      using the meta folder.
    2. Original dataset (3095 files) – https://drive.google.com/drive/folders/1UaO7pIfw8eSMYnussKsNpG6yeT9UmCva?usp=sharing

    Libraries Dependencies

    • nltk
      • punkt
      • wordnet
      • stopwords
    • pandas

    Overview

    Step 1

    • Tokenization
      • tags extracted from XML
        1. brief_title
        2. official_title
        3. brief_summary
        4. location_countries/country
        5. detailed_description
        6. Phase
        7. intervention/description
        8. intervention/intervention_type
        9. Condition
        10. Keyword
    • Remove stop words
    • Perform normalization (covid — covid19)

    Step 2

    • inverted index
    • Document id to document name index

    step 3

    • Save index for future use

    Step 4

    • Ranked retrieval using tfidf for terms

    Resources

    https://clinicaltrials.gov/ct2/about-studies/glossary
    https://clinicaltrials.gov/ct2/html/images/info/public.xsd
    https://clinicaltrials.gov/ct2/results/map?cond=COVID-19&map=
    http://www.trec-cds.org/2019.html#documents

    Visit original content creator repository
    https://github.com/makaravind/tfidf-ir-system

  • tfidf-ir-system

    IR System – TFIDF Implementation to search relevant covid19 clinical trails

    Prerequisties

    • Python Version – 3.9.x
    • Recommendation (Optional)
      • Create a virtual environment for python 3.9 incase you have a different version installed using the below command
        • conda create --name py39 python=3.9
    • Install dependencies using the following command (Requirements.txt is in the root folder)
      • pip install -r requirements.txt
    • Create a folder meta in the application root directory, This is where the indexes cached for quick queries!

    Running the application

    • Run app.py
      – python3 app.py
      – Eg. python3 app.py test-data
    • On querying, Application attempts to return top 10 relevant documents with their titles, filename, similarity score

    Data set files and index construction

    Since the actual data is huge. I created a medium size version which contain 500 files. along with indexes cached.
    Files in meta folder can be removed to reconstruct the indexes. If you attempt to create a new index with much bigger clinical trails data.
    Use the link below to download the original dataset and delete the index files in meta/, so the index is re created.

    1. Meta folder is already present in the folder. You could use the already constructed index of original set or recreate by not
      using the meta folder.
    2. Original dataset (3095 files) – https://drive.google.com/drive/folders/1UaO7pIfw8eSMYnussKsNpG6yeT9UmCva?usp=sharing

    Libraries Dependencies

    • nltk
      • punkt
      • wordnet
      • stopwords
    • pandas

    Overview

    Step 1

    • Tokenization
      • tags extracted from XML
        1. brief_title
        2. official_title
        3. brief_summary
        4. location_countries/country
        5. detailed_description
        6. Phase
        7. intervention/description
        8. intervention/intervention_type
        9. Condition
        10. Keyword
    • Remove stop words
    • Perform normalization (covid — covid19)

    Step 2

    • inverted index
    • Document id to document name index

    step 3

    • Save index for future use

    Step 4

    • Ranked retrieval using tfidf for terms

    Resources

    https://clinicaltrials.gov/ct2/about-studies/glossary
    https://clinicaltrials.gov/ct2/html/images/info/public.xsd
    https://clinicaltrials.gov/ct2/results/map?cond=COVID-19&map=
    http://www.trec-cds.org/2019.html#documents

    Visit original content creator repository
    https://github.com/makaravind/tfidf-ir-system

  • xk6-exec

    xk6-exec

    This is a k6 extension using the
    xk6 system.

    Build

    To build a k6 binary with this extension, first ensure you have the prerequisites:

    Then:

    1. Install xk6:
    go install go.k6.io/xk6/cmd/xk6@latest
    1. Build the binary:
    xk6 build --with github.com/grafana/xk6-exec@latest

    Development

    To make development a little smoother, use the Makefile in the root folder. The default target will format your code, run tests, and create a k6 binary with your local code rather than from GitHub.

    make

    Once built, you can run your newly extended k6 using:

     ./k6 run examples/script.js 

    Configuration

    Possible options

    • dir specify working dir
    • continue_on_error contintue script when return code is not zero
    • include_stdout_on_error exposes stdout when return code is not zero
    • combine_output combines stdout and error in output
    • env specify enviroment variables

    see examples/script.js for details

    Example

    // script.js
    import exec from 'k6/x/exec';
    
    export default function () {
      console.log(exec.command("date"));
      console.log(exec.command("ls",["-a","-l"]));
    }

    Result output:

    $ ./k6 run examples/script.js
    
              /\      |‾‾| /‾‾/   /‾‾/   
         /\  /  \     |  |/  /   /  /    
        /  \/    \    |     (   /   ‾‾\  
       /          \   |  |\  \ |  (‾)  | 
      / __________ \  |__| \__\ \_____/ .io
    
      execution: local
         script: examples/script.js
         output: -
    
      scenarios: (100.00%) 1 scenario, 1 max VUs, 10m30s max duration (incl. graceful stop):
               * default: 1 iterations for each of 1 VUs (maxDuration: 10m0s, gracefulStop: 30s)
    
    INFO[0000] vie 29 ene 2021 12:53:28 CET                  source=console
    INFO[0000] total 27040
    drwxrwxr-x 6 dgzlopes dgzlopes     4096 ene 29 12:52 .
    drwxrwxr-x 3 dgzlopes dgzlopes     4096 ene 29 12:46 ..
    -rw-rw-r-- 1 dgzlopes dgzlopes     8399 ene 29 12:45 builder.go
    -rw-rw-r-- 1 dgzlopes dgzlopes     1871 ene 29 12:45 builder_test.go
    drwxrwxr-x 3 dgzlopes dgzlopes     4096 ene 29 12:45 cmd
    -rw-rw-r-- 1 dgzlopes dgzlopes     6842 ene 29 12:45 environment.go
    drwxrwxr-x 8 dgzlopes dgzlopes     4096 ene 29 12:45 .git
    drwxrwxr-x 3 dgzlopes dgzlopes     4096 ene 29 12:45 .github
    -rw-rw-r-- 1 dgzlopes dgzlopes      118 ene 29 12:45 .gitignore
    -rw-rw-r-- 1 dgzlopes dgzlopes      923 ene 29 12:45 .golangci.yml
    -rw-rw-r-- 1 dgzlopes dgzlopes       85 ene 29 12:45 go.mod
    -rw-rw-r-- 1 dgzlopes dgzlopes     1020 ene 29 12:45 .goreleaser.yml
    -rw-rw-r-- 1 dgzlopes dgzlopes      183 ene 29 12:45 go.sum
    -rwxrwxr-x 1 dgzlopes dgzlopes 27598848 ene 29 12:52 k6
    -rw-rw-r-- 1 dgzlopes dgzlopes    11357 ene 29 12:45 LICENSE
    -rw-rw-r-- 1 dgzlopes dgzlopes     1805 ene 29 12:45 platforms.go
    -rw-rw-r-- 1 dgzlopes dgzlopes     3370 ene 29 12:45 README.md
    drwxrwxr-x 3 dgzlopes dgzlopes     4096 ene 29 12:45 vendor  source=console
    
    running (00m00.0s), 0/1 VUs, 1 complete and 0 interrupted iterations
    default ✓ [======================================] 1 VUs  00m00.0s/10m0s  1/1 iters, 1 per VU
    
         data_received........: 0 B 0 B/s
         data_sent............: 0 B 0 B/s
         iteration_duration...: avg=2.3ms min=2.3ms med=2.3ms max=2.3ms p(90)=2.3ms p(95)=2.3ms
         iterations...........: 1   55.736622/s
    

    Visit original content creator repository
    https://github.com/grafana/xk6-exec

  • ArbreBinUI

    PythonLogo ArbreBinUI

    ArbreBinUI est un script python permettant l’affichage de manière graphique (librairie Tkinter) d’un arbre binaire.

    Ce script fait appel à un autre script permettant la saisie en console d’un arbre binaire ainsi que sa représentation par une classe Arbre. Le script saisie.py à été développé par Pierre Lartigau en 2016.

    ScreenShot

    Installation et prérequis

    Pour utiliser correctement ce script vous avez besoin de

    • Python 2.*
    • Tkinter (Librairie de base, elle est normalement installée avec Python)

    Utilisation

    Pour tester ArbreBinUI, vous pouvez lancer directement le fichier affiche_arbre.py qui vous demandera 3 arbres:

    $ python affiche_arbre.py

    Pour l’utiliser dans des projets:

    # -*- coding: utf-8 -*-
    from affiche_arbre import TreeDrawer
    from saisie import *
    
    treeDrawer = TreeDrawer() # Il est important de créer cet objet avant toute tentative de dessin
    
    arbre = entrerArbre(1)
    
    # Mes opérations sur l'arbre ici..
    
    treeDrawer.dessiner_arbre(arbre) # On dessine ici notre arbre, on peut l'appeler autant que l'on veut.
    # Attention cette méthode est asynchrone, si vous voulez attendre je conseil de mettre une pause comme une attente clavier !
    
    # Éventuellement d'autres opérations..
    
    # On attend la fermeture des fenêtres avant de quitter le programme.
    # Cette méthode est obligatoire avant la fin du programme.
    treeDrawer.wait()

    Changelog

    2.1

    • Gestion multi-fenêtre pour chaque dessin
    • Passage de la fonction de dessin de synchrone à asynchrone

    2.0

    • Changement de librairie, passage de Pillow à Tkinter
    • Amélioration de la taille de la fenêtre en fonction de la hauteur de l’arbre
    • Meilleur fonctionnement multi OS

    1.1

    • La taille de l’image est générée en fonction de la hauteur de l’arbre
    • L’image peut être sauvegardée si demandée

    1.0

    • Affichage d’arbres binaires
    • TODO: Générer la taille de l’image en fonction de la hauteur de l’arbre
    Visit original content creator repository https://github.com/Astropilot/ArbreBinUI
  • HopsonCraft

    HopsonCraft

    Note: Game is undergoing redesign at the moment.

    To see source as it was in ep 4 “Creating Minecraft”, view here:

    https://github.com/Hopson97/HopsonCraft/tree/e803ca5fbf51df134cfa7e87c14275c6c73fce8e

    Note

    When I made this, I was highly inexperienced at programming (Less than 2 years), and the code is mostly pretty messy and game crashes a lot.

    I have kept it on my GitHub for historical reasons, seeing as I have videos about this on my YouTube channel.

    Versions (As seen in the YouTube videos)

    This game has gone through major rewrites and refactors overtime.

    To see the source code as it was in episodes 1, 2 and 3 of “Creating Minecraft in C++/ OpenGL” videos, look at an older commit here:

    https://github.com/Hopson97/HopsonCraft/tree/90a5d596d07dfe71b5dbf47ec76c0b0802ec9dfa

    Dependencies

    The project requires these libraries: SFML (minimum 2.4), GLEW 2.0+ (OpenGL 3.3+), and OpenGL Maths Library (GLM).

    Compile using compiler flags:

    Windows -> -std=c++14 -O3 -s -lglew32s -lglu32 -lopengl32 -lsfml-graphics -lsfml-audio -lsfml-system -lsfml-window

    Linux -> -std=c++14 -O3 -s -lGLEW -lGLU -lGL -lsfml-graphics -lsfml-audio -lsfml-system -lsfml-window

    All the libraries for Linux (At least, on Ubuntu) can be installed with

    sudo apt-get install libsfml-dev

    sudo apt-get install libglew-dev

    sudo apt-get install libglm-dev

    Contributing

    An easy way to contribute is to look for the ///@TODO parts in the code. please actually test before doing a pull request.

    You can view the code style in contributing.md

    You can view useful implementation details in implementation.md

    Also, checkout the TRELLO! https://trello.com/b/P8ZbobQH/hopsoncraft

    Description

    Simple Minecraft clone written using C++.

    Screenshots

    Trees

    Mountain

    Cliff

    Credits

    Design

    Matthew Hopson, https://github.com/Hopson97/

    Programming

    Matthew Hopson, https://github.com/Hopson97/

    Art

    Matthew Hopson, https://github.com/Hopson97/

    Special Thanks

    Anton Golov, https://github.com/jesyspa

    Zoltan Fazekas, https://github.com/zfazek

    Visit original content creator repository https://github.com/Hopson97/HopsonCraft
  • vetkd-utils

    keywords
    advanced
    motoko
    encrypted
    encrypted notes
    notes dapp
    vetkeys
    vetkd

    vetkd-utils

    This repo is a monorepo containing a Rust-based cargo crate, an NPM package and sample code (frontend and canister) to make it easier for other developers to use the pre-release version of ICP VetKeys without low-level coding.

    Current deployments

    Milestone 1 Video

    https://youtu.be/UoFhNJdzqNg

    Introduction

    The Mini IP Manager is an application that leverages vetKeys from the Internet Computer Protocol (ICP) to securely encrypt and programmatically decrypt and share IP Docs (AKA notes). The system ensures that shared content is accessible only under specific conditions set by the creator. Here’s an overview of how it operates:

    1. Initialization and Login: The application checks for a stored login (current principal), which is a cryptographically self-signed access identity within the ICP. If no login is found, the user is prompted to log in using Internet Identity.
    2. Home Page Functionality: The app continually polls for all notes that the user has permission to read. It lists these notes and retrieves the decryption key (vetKey) necessary to access them. VetKeys are derived from the notes and the owner’s principal, adding a layer of security.
    3. Creating IP Documents: Users can create new notes by entering content directly on the page. Saving a note will make it available to share with other users. These documents remain editable until they are shared for the first time.
    4. Sharing Documents: Users can share notes with Everyone on the system, or they can share with individual app users registered in the Mini IP Manager service. They have the option to set a specific time when the note becomes accessible or allow access at any time by selecting Anytime. Shares can be removed until the recipient has accessed the document. Each interaction is recorded in the history log.
    5. Accessing Shared Notes: Authorized users can view the note content. Tags, the note’s creator and the history log are not encrypted.

    Key Features and Considerations

    Security. By using vetKeys derived from unique identifiers and owner principals, the system ensures that only intended recipients can decrypt and access the documents.

    Flexibility. Users control when and with whom their documents are shared, with the ability to set access times and revoke shares if necessary.

    Transparency. The history log provides a transparent record of all interactions related to each note, enhancing accountability.

    User Experience. Continual polling for readable documents ensures users have up-to-date access to new shared content.

    Encrypted notes: vetKD

    View this sample’s code on GitHub

    This is encrypted-files-dapp-vetkd the proposed vetKD feature to add sharing of files between users.

    In particular, instead of creating a principal-specific AES key and syncing it across devices (using device-specific RSA keys), the notes are encrypted with an AES key that is derived (directly in the browser) from a note-ID-specific vetKey obtained from the backend canister (in encrypted form, using an ephemeral transport key), which itself obtains it from the vetKD system API. This way, there is no need for any device management in the dapp, plus sharing of notes becomes possible.

    The vetKey used to encrypt and decrypt a note is note-ID-specific (and not, for example, principal-specific) to enable the sharing of notes between users. The derived AES keys are stored as non-extractable CryptoKeys in an IndexedDB in the browser for efficiency so that their respective vetKey only has to be fetched from the server once. To improve the security even further, the vetKeys’ derivation information could be adapted to include a (numeric) epoch that advances each time the list of users with which the note is shared is changed.

    Currently, the only way to use this dapp is via manual local deployment (see below).

    Please also see the README of the original encrypted-notes-dapp for further details.

    Disclaimer

    This example uses an insecure implementation of the proposed vetKD system API in a pre-compiled form via the vetkd_system_api.wasm. Do not use this in production or for sensitive data! This example is solely provided for demonstration purposes to collect feedback on the mentioned vetKD system API.

    Manual local deployment

    Prerequisites

    • Clone the example dapp project: git clone https://github.com/dfinity/examples

    Optional Step 0: Install mise-en-place

    This is optional, but will correctly setup node and pnpm in all folders which have
    .mise.toml, .nvmrc or .tool-versions

    curl https://mise.run | sh
    mise install

    Step 1: Install dfx.

    Please keep in mind the dfx CLI currently only runs on Linux and macOS.

    Step 2: Install npm packages from the project root:

    pnpm install

    Note: see Troubleshooting in case of problems.

    Step 3: In case dfx was already started before, run the following:

    dfx stop
    rm -rf .dfx

    Step 4: Run in a separate window:

    dfx start --clean

    :::info
    If you see an error Failed to set socket of tcp builder to 0.0.0.0:8000, make sure that the port 8000 is not occupied, e.g., by the previously run Docker command (you might want to stop the Docker daemon whatsoever for this step).
    :::

    Step 5: Install a local Internet Identity (II) canister:

    :::info
    If you have multiple dfx identities set up, ensure you are using the identity you intend to use with the --identity flag.
    :::

    1. To install and deploy a canister run:
      dfx deploy internet_identity --argument '(null)'
    2. To print the Internet Identity URL, run:
      pnpm print-dfx-ii
    3. Visit the URL from above and create at least one local internet identity.

    Step 6: Install the vetKD system API canister:

    1. Ensure the Canister SDK (dfx) uses the canister ID that is hard-coded in the backend canister Rust source code:

      # NOTE: This is the canister ID specified in the source code.
      # for your own deployment you have to create a new one or wait
      # until the final release of the actual system api is finished and released.
      dfx canister create vetkd_system_api --specified-id nn664-2iaaa-aaaao-a3tqq-cai
    2. Install and deploy the canister:
      dfx deploy vetkd_system_api

    Step 7:. Deploy the encrypted notes backend canister:

    dfx deploy "vetkd_notes"

    ⚠️ Before deploying the Rust canister, you should first run rustup target add wasm32-unknown-unknown.

    Step 8: Update the generated canister interface bindings:

    dfx generate "vetkd_notes"

    Step 9: Deploy the frontend canister:

    dfx deploy vetkd_www

    You can check its URL with pnpm print-dfx-www.

    Step 10: Open the frontend:

    1. Start the local development server, which also supports hot-reloading:
      pnpm dev
    2. Open the URL that is printed in the console output. Usually, this is http://localhost:3000/.

    :::info
    If you have opened this page previously, please remove all local store data for this page from your web browser, and hard-reload the page. For example in Chrome, go to Inspect → Application → Local Storage → http://localhost:3000/ → Clear All, and then reload.
    :::

    Troubleshooting

    If you run into issues, clearing all the application-specific IndexedDBs in the browser (which are used to store Internet Identity information and the derived non-extractable AES keys) might help fix the issue.

    Visit original content creator repository
    https://github.com/shipstone-labs/vetkd-utils

  • TheConspiracyWorld

    Getting Started with Create React App

    This project was bootstrapped with Create React App.

    Available Scripts

    In the project directory, you can run:

    npm start

    Runs the app in the development mode.
    Open http://localhost:3000 to view it in your browser.

    The page will reload when you make changes.
    You may also see any lint errors in the console.

    npm test

    Launches the test runner in the interactive watch mode.
    See the section about running tests for more information.

    npm run build

    Builds the app for production to the build folder.
    It correctly bundles React in production mode and optimizes the build for the best performance.

    The build is minified and the filenames include the hashes.
    Your app is ready to be deployed!

    See the section about deployment for more information.

    npm run eject

    Note: this is a one-way operation. Once you eject, you can’t go back!

    If you aren’t satisfied with the build tool and configuration choices, you can eject at any time. This command will remove the single build dependency from your project.

    Instead, it will copy all the configuration files and the transitive dependencies (webpack, Babel, ESLint, etc) right into your project so you have full control over them. All of the commands except eject will still work, but they will point to the copied scripts so you can tweak them. At this point you’re on your own.

    You don’t have to ever use eject. The curated feature set is suitable for small and middle deployments, and you shouldn’t feel obligated to use this feature. However we understand that this tool wouldn’t be useful if you couldn’t customize it when you are ready for it.

    Learn More

    You can learn more in the Create React App documentation.

    To learn React, check out the React documentation.

    Code Splitting

    This section has moved here: https://facebook.github.io/create-react-app/docs/code-splitting

    Analyzing the Bundle Size

    This section has moved here: https://facebook.github.io/create-react-app/docs/analyzing-the-bundle-size

    Making a Progressive Web App

    This section has moved here: https://facebook.github.io/create-react-app/docs/making-a-progressive-web-app

    Advanced Configuration

    This section has moved here: https://facebook.github.io/create-react-app/docs/advanced-configuration

    Deployment

    This section has moved here: https://facebook.github.io/create-react-app/docs/deployment

    npm run build fails to minify

    This section has moved here: https://facebook.github.io/create-react-app/docs/troubleshooting#npm-run-build-fails-to-minify
    “# TheConspiracyWorld”

    Visit original content creator repository
    https://github.com/The-Conspiracy-World/TheConspiracyWorld

  • c_wsf_vscode

    This is a pre-made workspace folder for C programming on Visual Studio Code

    This workspace folder works on Mac, Windows, and Linux. Both debugging and compiling work properly. Make sure you read the prerequisite steps below before trying to use this thing. To use this workspace folder open it as your highest folder in Visual Studio Code. To add a program to this workspace folder make a subfolder to put its source files in. After finishing the prerequisite setup stuff things should magically work. In the future when there is more time I will make a few similar workspace folders, one for C++ and one that uses makefiles.

    • How to download:

    Download Instructions

    How to use

    • To Build: Select any source file in the program folder of the program you want to debug and then hit the keys CTRL + SHIFT + B.

    • To Debug: Place a breakpoint were you want the debugger to start debugging and then hit the f5 key. To place a breakpoint hold you mouse to the left of the line number for the line you want to start debugging on. If your program takes command line arguments hardcode those args into the args section in the launch.json file. If you want to find where your program crashes run the debugger without placing a breakpoint.

    • To Run a Program: After successfully building there should be an executable with the same name as the folder it was compiled placed in the folder that is was compiled in. On Mac or Linux this executable would be called program_folder_name, on Windows program_folder_name.exe. To run the executable right-click on it and pick the option “Open in Integrated Terminal”. Next if you are on Mac or linux run ./program_folder_name, on Windows .\program_folder_name.exe.

    Prerequisite setup stuff

    For this workspace folder to work YOU MUST HAVE gcc & gdb on your path.

    You must also have the C/C++ VScode extension from microsoft installed. Uninstall any other extension having to do with C/C++ as these extensions might fight with the one from Microsoft, exp the extension from Austin, or that extension called “CodeRunner”…

    You must also have your Workspace folder structured to have a separate sub-folder for each program you want to compile. Each program-folder can only have one source file with a main() function.

    How to get gcc & gdb on your PATH:

    • Windows:

      After putting mingw-w64 on the path restart VScode so that it gets an updated PATH.

    • Linux & Windows Subsystem for Linux:

      • Debain based install:

        sudo apt-get update

        sudo apt-get install gcc gdb make

      • Arch based install:

        sudo pacman -Syu

        sudo pacman -Sy gcc gdb make

      After installing gcc & gdb restart VScode so that it gets an updated PATH.

    • Mac:

      • To install: xcode-select --install
      • After installing restart VScode so that it gets an updated PATH, you might need to re-login.
      • The xcode-select --install command actually installs clang & lldb, not gcc & gdb. On mac if you have clang installed the gcc command runs clang, don’t worry about this since the two compilers for your proposes are probably the same. If you really want gcc this video shows you how to get it: https://www.youtube.com/watch?v=0z-fCNNqfEg

    To check if you successfully got gcc & gdb on your path run gcc -v and gdb -v

    GCC from some sources will not work on windows. If you have problems with gcc not accepting some args such as -Og and *.c, uninstall your trash gcc and install mingw-w64-builds gcc.

    Windows Subsystem for linux

    It is possible to get a very nice setup where you can easily change between compiling and debugging on native windows and WSL. This setup is the most optimal for windows users since it’s very useful to have easy access to some very powerful Unix exclusive tools. I do not feel like typing up the instructions to get this setup working, but hopefully will at some point. In general the additional things you have to do are, install WSL, install the WSL extension, click on the green button in the lower left then select Remote-WSL: Reopen folder in WSL, then install the C/C++ extension a second time while VScode is in WSL mode.

    Rules of use

    • Do not have more than one source file with a main() function in the same program folder.
    • Do not put this workspace folder inside a workspace folder, in other words do not have this workspace folder be a subfolder. This workspace folder must be the highest folder open in VScode for it to work.
    • A program folder should be a subfolder of this workspace folder, do not nest program folders as this might cause activity that might confuse you.
    • Do everything specified in the prerequisite setup setups…
    • If stuff is not working before complaining or giving up double check and make sure you have the CodeRunner extension not installed.
    • On Linux and probably Mac you can not run programs on a normal USB stick without doing some odd stuff. In other words if you have this workspace folder on a USB stick take it off before using it with Linux or Mac.

    Known Issues

    • On Mac sometimes the compiler puts the executable in an odd spot thus causing the debugger problems.
    • On mac the error and warning highlighting can sometimes be of, mac uses clang to compile. As a temp fix in the tasks.json file change line 141 to be “$clang” from “$gcc”, line 141 specifies the problem matcher.
    • TDM-gcc gcc does not work and will give the error gcc: error: *.c: Invalid argument , mingw-w64-builds gcc

    If you find an issues that can be fixed or improved submit a pull request

    Visit original content creator repository https://github.com/kevinacahalan/c_wsf_vscode