Blog

  • shy-goat

    Creative Commons Legal Code
    
    CC0 1.0 Universal
    
        CREATIVE COMMONS CORPORATION IS NOT A LAW FIRM AND DOES NOT PROVIDE
        LEGAL SERVICES. DISTRIBUTION OF THIS DOCUMENT DOES NOT CREATE AN
        ATTORNEY-CLIENT RELATIONSHIP. CREATIVE COMMONS PROVIDES THIS
        INFORMATION ON AN "AS-IS" BASIS. CREATIVE COMMONS MAKES NO WARRANTIES
        REGARDING THE USE OF THIS DOCUMENT OR THE INFORMATION OR WORKS
        PROVIDED HEREUNDER, AND DISCLAIMS LIABILITY FOR DAMAGES RESULTING FROM
        THE USE OF THIS DOCUMENT OR THE INFORMATION OR WORKS PROVIDED
        HEREUNDER.
    
    Statement of Purpose
    
    The laws of most jurisdictions throughout the world automatically confer
    exclusive Copyright and Related Rights (defined below) upon the creator
    and subsequent owner(s) (each and all, an "owner") of an original work of
    authorship and/or a database (each, a "Work").
    
    Certain owners wish to permanently relinquish those rights to a Work for
    the purpose of contributing to a commons of creative, cultural and
    scientific works ("Commons") that the public can reliably and without fear
    of later claims of infringement build upon, modify, incorporate in other
    works, reuse and redistribute as freely as possible in any form whatsoever
    and for any purposes, including without limitation commercial purposes.
    These owners may contribute to the Commons to promote the ideal of a free
    culture and the further production of creative, cultural and scientific
    works, or to gain reputation or greater distribution for their Work in
    part through the use and efforts of others.
    
    For these and/or other purposes and motivations, and without any
    expectation of additional consideration or compensation, the person
    associating CC0 with a Work (the "Affirmer"), to the extent that he or she
    is an owner of Copyright and Related Rights in the Work, voluntarily
    elects to apply CC0 to the Work and publicly distribute the Work under its
    terms, with knowledge of his or her Copyright and Related Rights in the
    Work and the meaning and intended legal effect of CC0 on those rights.
    
    1. Copyright and Related Rights. A Work made available under CC0 may be
    protected by copyright and related or neighboring rights ("Copyright and
    Related Rights"). Copyright and Related Rights include, but are not
    limited to, the following:
    
      i. the right to reproduce, adapt, distribute, perform, display,
         communicate, and translate a Work;
     ii. moral rights retained by the original author(s) and/or performer(s);
    iii. publicity and privacy rights pertaining to a person's image or
         likeness depicted in a Work;
     iv. rights protecting against unfair competition in regards to a Work,
         subject to the limitations in paragraph 4(a), below;
      v. rights protecting the extraction, dissemination, use and reuse of data
         in a Work;
     vi. database rights (such as those arising under Directive 96/9/EC of the
         European Parliament and of the Council of 11 March 1996 on the legal
         protection of databases, and under any national implementation
         thereof, including any amended or successor version of such
         directive); and
    vii. other similar, equivalent or corresponding rights throughout the
         world based on applicable law or treaty, and any national
         implementations thereof.
    
    2. Waiver. To the greatest extent permitted by, but not in contravention
    of, applicable law, Affirmer hereby overtly, fully, permanently,
    irrevocably and unconditionally waives, abandons, and surrenders all of
    Affirmer's Copyright and Related Rights and associated claims and causes
    of action, whether now known or unknown (including existing as well as
    future claims and causes of action), in the Work (i) in all territories
    worldwide, (ii) for the maximum duration provided by applicable law or
    treaty (including future time extensions), (iii) in any current or future
    medium and for any number of copies, and (iv) for any purpose whatsoever,
    including without limitation commercial, advertising or promotional
    purposes (the "Waiver"). Affirmer makes the Waiver for the benefit of each
    member of the public at large and to the detriment of Affirmer's heirs and
    successors, fully intending that such Waiver shall not be subject to
    revocation, rescission, cancellation, termination, or any other legal or
    equitable action to disrupt the quiet enjoyment of the Work by the public
    as contemplated by Affirmer's express Statement of Purpose.
    
    3. Public License Fallback. Should any part of the Waiver for any reason
    be judged legally invalid or ineffective under applicable law, then the
    Waiver shall be preserved to the maximum extent permitted taking into
    account Affirmer's express Statement of Purpose. In addition, to the
    extent the Waiver is so judged Affirmer hereby grants to each affected
    person a royalty-free, non transferable, non sublicensable, non exclusive,
    irrevocable and unconditional license to exercise Affirmer's Copyright and
    Related Rights in the Work (i) in all territories worldwide, (ii) for the
    maximum duration provided by applicable law or treaty (including future
    time extensions), (iii) in any current or future medium and for any number
    of copies, and (iv) for any purpose whatsoever, including without
    limitation commercial, advertising or promotional purposes (the
    "License"). The License shall be deemed effective as of the date CC0 was
    applied by Affirmer to the Work. Should any part of the License for any
    reason be judged legally invalid or ineffective under applicable law, such
    partial invalidity or ineffectiveness shall not invalidate the remainder
    of the License, and in such case Affirmer hereby affirms that he or she
    will not (i) exercise any of his or her remaining Copyright and Related
    Rights in the Work or (ii) assert any associated claims and causes of
    action with respect to the Work, in either case contrary to Affirmer's
    express Statement of Purpose.
    
    4. Limitations and Disclaimers.
    
     a. No trademark or patent rights held by Affirmer are waived, abandoned,
        surrendered, licensed or otherwise affected by this document.
     b. Affirmer offers the Work as-is and makes no representations or
        warranties of any kind concerning the Work, express, implied,
        statutory or otherwise, including without limitation warranties of
        title, merchantability, fitness for a particular purpose, non
        infringement, or the absence of latent or other defects, accuracy, or
        the present or absence of errors, whether or not discoverable, all to
        the greatest extent permissible under applicable law.
     c. Affirmer disclaims responsibility for clearing rights of other persons
        that may apply to the Work or any use thereof, including without
        limitation any person's Copyright and Related Rights in the Work.
        Further, Affirmer disclaims responsibility for obtaining any necessary
        consents, permissions or other rights required for any use of the
        Work.
     d. Affirmer understands and acknowledges that Creative Commons is not a
        party to this document and has no duty or obligation with respect to
        this CC0 or use of the Work.
    

    Visit original content creator repository

  • paramoid

    Tests Gem Version

    Paramoid

    Getting paranoid about your Rails application params? Try paramoid!

    Paramoid is an extension for Rails Strong Parameters that allows to sanitize complex params structures with a super cool DSL, supporting:

    • Required params and default values
    • A simplified nested structures management
    • Conditional sanitization, based on user auth, role or custom logic
    • Renaming and remapping parameter names

    Installation

    Add the gem to your Gemfile

    gem 'paramoid'

    and run the bundle install command.

    Usage

    Declare a class extending Paramoid::Base.

    class PersonParamsSanitizer < Paramoid::Base
      # @param [User] user
      def initialize(user = nil)
        params! :first_name, :last_name
    
        group! :address_attributes do
          params! :id, :road, :town, :state, :zip_code, :country
        end
      end
    end

    Then use it in your controller:

    class PeopleController < ApplicationController
    
      def create
        @person = Person.create!(person_params)
      end
    
      private
    
      def person_params
        # The name is automatically inferred by the controller name
        sanitize_params!
        # Or you can instantiate a custom one
        # You can pass the current user or nil
        # CustomPersonParamsSanitizer.new(current_user).sanitize(params)
      end
    end

    param! vs params! vs group! vs array!

    Paramoid is based on Rails Strong Parameters and it’s inheriting its behaviour.

    • param! is used to permit a single scalar parameter. param! :name is equivalent of params.permit(:name, ...)
    • params! is just a shortcut to sanitize in mass a list of parameters having the same options
    • group! is used to sanitize objects or arrays, like params.permit(my_key: [:list, :of, :keys])
    • array! is an alias of group! and it’s added for readability: in Strong Parameters, params.permit(name: [:some_key]) accepts both a single object or an array of objects, and this is preserved here.

    So the previous example:

    class PersonParamsSanitizer < Paramoid::Base
      # @param [User] user
      def initialize(user = nil)
        params! :first_name, :last_name
    
        group! :address_attributes do
          params! :id, :road, :town, :state, :zip_code, :country
        end
      end
    end

    Is equivalent to:

    params.permit(:first_name, :last_name, address_attributes: [:id, :road, :town, :state, :zip_code, :country])

    Required values

    Declaring a parameter as required, will raise a ActionController::ParameterMissing error if that parameter is not passed by to the controller. This also works with nested structures.

    class UserParamsSanitizer < Paramoid::Base
      def initialize(user = nil)
        params! :first_name, :last_name, required: true
        group! :contact_attributes do
          param! :phone, required: true
        end
      end
    end

    Default values

    You can declare a default value to a certain parameter. That value is assigned only if that value is not passed in the parameters.

    Example:

    class PostParamsSanitizer < Paramoid::Base
      def initialize(user = nil)
        param! :status, default: 'draft'
        param! :approved, default: false
      end
    end

    Input:

    <ActionController::Parameters {"status"=>"published","another_parameter"=>"this will be filtered out"} permitted: false>

    Output:

    <ActionController::Parameters {"status"=>"published","approved":false} permitted: true>

    Name remapping

    You can also remap the name of a parameter.

    class PostParamsSanitizer < Paramoid::Base
      def initialize(user = nil)
        param! :status, as: :state
      end
    end

    Input:

    <ActionController::Parameters {"status"=>"draft","another_parameter"=>"this will be filtered out"} permitted: false>

    Output:

    <ActionController::Parameters {"state"=>"draft"} permitted: true>

    Conditional parameters

    By using the reference of the current_user in the constructor, you can permit certain parameters based on a specific condition.

    Example:

    class PostParamsSanitizer < Paramoid::Base
      def initialize(user = nil)
        params! :first_name, :last_name
        param! :published if user&.admin?
      end
    end

    Inline sanitization

    You can also use the sanitizer DSL inline directly in your controller:

    class PeopleController < ApplicationController
      def create
        @person = Person.create!(person_params)
      end
    
      private
    
      def person_params
        sanitize_params! do
          params! :first_name, :last_name, required: true
        end
      end
    end

    Full Example

    class PersonParamsSanitizer < Paramoid::Base
      # @param [User] user
      def initialize(user = nil)
        params! :first_name, :last_name, :gender
    
        param! :current_user_id, required: true
    
        param! :an_object_filtered
        param! :an_array_filtered
    
        array! :an_array_unfiltered
    
        param! :role if user&.admin?
    
        default! :some_default, 1
    
        group! :contact, as: :contact_attributes do
          params! :id, :first_name, :last_name, :birth_date, :birth_place, :phone, :role, :fiscal_code
        end
      end
    end

    TODOs

    • Params type checking and regexp-based validations

    About Monade

    monade

    Paramoid is maintained by mònade srl.

    We <3 open source software. Contact us for your next project!

    Visit original content creator repository
  • Vikaru-Bot

    Translate ( Indonesian )

    Jika Anda menggunakan browser Chrome, ketuk titik tiga di sudut kanan atas untuk opsi “Terjemahkan…”


    Vikaru-Md | WhatsApp Bot Multidevice

    # Vikaru-Md | ( Installation )

    Starting from v2.3.0 and above, installation and environment setup are now handled automatically through the ( Vikaru-Installer ) repository.


    # Vikaru-Md | ( Start )

    After installation via the Vikaru-Installer, simply run:

    • [1] Start Bot
    

    Enter your WhatsApp number in international format ( e.g., +62 895-0889-9033 ).
    Then, copy and link the pairing code to your WhatsApp application.

    Once the connection is successful, the bot will be ready for use.
    Try sending a simple command:

    /menu
    

    Menu Preview


    # Vikaru-Md | ( Features )

    CLI Menu

    CLI Menu Preview

    Manage sessions in real time while Node.js is running — just press “Enter” to open.

    • [1] Stop: Stop all running sessions.
    • [2] Add: Add a new WhatsApp session.
    • [3] Run: Start a saved session from the session list.

    Vikaru-Md Bot Core

    Vikaru-Md is a multi-device WhatsApp bot designed for automation, AI integration, group moderation, and business support — with a clean, extensible, and developer-friendly architecture.

    • [ Core Highlights ]

    • Pairing Code & QR Code login
    • Custom Pairing ID
    • CLI Interactive Menu
    • Whitelist system for index.js
    • Clean & readable codebase
    • Multi-prefix support
    • Multi-session (run multiple bots simultaneously)
    • Interactive interface/log viewer
    • Anti Call / Anti Spam / Anti Link / Anti Virtex
    • Group event responses (welcome, leave, promote, demote)
    • Broadcast / Push Contact / Auto AI / Auto VN

    • [ Command Categories ]

    • Other Menu
    • AI Menu
    • Convert Menu
    • Search Menu
    • Anime Menu
    • Bug Menu
    • Tools Menu
    • Group Menu
    • System Menu

    # Vikaru-Md | ( Purchase Info )

    You can purchase the script through Telegram or WhatsApp

    Buyer Benefits:

    • Lifetime updates (no expiration)
    • Weekly feature updates
    • Developer modification guidance
    • Personal mentoring to build your own bot

    # Contributing

    We welcome contributions!
    Open an issue or pull request — feedback and improvements are highly appreciated.


    # License

    This project is licensed under the MIT License.

    Visit original content creator repository
  • asciidoctor-fb2

    Asciidoctor FB2

    project chat Latest Release Build Status

    Asciidoctor FB2 is an Asciidoctor extension for converting AsciiDoc documents directly to the FB2 e-book format.

    Installation

    Asciidoctor FB2 is published on RubyGems.org. You can install the published gem using the following command:

    $ gem install asciidoctor-fb2

    Assuming all the required gems install properly, verify you can run the asciidoctor-fb2 script:

    $ asciidoctor-fb2 -v

    If you see the version of Asciidoctor FB2 printed, you’re ready to use Asciidoctor FB2.

    Usage

    Converting an AsciiDoc document to FB2 is as simple as passing your document to the asciidoctor-fb2 command. This command should be available on your PATH if you installed the asciidoctor-fb2 gem. Otherwise, you can find the command in the bin folder of the project. We also recommend specifying an output directory using the -D option flag.

    $ asciidoctor-fb2 -D output path/to/book.adoc

    When the script completes, you’ll see the file book.fb2.zip appear in the output directory. Open that file with an FB2 reader to view the result.

    The metadata in the generated FB2 file is populated from attributes in the AsciiDoc document. The names of the attributes and the metadata elements to which they map are documented in this section.

    Table 1. AsciiDoc attributes that control the FB2 metadata
    Name Description

    uuid

    Populates unique book identifier in FB2 metadata.

    lang

    Populates the content language in FB2 metadata.

    keywords

    Populates keywords list in FB2 metadata. The keywords should be represented as comma-separated values (CSV).

    genres

    Populates genres list in FB2 metadata. The genres should be represented as comma-separated values (CSV).

    front-cover-image

    Specifies path to front cover image.

    Development

    After checking out the repo, run bundle install to install dependencies. Then, run bundle exec rake spec to run the tests.

    Visit original content creator repository
  • vscode-mdx-preview

    Please consider supporting the development of this project by ♡ GitHub Sponsorship. You’ll have profile badge displayed on the sponsors page!

    New in v0.2: Type Script Preview and Hot Update https://vimeo.com/334605913

    MDX Preview lets you preview MDX seamlessly. Write markdown / JSX, see it live refresh and get instant visual feedback.

    Features

    Instant preview as you type without starting a dev server or building

    To get started:

    1. Run yarn install or npm install if necessary so that you have the npm dependencies in your workspace, and navigate to your md or mdx file; or just create an untitled file, change language mode (from command palette) to mdx and type some mdx code.
    2. Open command palette, and type “MDX: Open Preview”; or click the magnifying glass.

    Preview will automatically update when you change the file you are previewing or the files that currently previewed file depends on.

    MDX Extension is recommended for syntax highlighting of MDX files.

    Custom Layout

    You can apply custom layout to the MDX file by

    1. Exporting a default layout value using export default

    import Layout from '../components/Layout';
    
    export default Layout
    
    ## Hello
    1. Specifying a path to a custom layout config file in mdx-preview.preview.mdx.customLayoutFilePath extension setting. For example, the absolute path to the ../components/Layout file above.

    2. When nothing is specified, by default it will apply VS Code Markdown styles. You can turn that off by mdx-preview.preview.useVscodeMarkdownStyles extension settings or “MDX: Toggle VSCode Markdown Styles” command.

    MDX transclusion

    You can import other files with .md or .mdx extension.

    import AnotherMDX from './AnotherMDX.mdx'
    
    <AnotherMDX></AnotherMDX>

    JavaScript/TypeScript Preview

    If you have a JavaScript or TypeScript file that renders to the #root element, you can also preview that using MDX Preview. For example, you can preview the index.js file from your react app:

    // index.js
    import ReactDOM from 'react';
    import App from './App';
    ReactDOM.render(
      <App />,
      document.getElementById('root')
    );

    Note that VS Code webview has some limitations:

    • Service worker / Local storage are not available.
    • Use MemoryRouter if you are using React Router.

    Security

    Code will only be evaluated inside VS Code extension webview’s isolated iframe. The MDX files can only require dependencies within your active workspace folders. By default, only HTTPS content is allowed within the webview. Of course, you still need to make sure you trust the MDX file you preview, AND trust the files inside your workspace. Note that with the default Content Security Policy, you would not be able to preview a LiveEditor.
    You can change your security settings through mdx-preview.preview.security extension setting or “MDX: Change Security Settings” command.

    Extension Settings

    This extension contributes the following settings:

    • mdx-preview.preview.previewOnChange: If set to true, previews on file change; If set to false, previews on file save
    • mdx-preview.preview.security: Security policy settings
    • mdx-preview.preview.useVscodeMarkdownStyles: Use VS Code Markdown Styles for layout.
    • mdx-preview.preview.useWhiteBackground: Use white background regardless of current theme settings.
    • mdx-preview.preview.mdx.customLayoutFilePath: Path of custom layout file to use
    • mdx-preview.build.useSucraseTranspiler: Use sucrase as transpiler (A faster alternative to babel) instead of Babel/TypeScript transpiler

    FAQ

    How it works

    MDX Preview transpiles your .mdx file using @mdx-js/mdx, sends the initial file to the webview, and recursively fetches local dependencies (from your workspace) and npm dependencies (from node_modules directory) from your workspace using polestar, a commonjs-ish module loader for browsers. MDX Preview has provided built-in dependencies for MDX rendering like react, react-dom and @mdx-js/tag.

    Some components doesn’t work?

    In most cases runtime errors will surface in react-error-overlay. If it doesn’t, you can open “Developer: Open Webview Developer Tools” (from command palette) to inspect the error. Note that VS Code webview has some inherent limitations that might cause errors. For example, components that use local storage but without a try/catch block.

    Build issues? Try checking mdx-preview.build.useSucraseTranspiler extension setting. It might solve it.

    Road map

    • TypeScript support
    • Scroll Sync
    • remark/rehype plugins
    • Integrations with gatsby / x0 /…

    Acknowledgements

    This extension is not possible without the help from James and the open source polestar library.

    Saying thanks to these awesome open source projects as well:

    Visit original content creator repository

  • tcc

    English

    Welcome

    My name is Felipe Fernandes Secato and I am a Bachaelor of Information Systems at UFES (Federal University of Espírito Santo).
    This repository has all the files and results of my bachelor dissertation.

    Title

    Application of Augmented Reality without markers for visualization of online products through a mobile application.

    Abstract

    Augmented reality is a technology that has gained a lot of space in recent years primarily because of the popularity and ease of access of mobile devices, but the most common use of augmented reality is still very restricted to marketing and games. This work aimed to evaluate the use of augmented reality without markers as an alternative in the visualization of products of a virtual store, a mobile application capable of obtaining a 3D model of the Internet and making use of augmented reality without markers with the SLAM tracking technique, allowing the application to work in any environment without the need for prior knowledge of the site. The validation of the application was made through a qualitative questionnaire, where it was analyzed questions such as ease of use, main problems found and usefulness of the application. Augmented reality without the use of markers has proven to be a viable alternative for viewing online products, enabling the user to preview the product in their own environment before purchasing it.

    Main Technologies

    • Unity 3D
    • Kudan AR SDK (SLAM tracking technique)

    Repository

    - app                  -> unity project
    - loja                 -> support site
    - felipesecato_tcc.pdf -> full work (only portuguese)
    

    Steps to test the application

    Requirements:
    – Android 4.4.2 or above
    – Internet access

    1 – Download the app from play store.

    Disponível no Google Play

    2 – Access the virtual store created for this work, this store offers the 3D models of the products.

    https://secato.github.io/tcc/loja/index.html

    3 – With the application open, click the scan button and scan the barcode of the product you want to see in your environment.

    4 – Click the RA button, choose the height between your mobile device and the floor and click the middle button (eye icon), the 3D object will be positioned in place of the red marker.

    Questions

    For questions and information regarding the work contact me at the email contact@felipesecato.com


    Português

    Bem-vindo

    Meu nome é Felipe Fernandes Secato e sou Bacharel de Sistemas de Informação pela UFES (Universidade Federal do Espírito Santo).
    Este repositório conta com todos os arquivos e resultados do meu Trabalho de Conclusão de Curso, a seguir mais informações do mesmo:

    Título

    Aplicação de realidade aumentada sem marcadores para a visualização de produtos online através de uma aplicação móvel.

    Resumo

    A realidade aumentada é uma tecnologia que tem ganhado muito espaço nos últimos anos principalmente por conta da popularidade e facilidade de acesso dos dispositivos móveis, mas o uso mais comum da realidade aumentada ainda é muito restrito a ações de marketing e jogos. Este trabalho teve como objetivo avaliar o uso da realidade aumentada sem marcadores como alternativa na visualização de produtos de uma loja virtual, sendo desenvolvido uma aplicação móvel capaz de obter um modelo 3D da Internet e que faz uso da realidade aumentada sem marcadores com a técnica de rastreio SLAM, permitindo assim que o aplicativo funcionasse em qualquer ambiente sem a necessidade de um conhecimento prévio do local. A validação da aplicação foi feita por meio de questionário qualitativo, onde foi analisado questões como facilidade de uso, principais problemas encontrados e utilidade da aplicação. A realidade aumentada sem uso de marcadores se mostrou uma alternativa viável para visualização de produtos online, possibilitando que o usuário visualize o produto préviamente em seus próprio ambiente, antes mesmo de realizar a compra.

    Principais Tecnologias utilizadas

    • Unity 3D
    • Kudan AR SDK (rastreio com a técnica SLAM)

    Organização do repositório

    - app                   -> projeto da aplicação móvel
    - loja                  -> loja virtual de apoio
    - felipesecato_tcc.pdf  -> trabalho completo
    

    Passos para testar a aplicação

    Requisitos:
    – Android 4.4.2 ou acima
    – Internet

    1 – Baixe a aplicação disponível na google play no link a seguir.

    Disponível no Google Play

    2 – Acesse a loja virtual criada para este trabalho, essa loja disponibiliza os modelos 3D dos produtos.

    https://secato.github.io/tcc/loja/index.html

    3 – Com a aplicação aberta, clique no botão scan e escanei o código de barras do produto que deseja visualizar no seu ambiente.

    4 – Clique no botão RA, escolha a altura entre o seu dispositivo móvel e o chão e clique no botão do meio (ícone de olho), o objeto 3D será posicionado no lugar do marcador vermelho.

    Dúvidas

    Para dúvidas e informações a respeito do trabalho entre em contato através do e-mail contact@felipesecato.com

    Visit original content creator repository

  • pocket-tactics-rule-card-generator

    (React) Rule Card Generator for the 3d printed tabletop game pocket-tactics from thingiverse.

    https://www.thingiverse.com/dutchmogul/collections/4th-edition-pocket-tactics

    Screenshot:

    alt text

    Feature Set

    The data in the json and template Wordings are in German.
    It currently covers the Core Set 1 and 2 from the 4th Edition of Pocket Tactics.
    The CSS is optimized for printing 9 Cards on 1 DIN A4 page.
    The Game Rules are also available in german in the file Pocket Tactics Regeln deutsch.pdf

    How to extend?

    Just add new units or terrain to the db.json and they will be rendered automatically

    This is a React Application

    This project was bootstrapped with Create React App.

    Available Scripts

    In the project directory, you can run:

    yarn run run

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

    The page will reload if you make edits.
    You will also see any lint errors in the console.

    yarn test

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

    yarn 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.

    yarn 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

    yarn 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

    Visit original content creator repository

  • invoiceninja-5-docker-compose

    invoiceninja-5-docker-compose – Sample docker-compose Config for Invoice Ninja

    This is an example setup to run a self-hosted Invoice Ninja instance via Docker
    container. The idea is to run everything inside a container and to not expose
    any involved services to the public, except for the web interface via a reverse
    proxy supporting HTTPS.

    As a bonus, the SQL database can be accessed directly via phpmyadmin. This
    shouldn’t be necessary, but I have experienced situations where this became
    necessary. This interface is also not for public use.

    ** Caution: Services not intended for public use should NEVER be made available
    publicly. **

    Design

    This multi-container setup requires a running server with
    a recent operating system supporting Docker. The containers involved are:

    • invoiceninja_web: web-server to provide HTTP
      access to the Invoice Ninja application; it’s interface will be made
      available on localhost only and can be accessed through a reverse proxy
      providing HTTPS. It can be tweaked via its own config file.

    • invoiceninja_app: The application’s backend
      container, provided by the Invoice Ninja application. It will store its
      files in a persistent storage and share the public files with the
      web-server container. No ports will be published.

    • invoiceninja_db: The official MySQL 8
      Docker container running the database for the instance. It contains the
      data entered through the app’s web interface. The data is stored in a
      persistent mount point.

    • invoiceninja_dbadmin: The official
      phpMyAdmin container running a web interface to the database. This
      container is completely optional. Its interface is not made public, but
      available via localhost. We can access it through a temporary forward SSH
      tunnel.

    The containers share the same network to be able
    to communicate with each other.

    The full setup further requires a reverse-proxy configuration for
    Apache2 or Nginx, and a systemd system
    service
    to automatically start and restart the
    container union.

    Required Software

    This software is required:

    • docker.io | docker-ce | docker
    • optional: docker-compose (one can use docker compose command as well)
    • apache2 | nginx-light | nginx

    The docker version shipped in most distributions might already be fine. It
    definitely is for Debian Bullseye, for example. There is not really a reason to
    get the docker CE packages.

    If SysVinit is used instead of systemd, then the service file contains every
    necessary to write an init script based on it.

    Configuration

    Although one can change the docker-compose.yml file,
    most configuration takes place in the .env file. There is an example
    configuration in the .env.example file.

    Let’s go though each item:

    • INVOICE_NINJA_HOME: This is used in the docker-compose.yml file to define the local path where the database and the application files should be stored outside the container in a persistent location. The variable in the systemd service file overwrites the variable defined here.

    Accessing phpMyAdmin

    It is intended to not expose the port to access the phpMyAdmin service to the
    public. To use it, we can create an SSH forward tunnel from our host to the
    server running the container. A forward tunnel is basically a tunnel, that
    starts on a local IP and port and forwards all packetsi from there to a remote
    IP and port. So, if phpMyAdmin is available on the remote server on localhost
    port 8000, we can do:

    ssh -N -L localhost:8000:localhost:8000 <remote server>
    

    then we can access phpMyAdmin locally via http://localhost:8000/ as long as
    the tunnel exists, and we can view, change, and backup the remote database.

    Issues and FAQS

    I: The interface shows only a few languages and currencies and misses most
    after the first login

    Open http://your.domain.tld/update?secret=secret in the browser. Of course
    replace the placeholder here by the real domain.

    Thanks to
    https://forum.invoiceninja.com/t/missing-languages-currencies/12026/3.

    I: There is an update available

    If we run the systemd service, we just restart the server:

    sudo systemctl restart invoiceninja.service
    

    If we run the containers manually, then we basically have to shut the
    containers down, pull the updates, and start them again:

    docker-compose down
    docker-compose pull --include-deps
    docker-compose up (-d)
    

    Visit original content creator repository

  • scala-bcrypt

    Scala Bcrypt Build Status Coverage Status Codacy Badge Version

    Scala Bcrypt is a scala friendly wrapper of jBCRYPT

    Examples

    Safe APIs

    The safe APIs will result in scala.util.Failures and scala.util.Successs when executing operations to explicitly indicate the possibility that certain bcrypt operations can fail due to providing incorrect salt versions or number of rounds (eg. > 30 rounds).

    Encrypt password

        scala>  import com.github.t3hnar.bcrypt._
        import com.github.t3hnar.bcrypt._
    
        scala>  "password".bcryptSafeBounded
        res1: Try[String] = Success($2a$10$iXIfki6AefgcUsPqR.niQ.FvIK8vdcfup09YmUxmzS/sQeuI3QOFG)

    Validate password

        scala>  "password".isBcryptedSafeBounded("$2a$10$iXIfki6AefgcUsPqR.niQ.FvIK8vdcfup09YmUxmzS/sQeuI3QOFG")
        res2: Try[Boolean] = Success(true)

    Composition

    Since Try is monadic, you can use a for-comprehension to compose operations that return Success or Failure with fail-fast semantics. You can also use the desugared notation (flatMaps and maps) if you prefer.

        scala>  val bcryptAndVerify = for {
          bcrypted <- "hello".bcryptBounded(12)
          result <- "hello".isBcryptedSafeBounded(bcrypted)
        } yield result
        res: Try[Boolean] = Success(true)

    Advanced usage

    By default, the salt generated internally, and developer does not need to generate and store salt. But if you decide that you need to manage salt, you can use bcrypt in the following way:

        scala>  val salt = generateSalt
        salt: String = $2a$10$8K1p/a0dL1LXMIgoEDFrwO
    
        scala>  "password".bcryptBounded(salt)
        res3: Try[String] = Success($2a$10$8K1p/a0dL1LXMIgoEDFrwOfMQbLgtnOoKsWc.6U6H0llP3puzeeEu)

    Unsafe APIs

    The Unsafe APIs will result in Exceptions being thrown when executing operations as certain bcrypt operations can fail due to providing incorrect salt versions or number of rounds (eg. > 30 rounds or password longer than 71 bytes). These Unsafe APIs are present for backwards compatibility reasons and should be avoided if possible.

    Encrypt password

        scala>  import com.github.t3hnar.bcrypt._
        import com.github.t3hnar.bcrypt._
    
        scala>  "password".bcryptBounded
        res1: String = $2a$10$iXIfki6AefgcUsPqR.niQ.FvIK8vdcfup09YmUxmzS/sQeuI3QOFG

    Validate password

        scala>  "password".isBcryptedBounded("$2a$10$iXIfki6AefgcUsPqR.niQ.FvIK8vdcfup09YmUxmzS/sQeuI3QOFG")
        res2: Boolean = true

    Advanced usage

        scala>  val salt = generateSalt
        salt: String = $2a$10$8K1p/a0dL1LXMIgoEDFrwO
    
        scala>  "password".bcryptBounded(salt)
        res3: String = $2a$10$8K1p/a0dL1LXMIgoEDFrwOfMQbLgtnOoKsWc.6U6H0llP3puzeeEu

    Setup

    SBT

    libraryDependencies += "com.github.t3hnar" %% "scala-bcrypt" % "4.3.1"

    Maven

    <dependency>
        <groupId>com.github.t3hnar</groupId>
        <artifactId>scala-bcrypt_2.13</artifactId>
        <version>4.3.1</version>
    </dependency>
    Visit original content creator repository