Author: 1u2tqe51uojr

  • biblioteca-app

    📚 Biblioteca App

    Biblioteca App é um pequeno sistema que simula um gerenciamento de uma biblioteca, como o cadastro de livros, reservas e devoluções. Possui autenticação síncrona com o banco de dados, ou seja, é necessário que o usuário esteja previamente cadastrado no banco de dados para conseguir visualizar a página inicial da Biblioteca App.

    Funcionalidades do sistema

    • Cadastrar livros, reservas e usuários
    • Editar livros, reservas e usuários
    • Remover livros, reservas e usuários
    • Devolver livros

    Recursos utilizados

    • IDE IntelliJ IDEA 2022.2 (Community Edition)
    • Linguagem Java
    • Framework Spring
    • Banco de dados MySQL
    • Postman v10.13.5

    Endpoints

    O sistema possui uma única tela (página inicial), sendo apenas possível cadastrar livros, reservar ou devolver. Caso queira executar alguma outra ação listada nas funcionalidades do sistema, como cadastrar livros por exemplo, é possível utilizando a API Postman. No arquivo localizado em src/main/resources/templates/Biblioteca App.postman_collection.json, é possível visualizar todos os endpoints disponíveis no sistema. O arquivo também pode ser importado no Postman.

    Autenticação

    Como já informado no início, o sistema requer autenticação e há dois possíveis métodos de autenticação no sistema:

    1. utilizando a autenticação Basic Auth, que requer um usuário e senha cadastrados previamente no banco de dados,
    2. utilizando a autenticação por JWT, o Bearer Token, que também requer um usuário e senha cadastrados previamente no banco de dados, porém existe um tempo de validade para a autenticação.

    Basic Auth

    Criar um usuario para autenticação. Abaixo segue o SQL para criar o usuário adm com a senha adm na tabela usuario:

    INSERT INTO biblioteca_db.usuario(data_criacao, data_nascimento, nome, ativo, documento_identificacao, email, senha, login)
    VALUES(null, null, null, 1, null, null, '$2a$12$/3rVvVLUmhfgVzPSmdec0OR5OClQAmXltU0vUPMlQDIN0jsRP94oa', 'adm');

    Bearer Token

    Para autenticar no sistema usando o jwt, acessar o endereço http://localhost:8080/login (POST). O retorno será um json como mostrado abaixo:

    {
        "token": "eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJuYXRhbGlhLnN1enVraSIsImV4cCI6MTY4NTUwNTM2Mn0.wMa83vD66PYH-UZyvrKtOyz5Uv7HHTtyx1f2F0coUBo",
        "validade": "480"
    }

    O token tem validade de 8 horas e esse período pode ser alterado modificando a propriedade security.jwt.expiration no arquivo application.properties. O valor numeral deve ser informado em minutos. Para usar o token com o Postman, adicionar na configuração “Headers” do endpoint desejado:

    Key: Authorization
    Value: Bearer eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJuYXRhbGlhLnN1enVraSIsImV4cCI6MTY4NTUwNTM2Mn0.wMa83vD66PYH-UZyvrKtOyz5Uv7HHTtyx1f2F0coUBo
    

    Autenticação sem validação no banco de dados

    Também é possível remover essas duas configurações de autenticação, e incluir um outro método mais simples no sistema que não requer validação com o banco de dados, basta adicionar a dependência do próprio spring. Esta autenticação consiste em um usuário padrão e uma senha pré-definida e já possui interface própria do spring. Para utilizar essa autenticação, basta incluir a seguinte dependência no arquivo pom.xml:

    <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-security</artifactId>
    </dependency>
    

    O usuário padrão é user e a senha aparece no console da IDE desta forma: Using generated security password: cd2ed133-f34e-4951-85e3-9fccaa8a3e915

    Executar Biblioteca App usando arquivo jar

    Para executar o sistema na sua máquina, seguir os seguintes passos:

    1. Fazer o download deste projeto em algum diretório local,
    2. Abrir algum terminal de comando da sua máquina (Prompt de Comando, Windows PowerShell),
    3. Executar o comando mvn clean package,
    4. Executar o comando cd target,
    5. Executar o comando java -jar bibliotecaApp-0.0.1-SNAPSHOT.jar,
    6. Aguardar pela mensagem Started BibliotecaAppApplication in n seconds,
    7. Acessar o endereço http://localhost:8080. Enquanto o terminal de comando estiver aberto, a aplicação ficará em execução, caso contrário, a aplicação será encerrada.

    Visit original content creator repository
    https://github.com/nataliasuzuki/biblioteca-app

  • selenide-testng-reportportal-example

    GitHub stars GitHub watchers GitHub forks

    Selenide, TestNG, ReportPotal Example

    Table of Contents

    Environment

    Platform: macOS Mojave
    IDE: IntelliJ IDEA 2019.3.1 (Community Edition)
    Java: 1.8.0_211
    Gradle: 6.7.1
    Docker: 19.03.5

    Frameworks/Libraries

    Selenide: 5.17.0 – Web Driver
    TestNG: 7.1.0 – Testing Framework
    ReportPortal UI: 5.0 – Reporting Engine Service
    ReportPortal Java Agent: 5.0.8 – Reporting Engine Agent for TestNG

    Project Structure

    ├── gradle
    │   └── wrapper
    │       ├── gradle-wrapper.jar
    │       └── gradle-wrapper.properties
    ├── images
    │   └── **/*.png
    ├── src/test
    │   ├── java/com/github/ngoanh2n
    │   │   ├── common
    │   │   │   ├── BasePage.java
    │   │   │   └── BaseTest.java
    │   │   ├── components
    │   │   │   └── NavigationBar.java
    │   │   ├── pages
    │   │   │   ├── HomePage.java
    │   │   │   └── LoginPage.java
    │   │   └── scenarios
    │   │       └── ExampleTest.java
    │   └── resources
    │       ├── log4j.properties
    │       ├── reportportal.properties
    │       └── selenide.properties
    ├── .gitignore
    ├── LICENSE
    ├── README.md
    ├── build.gradle
    ├── docker-compose.yml
    ├── gradle.properties
    ├── gradlew
    ├── gradlew.bat
    └── settings.gradle
    

    How To Use

    Clone Repository

    $ git clone https://github.com/ngoanh2n/selenide-testng-reportportal-example.git

    Configuration Files

    You can change values for your case.

    1. log4j.properties

      Configuring log4j involves assigning the Level, defining Appender, and specifying Layout objects in a configuration file.

    2. selenide.properties

      Configuration settings for Selenide default browser. Settings can be set either via system property or programmatically.

    3. reportportal.properties

      Store information for connecting to ReportPortal web service (Run with Docker in this case).

    Deploy ReportPortal With Docker

    Install Docker, Docker Machine

    Bash completion is a bash function that allows you to auto complete commands or arguments by typing partially commands or arguments, then pressing the [Tab] key. This will help you when writing the bash command in terminal.
    $ brew install bash-completion

    Docker for Mac is best installed with Homebrew and Homebrew Cask. For other ways to install on MacOS, see Install Docker for Mac in Docker’s docs.
    $ brew cask install docker

    Download the Docker Machine binary and extract it to your PATH.
    $ base=https://github.com/docker/machine/releases/download/v0.16.0 && curl -L $base/docker-machine-$(uname -s)-$(uname -m) >/usr/local/bin/docker-machine && chmod +x /usr/local/bin/docker-machine

    To check the version type the following command.

    Mac:~ ngoanh2n$ docker --version
    Docker version 19.03.5, build 633a0ea

    Mac:~ ngoanh2n$ docker-compose --version
    docker-compose version 1.25.2, build 698e2846

    Mac:~ ngoanh2n$ docker-machine --version
    docker-machine version 0.16.0, build 702c267f

    Start Docker desktop community.
    $ open /Applications/Docker.app

    Deploy ReportPortal

    By the following official instructions here, you can do that in shortly.

    Navigate repository root.
    $ cd selenide-testng-reportportal-example

    Download the latest compose descriptor.
    $ curl https://raw.githubusercontent.com/reportportal/reportportal/master/docker-compose.yml -o docker-compose.yml

    Start the application using the following command.
    $ docker-compose -p reportportal up -d --force-recreate

    Setup ReportPortal UI

    Get current IP on your mac machine (For ethernet in this case).

    Mac:~ ngoanh2n$ ipconfig getifaddr en0
    192.168.1.5

    Open your browser with an IP address of the deployed environment at port 8080. In my case: http://192.168.1.5:8080/ui/#login

    Use below accounts to access.

    default/1q2w3e
    superadmin/erebus

    Now, I use account superadmin/erebus to create a project named selenide-testng-reportportal-example

    Note: If nothing was occured when you logged in, please allocate RAM to 4GB and try again!

    Navigate to Projects Management in URL http://192.168.1.5:8080/ui/#administrate/projects

    Create a project.

    Add a user as ngoanh2n to project selenide-testng-reportportal-example

    Now I use account ngoanh2n to join project as role tester.

    Copy and replace personal properties into reportportal.properties in resources folder.

    Run Tests With Gradle

    ./gradlew clean test

    Perform On Browsers

    • chrome
    • firefox
    • ie
    • edge
    • htmlunit
    • phantomjs
    • safari

    If run safari, you must enable the ‘Allow Remote Automation’ option in Safari’s Develop menu to control Safari via WebDriver.

    Able to select browser by passing system property selenide.browser

    ./gradlew clean test -Dselenide.browser=firefox

    Filter Tests

    You can filter tests by using option --tests
    Giving values can be TestPackage, TestClass, TestMethod

    ./gradlew clean test -Dselenide.browser=firefox --tests ExampleTest.homePageTest

    ReportPortal Results

    See test results as launches in URL http://192.168.1.5:8080/ui/#selenide-testng-reportportal-example/launches/all

    Visit original content creator repository https://github.com/ngoanh2n/selenide-testng-reportportal-example
  • selenide-testng-reportportal-example

    GitHub stars GitHub watchers GitHub forks

    Selenide, TestNG, ReportPotal Example

    Table of Contents

    Environment

    Platform: macOS Mojave
    IDE: IntelliJ IDEA 2019.3.1 (Community Edition)
    Java: 1.8.0_211
    Gradle: 6.7.1
    Docker: 19.03.5

    Frameworks/Libraries

    Selenide: 5.17.0 – Web Driver
    TestNG: 7.1.0 – Testing Framework
    ReportPortal UI: 5.0 – Reporting Engine Service
    ReportPortal Java Agent: 5.0.8 – Reporting Engine Agent for TestNG

    Project Structure

    ├── gradle
    │   └── wrapper
    │       ├── gradle-wrapper.jar
    │       └── gradle-wrapper.properties
    ├── images
    │   └── **/*.png
    ├── src/test
    │   ├── java/com/github/ngoanh2n
    │   │   ├── common
    │   │   │   ├── BasePage.java
    │   │   │   └── BaseTest.java
    │   │   ├── components
    │   │   │   └── NavigationBar.java
    │   │   ├── pages
    │   │   │   ├── HomePage.java
    │   │   │   └── LoginPage.java
    │   │   └── scenarios
    │   │       └── ExampleTest.java
    │   └── resources
    │       ├── log4j.properties
    │       ├── reportportal.properties
    │       └── selenide.properties
    ├── .gitignore
    ├── LICENSE
    ├── README.md
    ├── build.gradle
    ├── docker-compose.yml
    ├── gradle.properties
    ├── gradlew
    ├── gradlew.bat
    └── settings.gradle
    

    How To Use

    Clone Repository

    $ git clone https://github.com/ngoanh2n/selenide-testng-reportportal-example.git

    Configuration Files

    You can change values for your case.

    1. log4j.properties

      Configuring log4j involves assigning the Level, defining Appender, and specifying Layout objects in a configuration file.

    2. selenide.properties

      Configuration settings for Selenide default browser. Settings can be set either via system property or programmatically.

    3. reportportal.properties

      Store information for connecting to ReportPortal web service (Run with Docker in this case).

    Deploy ReportPortal With Docker

    Install Docker, Docker Machine

    Bash completion is a bash function that allows you to auto complete commands or arguments by typing partially commands or arguments, then pressing the [Tab] key. This will help you when writing the bash command in terminal.
    $ brew install bash-completion

    Docker for Mac is best installed with Homebrew and Homebrew Cask. For other ways to install on MacOS, see Install Docker for Mac in Docker’s docs.
    $ brew cask install docker

    Download the Docker Machine binary and extract it to your PATH.
    $ base=https://github.com/docker/machine/releases/download/v0.16.0 && curl -L $base/docker-machine-$(uname -s)-$(uname -m) >/usr/local/bin/docker-machine && chmod +x /usr/local/bin/docker-machine

    To check the version type the following command.

    Mac:~ ngoanh2n$ docker --version
    Docker version 19.03.5, build 633a0ea

    Mac:~ ngoanh2n$ docker-compose --version
    docker-compose version 1.25.2, build 698e2846

    Mac:~ ngoanh2n$ docker-machine --version
    docker-machine version 0.16.0, build 702c267f

    Start Docker desktop community.
    $ open /Applications/Docker.app

    Deploy ReportPortal

    By the following official instructions here, you can do that in shortly.

    Navigate repository root.
    $ cd selenide-testng-reportportal-example

    Download the latest compose descriptor.
    $ curl https://raw.githubusercontent.com/reportportal/reportportal/master/docker-compose.yml -o docker-compose.yml

    Start the application using the following command.
    $ docker-compose -p reportportal up -d --force-recreate

    Setup ReportPortal UI

    Get current IP on your mac machine (For ethernet in this case).

    Mac:~ ngoanh2n$ ipconfig getifaddr en0
    192.168.1.5

    Open your browser with an IP address of the deployed environment at port 8080. In my case: http://192.168.1.5:8080/ui/#login

    Use below accounts to access.

    default/1q2w3e
    superadmin/erebus

    Now, I use account superadmin/erebus to create a project named selenide-testng-reportportal-example

    Note: If nothing was occured when you logged in, please allocate RAM to 4GB and try again!

    Navigate to Projects Management in URL http://192.168.1.5:8080/ui/#administrate/projects

    Create a project.

    Add a user as ngoanh2n to project selenide-testng-reportportal-example

    Now I use account ngoanh2n to join project as role tester.

    Copy and replace personal properties into reportportal.properties in resources folder.

    Run Tests With Gradle

    ./gradlew clean test

    Perform On Browsers

    • chrome
    • firefox
    • ie
    • edge
    • htmlunit
    • phantomjs
    • safari

    If run safari, you must enable the ‘Allow Remote Automation’ option in Safari’s Develop menu to control Safari via WebDriver.

    Able to select browser by passing system property selenide.browser

    ./gradlew clean test -Dselenide.browser=firefox

    Filter Tests

    You can filter tests by using option --tests
    Giving values can be TestPackage, TestClass, TestMethod

    ./gradlew clean test -Dselenide.browser=firefox --tests ExampleTest.homePageTest

    ReportPortal Results

    See test results as launches in URL http://192.168.1.5:8080/ui/#selenide-testng-reportportal-example/launches/all

    Visit original content creator repository https://github.com/ngoanh2n/selenide-testng-reportportal-example
  • samsung-ai-challenge

    Samsung AI Challenge for Scientific Discovery

    • Date: 2021.08.04 ~ 2021.09.27 18:00
    • Task: Molecular property prediction (The gap between S1 and T1 energy)
    • Result: 21st place / 220 teams

    Overview

    Generating node-level feature / edge type

    • Using only atom type (13 dim)
    • Each atom is embedded into 256 dimensional vector by a simple linear transformation
    • There are 6 edge type : the number of combinations of (bond type, bond stereo)

    Relational Graph Convolutional Network (RGCN)

    • Total 8 RGCN layers each of which has 256 channels
    • Skip-connections
    • Using the sum of node representations followed by one hidden layer MLP as the graph representation

    Readout phase

    • Multi layers perceptron with 2 hidden layers (1,024 dim, 512 dim)
    • Dropout with p=0.3
    • Directly predicting ST1 gap

    10-Fold ensembling

    • Taking the simple average of 10 models

    Run

    1. Data preparation
    • dir_data: the directory where train.csv, dev.csv, and test.csv are stored
    • dir_output: the directory where the preprocessed tgm.data.Data files will be stored.
    python gnn_preprocess.py --dir_data './data' --dir_output './outputs/rgcn'
    
    1. Training a single model and predicting test data
    • Modify TrainConfig in config.py
    • It gives public score about 0.127
    python train.py
    

    Visit original content creator repository
    https://github.com/HiddenBeginner/samsung-ai-challenge

  • seminar-list

    AUSG(Awskrug University Student Group)🙌

    3기 세미나

    AUSG::초보자를 위한 AWS 뿌시기


    18차 세미나 : AWS AppSync로 만드는 서버리스 GraphQL 서비스 (ft. AWS Amplify)


    2기 세미나

    초보자를 위한 AWS 뿌시기 세미나 🤜🤛


    17차 세미나 : 얼굴 분석을 통한 표정에 알맞은 음악 추천 iOS 어플리케이션


    16차 세미나 : 프론트 개발자도 혼자 iOS 어플리케이션 만들 수 있다구요!


    15차 세미나 : 별점에 따라 표시가 다른 맛집 지도 만들기


    14차 세미나 : Android 초성퀴즈 앱 만들기


    13차 세미나 : Android Track 사전세션


    12차 세미나 : 문자열 이미지를 텍스트로 변환해보기


    11차 세미나 : 프론트 개발자도 혼자 웹 어플리케이션 만들 수 있어요


    10차 세미나 : AWS와 CRA로 게임을 뚝딱!


    9차 세미나 : Web Track 사전세션


    8차 세미나 : AWS 계정을 갓 생성한 초보자를 위한 세미나


    7차 세미나 : Docker 입문자를 위한 Docker의 이해와 Jenkins/ECS 실습


    6차 세미나 : Node.js 서버리스 프레임웍을 사용하여 싱글페이지 포트폴리오 제작하기


    외부 세미나 🤗


    Amathon 사전세션 – Amplify로 풀사이클 개발 체험하기


    Amathon 사전세션 – 클라우드 컨테이너 환경에서 Back-end API 구성하기 AtoZ


    Amathon 사전세션 – Circle CI + ElasticBeanstalk을 활용한 React 배포 자동화


    AUSG X 피로그래밍 세미나


    AWS Community Day re:cap : 블록체인 원장 DB를 클라우드로 QLDB


    1기 세미나

    초보자를 위한 AWS 뿌시기 세미나 🤜🤛


    5차 세미나 : 자바스크립트로 트렌디한 웹개발과 쉬운 배포 경험하기


    4차 세미나 : 무료 이미지 리사이즈 서비스 만들기


    3차 세미나 : AWS로 구현하는 손쉬운 앱 로그인 with AWS Cognito


    2차 세미나 : 팀플 과제를 여행하는 히치하이커를 위한 안내서 with AWS C9, AWS Elastic Beanstalk


    1차 세미나 : Python으로 비트코인 챗봇 만들기 가즈아ㅏㅏ with AWS EC2, Django


    외부 세미나 🤗


    AWS Community Day re:cap : SageMaker로 강화학습(RL) 마스터링


    AWS Community Day APAC : MyMusicTaste에서 Serverless DataLake 구축 사례, AUSG 소개


    고려대학교 해커톤 세미나


    Amathon 사전 세션 : EC2 + S3 + RDS를 사용해 Django 웹 서버 구축하기

    Amathon 사전 세션 : Amazon SageMaker를 활용하여 MNIST 머신러닝 맛보기

    Amathon 사전 세션 : Serverless Framework를 활용한 SPA 배포 실습


    AUSG 세미나 For 멋쟁이 사자처럼 : 인스타그램처럼 사진 업로드 해보기

    AUSG 세미나 For 멋쟁이 사자처럼 : AUSG 소개


    삼성 SDS 세미나 : REST의 고통은 이제 그만, 차근차근 GraphQL 시작하기


    AWS Summit Seoul 2018 : Serverless로 이미지 프로토타입 개발기


    한양대 Erica 게릴라 세미나 : AWS를 사용하여 웹페이지를 서버에 업로드하고 도메인을 등록해 웹페이지를 서비스해보기


    한양대 창업동아리 박람회 : AUSG 소개

    한양대 창업동아리 박람회 : Amazon Web Services 클라우드 소개와 사례

    • 발표자 : 박소정
    • 날짜 : 2018.03.29


    Unithon Seminar : Wildrydes 서버리스 웹 애플리케이션 워크샵


    Community Day 2018 : App Sync, 모바일 개발을 위한 GraphQL as a Service


    Visit original content creator repository https://github.com/AUSG/seminar-list
  • seminar-list

    AUSG(Awskrug University Student Group)🙌

    3기 세미나

    AUSG::초보자를 위한 AWS 뿌시기


    18차 세미나 : AWS AppSync로 만드는 서버리스 GraphQL 서비스 (ft. AWS Amplify)


    2기 세미나

    초보자를 위한 AWS 뿌시기 세미나 🤜🤛


    17차 세미나 : 얼굴 분석을 통한 표정에 알맞은 음악 추천 iOS 어플리케이션


    16차 세미나 : 프론트 개발자도 혼자 iOS 어플리케이션 만들 수 있다구요!


    15차 세미나 : 별점에 따라 표시가 다른 맛집 지도 만들기


    14차 세미나 : Android 초성퀴즈 앱 만들기


    13차 세미나 : Android Track 사전세션


    12차 세미나 : 문자열 이미지를 텍스트로 변환해보기


    11차 세미나 : 프론트 개발자도 혼자 웹 어플리케이션 만들 수 있어요


    10차 세미나 : AWS와 CRA로 게임을 뚝딱!


    9차 세미나 : Web Track 사전세션


    8차 세미나 : AWS 계정을 갓 생성한 초보자를 위한 세미나


    7차 세미나 : Docker 입문자를 위한 Docker의 이해와 Jenkins/ECS 실습


    6차 세미나 : Node.js 서버리스 프레임웍을 사용하여 싱글페이지 포트폴리오 제작하기


    외부 세미나 🤗


    Amathon 사전세션 – Amplify로 풀사이클 개발 체험하기


    Amathon 사전세션 – 클라우드 컨테이너 환경에서 Back-end API 구성하기 AtoZ


    Amathon 사전세션 – Circle CI + ElasticBeanstalk을 활용한 React 배포 자동화


    AUSG X 피로그래밍 세미나


    AWS Community Day re:cap : 블록체인 원장 DB를 클라우드로 QLDB


    1기 세미나

    초보자를 위한 AWS 뿌시기 세미나 🤜🤛


    5차 세미나 : 자바스크립트로 트렌디한 웹개발과 쉬운 배포 경험하기


    4차 세미나 : 무료 이미지 리사이즈 서비스 만들기


    3차 세미나 : AWS로 구현하는 손쉬운 앱 로그인 with AWS Cognito


    2차 세미나 : 팀플 과제를 여행하는 히치하이커를 위한 안내서 with AWS C9, AWS Elastic Beanstalk


    1차 세미나 : Python으로 비트코인 챗봇 만들기 가즈아ㅏㅏ with AWS EC2, Django


    외부 세미나 🤗


    AWS Community Day re:cap : SageMaker로 강화학습(RL) 마스터링


    AWS Community Day APAC : MyMusicTaste에서 Serverless DataLake 구축 사례, AUSG 소개


    고려대학교 해커톤 세미나


    Amathon 사전 세션 : EC2 + S3 + RDS를 사용해 Django 웹 서버 구축하기

    Amathon 사전 세션 : Amazon SageMaker를 활용하여 MNIST 머신러닝 맛보기

    Amathon 사전 세션 : Serverless Framework를 활용한 SPA 배포 실습


    AUSG 세미나 For 멋쟁이 사자처럼 : 인스타그램처럼 사진 업로드 해보기

    AUSG 세미나 For 멋쟁이 사자처럼 : AUSG 소개


    삼성 SDS 세미나 : REST의 고통은 이제 그만, 차근차근 GraphQL 시작하기


    AWS Summit Seoul 2018 : Serverless로 이미지 프로토타입 개발기


    한양대 Erica 게릴라 세미나 : AWS를 사용하여 웹페이지를 서버에 업로드하고 도메인을 등록해 웹페이지를 서비스해보기


    한양대 창업동아리 박람회 : AUSG 소개

    한양대 창업동아리 박람회 : Amazon Web Services 클라우드 소개와 사례

    • 발표자 : 박소정
    • 날짜 : 2018.03.29


    Unithon Seminar : Wildrydes 서버리스 웹 애플리케이션 워크샵


    Community Day 2018 : App Sync, 모바일 개발을 위한 GraphQL as a Service


    Visit original content creator repository https://github.com/AUSG/seminar-list
  • b5st

    b5st – A Bootstrap 5 Starter Theme, for WordPress

    Version 1.3.3

    https://github.com/SimonPadbury/b5st


    b5st is a simple, Gutenberg-compatible WordPress starter theme loaded with Bootstrap 5 and Bootstrap Icons — using node-sass for preprocessing its SCSS into CSS.

    Basic features

    • UNLICENCE (open source).

    • Simple, intuitive, clean code. Theme CSS and JS, functions and loops are organized into different folders.

    • A starter CSS theme – /theme/css/b5st.css, enqueued. (Note: do not put your styles in styles.css, because that is not enqueued.)

    • b5st.css is generated from SCSS using node-sass. The SCSS files are also included.

    • A starter JS script – theme/css/b5st.js – unrequired but present as a starter (and with a commented-out enqueue).

    • Dimox breadcrumbs (http://dimox.net/wordpress-breadcrumbs-without-a-plugin/). Inserted using an action hook.

    • Long read prose (paragraphs etc) in single posts has increased font size for wide viewports, using CSS clamp().

    Dependencies

    • WordPress. 😎

    • Served from a CDN:

      • Bootstrap v5.2.3 CSS
      • Bootstrap v5.2.3 bundle JS
      • Bootstrap Icons v1.10.2
    • Optional (see “Preprocessing SCSS Files” below):

      • NodeJS
      • node-sass

    Bootstrap Sass is not included. But you can follow the instructions at https://getbootstrap.com/docs/5.0/customize/sass/ to bring Bootstrap Sass into your project.

    Bootstrap Integration

    • Bootstrap navbar with WordPress menu and search.

    • Bootstrap customized comments and feedback response form.

    Gutenberg Compatibility

    • Gutenberg editor stylesheet – into which has been copy-pasted the typography styles from Bootstrap 5’s Reboot CSS plus a few extras.

    • b5st has a centered narrow single-column layout, so that it can make use of Gutenberg’s extra-wide and full width blocks. In the front-end CSS, these are handled by a variation on Andy Bell’s full bleed utility.

    Child-Themes and b5st

    I recommend you do not simply use b5st as-is, and then do all your designing in a child theme.

    b5st is only a meant to be a place to start a WordPress/Bootstrap 5 project. It is easier and better to directly rebuild b5st to suit your design needs. Besides, future improvements to b5st may make it not compatible with your child theme — so, you may not be able to “upgrade” your project to a newer version of b5st simply by swapping it out.

    With that said, you can develop child themes based off your (b5st-based) project. After you have taken and made b5st your own, modifying its layouts, styles etc. to create your own theme, and then deployed it on a live website, then you can later make child themes from what will then be your (client’s) website theme. For example, for special occasions you can make a child themes with alternate colors and backgrounds, seasonal layout changes, etc.

    To aid you at that point, b5st has the following child-theme friendly features:

    • Many functions are pluggable.

    • Theme hooks – paired before and after the navbar, post/page main, (optional sidebar) and footer. Parent theme hooks are able to recieve actions from a child theme.

    • Also, the navbar brand, navbar search form and sub-footer “bottomline” are inserted using pluggable hooks. So, a child theme can override these.

    Preprocessing SCSS Files

    In the theme/ folder there is a scss/ folder containing all the SCSS files that have been used to create the file theme/css/b5st.css.

    You can (beautify and) edit b5st.css directly — or you can preprocess the SCSS files using whatever you prefer to use. A simple way is to do the following:

    1. Install b5st (this theme) into your WordPress (local) development environment.

    2. Download and install NodeJS, if you don’t have it already.

    3. In your terminal, cd into the b5st folder. Just do npm install so that node-sass gets installed as a dev dependancy (see the b5st package.json).

    4. You can then run node-sass in the terminal using npm run scss, and stop it using ctrl+C. node-sass will look for changes in SCSS files inside the b5st/theme/scss folder and output the CSS file(s) in the b5st/theme/css folder.

    5. Initially, only b5st/theme/css/b5st.css is enqueued in functions/enqueues.php (after the Bootstrap 5 enqueue). You can add more enqueues the same way.

    6. Your WordPress (local) development server likely has no live-refresh for when CSS files are modified in this way. So, manually do a browser refresh ↻ whenever you want to see your CSS changes.


    See the LOG.md

    Visit original content creator repository
    https://github.com/SimonPadbury/b5st

  • CodexEstigma

    CodexEstigma

    Manual del juego de rol Codex Estigma, por BasilioGarcia.

    El manual puede ser consultado online AQUÍ ⤴.

    Características

    • HTML5, CSS3, JavaScript y JQuery (ver sección: Uso real de JQuery)
    • Sistema de plantillas propio creado en JS (uso de Promesas y caché de archivos).
    • Diseño responsive con cinco breakpoints: <768px, 768px, 992px, 1200px y 1638px.
    • Nesting CSS nativo. (ver sección: Por qué no BEM)
    • Animaciones con CSS.
    • Eliminado el scroll nativo del navegador, custom scroll en bloques de contenido, compatible con dispositivos móviles.
    • Subsecciones del menú visibles con efecto onHover que es compatible con dispositivos móviles.
    • Auto-creación de anchors internos
    • Enlaces referenciales

    Requisitos

    Debido a que este manual ejecuta funciones avanzadas de JavaScript, requiere ser interpretado en un servidor web HTTP, como Apache, IIS o Ngnix.

    Sistema de Plantilla

    Este manual usa un sistema de plantillas propio. En vez de tener que repetir todas las etiquetas HTML en cada página, usa un código HTML mínimo para crear los artículos y el motor en JavaScript de la plantilla se encarga de crear el resto del documento. El menú y el paginado se crean de forma automática configurando un archivo.

    Note

    Creé este sistema, porque a medida que el manual iba teniéndo más páginas se volvía un engorro tanto el modificar código que afectaba a muchas páginas, como el reestructurar el orden de las páginas (cuando tienes que cambiar la URL de un enlace en más de 100 páginas HTML, echas de menos los sistemas de plantillas propios de los backends).

    Estructura de las páginas

    Existen dos tipos de páginas, las individuales y las que tienen sub-páginas. Para crear una nueva página, hay que crear una nueva carpeta en la carpeta “pages”, situada en la raíz del proyecto.

    Crear una página individual

    Si la página nueva, es una página individual, dentro de la carpeta creada deben de añadirse dos documentos:

    • index.html – Contendrá el HTML de la página.
    • page.css – Contendrá el CSS específico de esa página. (en muchas páginas está en blanco)

    El archivo index.html tendrá el siguiente esquema:

    <!DOCTYPE html>
    <meta charset="UTF-8" xmlns="http://www.w3.org/1999/html">
    <script src="../../js/init.js"></script>
    <page data-dir="../.." data-chapter="3">
        HTML propio de ese artículo.
    </page>
        

    El código HTML de la página va dentro de la etiqueta page. Esta etiqueta tiene dos atributos: data-dir y data-chapter.

    • data-dir : Indica la ruta a la raíz del proyecto, se usa para cargar correctamente los archivos. En las páginas individuales su valor es: “../..”
    • data-chapter : Es un ID que indica con que entrada del archivo chapters.json (ver más adelante) se corresponde ésta página.

    A continuación hay que añadir la entrada de la página al archivo de configuración de capítulos: chapters.json en ./js/db/chapters.json:

    "0": {
      "title": "Codex Estigma"
    },
    "1": {
        "title": "Sobre Codex Estigma",
        "url": "/pages/acerca-de"
    },
    "2": {
        "title": "Tiro base",
        "url": "/pages/tiro-base"
    },
    etc...

    El ID de cada entrada es un número “0”, “1”, “2”… que van ordenados de forma auto-incremental y comenzando siempre en cero. El cero es la portada y no será visible en el menú ni en el paginado. El orden del resto de entradas será con el que aparezcan en el menú y en el paginado. Así, en el ejemplo de arriba, la entrada con el ID 2, Tiro Base, sería el segundo enlace en el menú.

    La entrada tiene dos atributos: title y url.

    • title : Es el título de la página, se usa tanto en el menú, como en el encabezado de la página, como en la etiqueta <title>
    • url : Es la URL de donde va a cargar los archivos. Se compone de la concatenación de /pages/ más el nombre de la nueva carpeta que se ha creado.

    Crear una página con sub-páginas

    Si la página nueva, es una página con sub-páginas, dentro de la carpeta creada deben de añadirse, a su vez, una sub-carpeta por cada sub-página. Y dentro de cada sub-carpeta, deben de añadirse dos documentos:

    • index.html – Contendrá el HTML de la página.
    • page.css – Contendrá el CSS específico de esa página. (en muchas páginas está en blanco)

    El archivo index.html tendrá el siguiente esquema:

    <!DOCTYPE html>
    <meta charset="UTF-8" xmlns="http://www.w3.org/1999/html">
    <script src="../../../js/init.js"></script>
    <page data-dir="../../.." data-chapter="7" data-section="1">
        HTML propio de ese artículo.
    </page>

    El código HTML de la página va dentro de la etiqueta page. Esta etiqueta tiene tres atributos: data-dir, data-chapter y data-section.

    • data-dir : Indica la ruta a la raíz del proyecto, se usa para cargar correctamente los archivos. En las páginas con sub-páginas su valor es: “../../..”
    • data-chapter : Es un ID que indica con que entrada del archivo chapters.json (ver más adelante) se corresponde ésta página.
    • data-section : Es un ID que indica con que sección de la entrada se corresponde ésta página (ver más adelante).

    A continuación hay que añadir la entrada de la página al archivo de configuración de capítulos: chapters.json en ./js/db/chapters.json:

    ...
    "6": {
        "title": "Habilidades",
        "url": "/pages/habilidades"
    },
    "7": {
        "title": "Maniobras",
        "sections": {
            "1": {
                "title": "Adquirir maniobras",
                "url": "/pages/maniobras/adquirir-maniobras"
            },
            "2": {
                "title": "Filo largo",
                "url": "/pages/maniobras/filo-largo"
            },
            "3": {
                "title": "Filo corto",
                "url": "/pages/maniobras/filo-corto"
            }
        }
    },
    ...

    En el código de ejemplo anterior, la entrada del archivo con el ID 6 es una página individual, y la entrada con el ID 7 es una página con sub-páginas.

    Las entradas con sub-páginas tiene dos atributos: title y sections.

    • title : Es el título de la página, se usa en el menú.
    • sections : Son las entradas de las sub-páginas. Sus IDs son auto-incrementales y comienzan en 1. A su vez, tienen dos atributos: title y url, funcionan como las páginas individuales.

    Uso real de JQuery

    Note

    Aunque el proyecto usa la biblioteca JQuery, la mayoría del código es JavaScript vanilla, simplemente he usado JQuery por la sintaxis de selectores del DOM abreviada y por el bindeo de eventos con propagación, que funcionan muy bien, me parecen las funcionalidades mejor optimizadas de JQuery. No soy muy fan del resto de funcionalidades de JQuery y creo que las soluciones en vainilla JS no sólo obtienen mejor performance, sino que aportan una metodología más ordenada. Por eso no he creado los componentes usando el sistema de componentes de JQuery, no me aportaban nada.

    Por qué no BEM

    Tip

    BEM sigue siendo un estándar importante para coordinar proyectos grandes donde múltiples personas trabajarán con los archivos CSS. Sin embargo, desde que CSS incorporó el nesting de forma nativa en 2021, se han facilitado métodos alternativos para mantener un código CSS limpio y organizado.

    Además, creo que existe un mito exagerado, mal entendido, con la especificidad de los selectores CSS, y que la propagación de BEM y las enseñanzas de ciertos “gurús” contribuyeron a ello. La especificidad es una característica buscada por el W3C y es MUY UTIL. Una cosa es tener un lío impresionante con la jerarquía de los selectores y otra es que no aproveches una característica perfectamente válida de las hojas de estilos.

    Por todo ello, y porque es un proyecto personal, con el que no voy a entrar en conflicto con otros desarrolladores, he decidido usar, no solo native nesting, sino usar selectores con IDs y etiquetas genéricas como: <aside>, <header>

    Aún así, como se puede ver en la imagen inferior, el nivel de especificidad es bajo, se puede mantener un equilibrio entre utilidad jerárquica y código limpio y ordenado.

    Gráfico de especificidad del archivo CSS

    Componentes

    Auto-creación de anchors internos

    Nombre del componente: internal-anchors

    Si a unas de las etiquetas usadas en los títulos (<h2>, <h3> o <h4>) se le coloca un atributo ID, automáticamente se convierte en un enlace interno a ese título de la página.

    Enlaces referenciales

    Nombre del componente: pages-links

    En el archivo links.json se registran enlaces con un nombre de referencia, a modo de identificador. En las páginas del manual que lo necesiten se agrega el enlace por el nombre de referencia, así, si luego el enlace cambia, no hay que cambiarlo en cada página donde se usó, solo hay que cambiarlo en el archivo links.json.

    Tooltips

    Nombre del componente: tooltips

    Visit original content creator repository https://github.com/BasilioGarcia/CodexEstigma
  • openneuro

    CodeCov Coverage Status styled with prettier

    About

    OpenNeuro is a free and open platform for analyzing and sharing neuroimaging data. It is based around the Brain Imaging Data Structure specification.

    Development setup

    This project is managed with Lerna and Yarn. To get started, install Yarn and bootstrap the repo.

    yarn install

    You can run tests with yarn test at the top level of the project. For each package, yarn test --watch will interactively run the tests for changes since the last commit.

    Before starting up the services, you will need to copy the example .env.example file to .env and config.env.example to config.env. Many of the values are optional, and most that aren’t have default values included in their .example file. Required values below:

    • JWT_SECRET in config.env must be set to a large random string.
    • PERSISTENT_DIR in .env is an absolute path to a directory that will be used to store datasets. This should be a git-annex compatible filesystem and large enough to store some test datasets.

    To setup Google as an authentication provider, register a new client app and set the following variables. For development use, you will create a new Google project with oauth credentials for a JavaScript client side app. “Authorized JavaScript Origins” is set to http://localhost:9876 and “Authorized Redirect URIs” is set to http://localhost:9876/crn/auth/google/callback for a site accessible at http://localhost:9876.

    # Ending in .apps.googleusercontent.com
    GOOGLE_CLIENT_ID=
    # 24 character secret string
    GOOGLE_CLIENT_SECRET=
    

    podman-compose is used to run a local copy of all required services together.

    macOS Development Setup

    If you’re working on macOS and encounter issues with file watching in Vite, use the following environment variables (in config.env):

    CHOKIDAR_USEPOLLING=true
    

    If you’re working on macOS and encounter issues with elastic search, use the following environment variables (in config.env):

    ES_JAVA_OPTS: -XX:UseSVE=0
    CLI_JAVA_OPTS: -XX:UseSVE=0
    
    # This will run podman-compose in the background (-d flag is --detach)
    podman-compose up -d

    For example, you can restart the server container with podman-compose restart server or view logs with podman-compose logs -f --tail=10 server.

    Major Components

    JavaScript packages are published in the @openneuro npm namespace.

    OpenNeuro Command-line utility tool

    OpenNeuro supports a CLI tool based on nodejs for uploading and downloading OpenNeuro datasets.

    Visit original content creator repository https://github.com/OpenNeuroOrg/openneuro
  • Music-ChatBot

    Music-ChatBot (1.0.0 release)

    I have created a Music Chatbot based on AIML (XML Based Markup Language). I created and tested the project using the PandoraBots website.

    ChatBot capabilities:

    • Displays some stories and logos of music bands (Polish and foreign) and music streaming services.
    • Displays the Top 10 Music Bands according to the chatbot.
    • When asked for discographies or genres, ChatBot sends you a link to the appropriate page.
    • Responds to say hello and goodbye in different ways.

    Technologies

    Visual Studio Code

    XML


    Screenshots


    Different start (If you don’t want to talk about music)

    Developing

    If you want to propose any changes and help me to develop my project, please follow the changes below.

    🚀 Quick start

    1. Clone my repository
    git clone  https://github.com/piotrmaliga-git/Music-ChatBot.git
    

    if you use a SSH key

    git clone git@github.com:piotrmaliga-git/Music-ChatBot.git
    
    1. Open your code editor like Visual Studio Code
      If you want to write code and test ChatBot right away like me. I will recommend you to use PandoraBots website.

    2. Start editing! 😊

    3. If you want to send me your changes use Pull requests

    Visit original content creator repository https://github.com/piotrmaliga-git/Music-ChatBot