Blog

  • dtmoney

    Getting Started with Create React App

    This project was bootstrapped with Create React App.

    Available Scripts

    In the project directory, you can run:

    yarn start

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

    Visit original content creator repository
    https://github.com/julio-cesar96/dtmoney

  • AVPI

    GAVPI

    Latest Release – 21.11.01

    Direct Download – GAVPI_21.11.01.zip

    You should run gavpi as administrator for it work properly in most games. (right click run as…)

    About

    GAVPI is an open source voice command software / speech recognition key bind tool. Using gavpi you can execute repetitive or complex tasks using your voice. It can be used with any application, since it’s equivilent to pressing your mouse/keyboard.

    You can:

    • Bind a set of action sequences (mouse/keyboard presses or text-to-speech events) to arbitrary phrases.
    • Create profiles for different games or applications.
    • Enjoy the program for free.

    Installation

    Just extract and run the exe.


    Usage

    main

    Profile

    The profile is broken down into three sections.

    1. Action Sequence

    An action sequence is composed of sequential “actions”, one of keyboard or mouse press/down/up, wait or speak. The key or mouse presses are carried out at direct input level which is equivalent to your physical key presses. Action sequences are carried out very quickly, in some cases near instantly so it is helpful to use the wait (milliseconds) command if an application is failing to registered presses.

    action_sequence

    2. Trigger

    Triggers are composed of three parts type, name and value.

    Currently only one type of trigger is implemented, VI_Phrase. This is the speech recognition trigger type its value being a spoken word or phrase. When the speech value is recognized the trigger will execute all of its corresponding events[3] in order.

    trigger

    3. Trigger Events

    Trigger events are carried out when a trigger executes.

    The events can be multiple Action Sequences or other Triggers, in this way an you can reuse action sequences in multiple triggers or create a template trigger of sorts.

    Saving/Loading

    Profiles are stored in XML format and can be edited by hand in any text editor which supports it. You can also load profiles made by other people. Additionally you can store simple variables usint the database. Today you can use gavpi’s speech to read them out, saving you some time. But in the future you’ll have access to boolean logic and updating at run time, watch out.

    Settings

    The settings allow you to change which voice pack and localization gavpi will use. Microsoft fully supports recognition in several languages, English is tested the most however.

    Additionally you can configure push to talk, useful if you’re dealing with chatter or ambient noise.

    settings

    Thanks and have fun, if it works that is.
    Visit original content creator repository https://github.com/baykovr/AVPI
  • Project-Trybe-Futebol-Clube

    Seja bem vindo ao projeto Trybe Futebol Clube! ⚽️

    Stack utilizada

    Back-end:

    • Typescript com Conceitos POO e SOLID;
    • NodeJs;
    • Express;
    • Sequelize;
    • Mocha, Chai e Sinon para testes de integração e Docker;
    👨‍💻 O que foi desenvolvido

    Layout da página para o usuário

    Exemplo app front

    Layout da página para o ADMIN

    Exemplo app front

    O TFC é um site informativo sobre partidas e classificações de futebol simulando a tabela do Brasileirão 2022! ⚽️

    1. Foi desenvolvo o TFC, onde fiquei responsável por desenvolver uma API (utilizando o método TDD) e também integrar – através do docker-compose – as aplicações para que elas funcionem consumindo um banco de dados.

    Nesse projeto, eu construi um back-end dockerizado utilizando modelagem de dados através do Sequelize.O desenvolvimento deste projeto respeitou regras de negócio e a API é consumida pelo front-end.

    Temos a opção de adicionar uma partida, mas para adicionar é necessário ter um token e a pessoa deverá estar logada para fazer as alterações. Temos um relacionamento entre as tabelas teams e matches para fazer as atualizações das partidas.

    Pude implementar regras de negócio para popular adequadamente a tabela disponível no front-end onde ela é exibida para a pessoa usuária do sistema.

    Estrutura do projeto

    O projeto é composto de 4 entidades importantes na sua estrutura:

    1️⃣ Banco de dados:

    • Container docker MySQL configurado no docker-compose através de um serviço definido como db.
    • Tem o papel de fornecer dados para o serviço de backend.
    • Durante a execução dos testes sempre vai ser acessado pelo sequelize e via porta 3002 do localhost;
    • Você também pode conectar a um Cliente MySQL (Workbench, Beekeeper, DBeaver e etc), colocando as credenciais configuradas no docker-compose no serviço db.
    • Adicionei um arquivo no local /app/backend/.env.example para caso você queira rodar o banco de dados localmente, basta renomea-lo para .env e as váriaveis de ambiente já estão configuradas ao docker.

    2️⃣ Back-end:

    • Ele roda na porta 3001, pois o front-end faz requisições para ele nessa porta por padrão;
    • Sua aplicação é inicializada a partir do arquivo app/backend/src/server.ts;
    • Ela garanta que o express é executado e a aplicação ouve a porta que vem das variáveis de ambiente;

    3️⃣ Front-end:

    • O front se comunica com serviço de back-end pela url http://localhost:3001 através dos endpoints que foi construído.

    4️⃣ Docker:

    • O docker-compose une todos os serviços conteinerizados (backend, frontend e db) e sobe o projeto completo com o comando npm run compose:up;
    🕵️ Linter

    Para garantir a qualidade do código, usei o ESLint para fazer a sua análise estática.

    Este projeto já vem com as dependências relacionadas ao linter configuradas nos arquivos package.json nos seguintes caminhos:

    • app/backend/package.json

    Para rodar o ESLint em um projeto, basta executar o comando npm install dentro do projeto e depois npm run lint. Se a análise do ESLint encontrar problemas no seu código, tais problemas serão mostrados no seu terminal. Se não houver problema no seu código, nada será impresso no seu terminal.

    Você também pode instalar o plugin do ESLint no VSCode: bastar ir em extensions e baixar o plugin ESLint.

    ⚠️ Configurações mínimas para execução do projeto

    Na sua máquina você deve ter:

    • Sistema Operacional Distribuição Unix
    • Node versão 16
    • Docker
    • Docker-compose versão >=1.29.2

    ➡️ O node deve ter versão igual ou superior à 16.15.0 LTS:

    • Para instalar o nvm, acesse esse link;
    • Rode os comandos abaixo para instalar a versão correta de node e usá-la:
      • nvm install 16 --lts
      • nvm use 16
      • nvm alias default 16

    ➡️ Odocker-compose deve ter versão igual ou superior àˆ1.29.2:

    Orientações

    🐋 Rodando no Docker

    👉 Com Docker

    ### Docker e Docker-compose
    

    ⚠ O seu docker-compose precisa estar na versão 1.29 ou superior. ⚠ Veja aqui a documentação para atualizar o docker-compose.

    • Para rodar o projeto por completo, basta digitar o código em seu terminal npm run compose:up;
    ⚠️ Inicialização do compose e verificação dos logs das aplicações
    • Considerando o uso do parâmetro healthcheck em cada container do seu docker-compose.yml, a inicialização dos containers deve aguardar o comando de status de saúde (o que valida se aquele container está operacional ou não):

      • No container db, representado por um comando ping no banco de dados;
      • No back-end, representado por um comando lsof, que vai procurar aplicações ativas na porta definida (por padrão, no caso 3001);
      • No front-end, representado por um comando lsof, que vai procurar aplicações ativas na porta definida (por padrão, no caso 3000).
    • Caso os containers respeitem as premissas anteriores, os mesmos devem ser criados sem maiores problemas:

    Criação dos containers concluída com sucesso!

    • Em caso de algum problema (no back-end, por exemplo), você deve se deparar com alguma mensagem do tipo:

    Erro no status de saúde do container do back-end

    Aqui não houve problema com o tsc, porém a senha para acesso ao banco pelo sequelize estava errada.

    docker-compose logs backend

    🎲 Sequelize

    Para o desenvolvimento, foi baseado no Diagrama de Entidade-Relacionamento (DER) para construir a modelagem do banco de dados. Com essa imagem você já consegue saber:

    • Os nome das tabelas e colunas;

    • Os tipos de suas colunas;

    • Relações entre tabelas.

      Exemplo banco de dados

    Obrigado pela visita ao meu repositório

    🔗 Links

    portfolio linkedin

    Visit original content creator repository https://github.com/vinidipaula92/Project-Trybe-Futebol-Clube
  • lube

    lube

    [ motion amplification for still images ]

    License: Unlicense Made with C

    ✧ features

    • 🎯 interactive region selection
    • 🎨 advanced color quantization
    • 🌊 smooth motion interpolation
    • 🎬 high quality gif output
    • 🎮 customizable motion parameters

    ✧ examples

    type link
    static image view
    motion result view
    usage demo view

    ✧ installation

    git clone https://github.com/getjared/lube.git
    cd lube
    make
    sudo make install

    ✧ dependencies

    • 📝 c compiler (gcc or clang)
    • 🔧 make
    • 📸 libjpeg (jpeg handling)
    • 🎬 giflib (gif creation)
    • 🎮 sdl2 (region selection)

    ✧ quick start guide

    basic usage

    # create animation with defaults
    ./lube input.jpg output.gif
    
    # use 30 frames
    ./lube -f 30 input.jpg output.gif
    
    # slower animation
    ./lube -t 5 input.jpg output.gif
    
    # horizontal only
    ./lube -m 0 input.jpg output.gif

    motion types

    flag effect
    -m 0 horizontal motion only
    -m 1 vertical motion only
    -m 2 both directions (default)

    controls

    flag description range
    -f <frames> frame count 1-30 (default: 24)
    -t <delay> frame delay in 1/100s (default: 3)
    -h show help

    ✧ interactive usage

    1. run with your desired options
    2. in the window:
      • 🖱️ click and drag for motion areas
      • ⭕ bigger circles = more motion area
      • 🔢 up to 10 regions allowed
      • 🚪 close window or press esc when done
    3. ⏳ wait for gif creation

    ✧ example effects

    nature effects

    # gentle wave effect on water
    ./lube -m 0 -f 30 -t 8 lake.jpg wave.gif
    
    # subtle tree movement
    ./lube -m 2 -f 24 -t 5 forest.jpg breeze.gif
    
    # slow flowing clouds
    ./lube -m 0 -f 30 -t 10 sky.jpg clouds.gif
    
    # ripple effect
    ./lube -m 2 -f 20 -t 3 pond.jpg ripple.gif

    object effects

    # flag waving
    ./lube -m 0 -f 24 -t 4 flag.jpg wave.gif
    
    # grass moving in wind
    ./lube -m 2 -f 30 -t 6 field.jpg wind.gif
    
    # make leaves rustle
    ./lube -m 2 -f 24 -t 4 tree.jpg rustle.gif

    artistic effects

    # create a dreamy effect
    ./lube -m 2 -f 30 -t 8 portrait.jpg dream.gif
    
    # create subtle facial animation
    ./lube -m 2 -f 20 -t 6 face.jpg animate.gif
    
    # water reflection movement
    ./lube -m 0 -f 30 -t 5 reflection.jpg shimmer.gif

    ✧ pro tips

    • 🌊 use slower delays (-t 8-10) for subtle effects
    • 🎯 combine multiple regions for complex motion
    • 🎨 smaller regions = more precise control
    • 🔄 try different motion modes for varied effects
    • 🎬 experiment with frame counts for smoothness

    ✧ advanced examples

    # super slow and subtle
    ./lube -m 2 -f 30 -t 15 input.jpg subtle.gif
    
    # quick and bouncy
    ./lube -m 2 -f 15 -t 2 input.jpg quick.gif
    
    # smooth horizontal drift
    ./lube -m 0 -f 30 -t 7 input.jpg drift.gif
    
    # gentle vertical float
    ./lube -m 1 -f 24 -t 6 input.jpg float.gif
    
    # combine both for complex motion
    ./lube -m 2 -f 30 -t 5 input.jpg complex.gif

    ✧ technical details

    • 🎨 uses median cut for colors (up to 256)
    • 🌊 smooth motion interpolation
    • 📊 gaussian motion falloff
    • 🔄 frame-by-frame processing
    • 🎨 automatic palette generation

    ✧ limitations

    • 📸 jpeg input only
    • 🎬 gif output only
    • ⚡ bigger images = slower processing
    • 🎯 max 10 motion regions
    • 🎬 max 30 frames per animation

    ✧ credits

    ╭─────────────────────────╮
    │  made with ♥ by jared   │
    ╰─────────────────────────╯
    
    Visit original content creator repository https://github.com/getjared/lube
  • school21_common_core

    Common Core School 21 (Ecole 42)

    A general course of Ecole 42 covering topics from basic libraries to Containers using languages C and C++. Average duration of completing the common core projects: 14 – 16 months.

    Currently: 15 / 20 complete


    Projects (from latest to oldest):

    • 4 CPP Module (link):

    A nine small projects that introduce us to OOP and C++
    Skills: C++ (basics, OOP)

    Creation a “realistic” 3D graphical representation of the inside of a maze from a first-person perspective.
    Skills: C (MiniLibX, raycasting)

    • 4 NetPractice (link):

    Configuration small-scale networks.
    Skills: TCP/IP addressing.

    • 4 Exam Rank 04 (link):

    Exam: short version of minishell (pipes)

    • 3 minishell (link):

    Creation a simple bash shell.
    Skills: C (processes, file descriptors, signals, redirects, pipes)

    • 3 Philosophers (link):

    Simulation a lifecycle of philosphers, their eating, sleeping and waiting states, using limited resources.
    Skills: C (multithreading, multiprocessing, mutexes).

    • 3 Exam Rank 03 (link):

    Exam: parsing input file and printing the result in the terminal

    • 2 push_swap (link):

    Sorting a list of integers using two stacks.
    Skills: C (structure of stack, sorting algorithms)

    • 2 minitalk (link):

    Creation a communication program between two processes: client and server using signals.
    Skills: C (signals.h)

    Creation a basic 2D game in which a hero escapes the map after collecting all collectibles.
    Skills: C (MiniLibX)

    • 2 Exam Rank 02 (link):

    Exam: short version of get_next_line

    • 1 Born2beroot (link):

    Creation your first machine in VirtualBox under specific instructions.
    Skills: Debian, Unix Shell, Network & system administration (SSH, UFW, password policy)

    • 1 ft_printf (link):

    Recoding a printf() function.
    Skills: C (variadic functions)

    • 1 get_next_line (link):

    Creation function that returns a line read from a file descriptor.
    Skills: C (static variables, file descriptors)

    Coding a C library with highly useful standard functions.
    Skills: C

    Visit original content creator repository
    https://github.com/GuttenberG455/school21_common_core

  • sossoldi

    Sossoldi icon

    Sossoldi

    Wealth management app

    Discord Shield: Contributions Welcome License: MIT

    Sossoldi (Wealth management app)

    Sossoldi is a free and open source wealth management / personal finance / Net Worth tracking app, made with Flutter.

    Sossoldi icon

    ❓ What problem we are solving & why

    Mr. Rip is a blogger that has a spreadsheet in which he tracks his net worth. Sossoldi is a Mobile + Desktop app that aims at replacing that spreadsheet and make it easier for everyone to track their net worth even if they are not as skilled with Google Sheets or Excel.

    The app is being developed using the Flutter framework which makes it possible to have one codebase for different platforms (Android, iOS, Windows, macOS, Linux). We are currently working on a beta which hopefully will be out soon.

    This app is for you if you want to…

    • 📈 track your net worth
    • 💸 track your expenses to better understand where you are spending your money
    • 👀 keep track of your investments
    • 🪦 keep everything in one place like Mr. Rip

    What features do we want to implement?

    • 💸 Track expenses (even recurrent ones)
    • 🏦 Track different bank accounts
    • 📊 Graphs, statistics and reports
    • 💻 All data are stored locally (with the option to share it in different platforms)
    • 👀 Track investments: Stocks, Bonds, Crypto, Private equity
    • 💶 Track taxes
    • 💴 Net worth on different currencies
    • ↔️ Import/export data
    • 🔗 Link bank accounts that support the OpenBanking PSD2 API
    • 🤓 Advanced onboarding
    Sossoldi icon

    Phase 1 (Ongoing)

    We will not build the complete app all at once. We will start from the basic features and then we will move onto the others. Phase 1 will be completed when the following features will be ready:

    • 💸 Expenses (even recurrent ones) tracker
    • 🤑 Income tracker
    • ⚖️ Bank accounts balance (without the use of API)
    • 📊 Basic stats
    • 📱 Data stored only locally

    The pages that will be implemented are:

    • Dashboard
    • Movements page
    • Basic settings
    • Basic onboarding

    Contributing

    If you want to help with this project you are more than welcome! Sossoldi is completely free and open source, the best place to start is from the issue tab and look for something that seems interesting to you. If you are unsure on where to start feel free to reach out to us on Discord, we will be more than happy to help you find what’s best for you!

    Also, you can refer to internal docs:

    Useful links to get started

    New to Flutter? Here are some good (and free!) resources:

    Visit original content creator repository https://github.com/RIP-Comm/sossoldi
  • webmention.io

    Webmention.io

    This project is an implementation of the Webmention protocol. It allows the webmention receiving service to be run separately from the blogging software or website environment, making it easier to manage and integrate with other services.

    Say you have a statically-generated website using Jekyll or something similar, you can add the appropriate <link> tag pointing to this service, and now you have Webmentions enabled on your static site!

    <link rel="webmention" href="https://webmention.io/example.com/webmention" />
    

    The Webmention protocol also supports specifying the endpoint in the headers,

    Link: <https://webmention.io/example.com/webmention>; rel="webmention"
    

    Features

    • Accept Webmentions for any site by adding an html tag: <link rel="webmention" href="https://webmention.io/example.com/webmention" />
    • API to get a list of pages linking to your site or a specific page
    • If you want to receive Pingbacks on your site but don’t want to deal with XMLRPC, then you can use this service to convert Pingbacks to Webmentions

    API

    Find links to a specific page

    This service provides an API for returning a list of pages that have linked to a given page. For example:

    GET https://webmention.io/api/mentions.jf2?target=https://indieweb.org
    
    {
      "type": "feed",
      "name": "Webmentions",
      "children": [
        {
          "type": "entry",
          "author": {
            "type": "card",
            "name": "Tantek Çelik",
            "url": "http://tantek.com/",
            "photo": "http://tantek.com/logo.jpg"
          },
          "url": "http://tantek.com/2013/112/t2/milestone-show-indieweb-comments-h-entry-pingback",
          "published": "2013-04-22T15:03:00-07:00",
          "wm-received": "2013-04-25T17:09:33-07:00",
          "wm-id": 900,
          "content": {
            "text": "Another milestone: @eschnou automatically shows #indieweb comments with h-entry sent via pingback http://eschnou.com/entry/testing-indieweb-federation-with-waterpigscouk-aaronpareckicom-and--62-24908.html",
            "html": "Another milestone: &lt;a href=\"https:\/\/twitter.com\/eschnou\">@eschnou&lt;\/a> automatically shows #indieweb comments with h-entry sent via pingback &lt;a href=\"http:\/\/eschnou.com\/entry\/testing-indieweb-federation-with-waterpigscouk-aaronpareckicom-and--62-24908.html\">http:\/\/eschnou.com\/entry\/testing-indieweb-federation-with-waterpigscouk-aaronpareckicom-and--62-24908.html&lt;\/a>"
          }
        }
      ]
    }
    

    Find links of a specific type to a specific page

    You can include a parameter to limit the returned links to mentions of a specific type:

    GET https://webmention.io/api/mentions.jf2?target=https://indieweb.org&wm-property=in-reply-to
    

    or request multiple types by repeating the query parameter:

    GET https://webmention.io/api/mentions.jf2?target=https://indieweb.org&wm-property[]=in-reply-to&wm-property[]=rsvp
    

    The full list of recognized properties is below:

    • in-reply-to
    • like-of
    • repost-of
    • bookmark-of
    • mention-of
    • rsvp

    Find links to multiple pages

    This is useful for retrieving mentions from a post if you’ve changed the URL.

    GET https://webmention.io/api/mentions.jf2?target[]=https://indieweb.org/a-blog-post&target[]=https://indieweb.org/a-different-post
    

    Find all links to your domain

    You can also find all links to your domain:

    GET https://webmention.io/api/mentions.jf2?domain=indiewebcamp.com&token=xxxxx
    

    (You will see your account’s token when you sign in.)

    You can optionally add a since parameter to return new webmentions as of a certain date. This is useful to poll for new webmentions you haven’t seen yet.

    GET https://webmention.io/api/mentions.jf2?domain=indiewebcamp.com&token=xxxxx&since=2017-06-01T10:00:00-0700
    

    Find all links to all sites in your account

    With no parameters, the API will return all links to any site in your account:

    GET https://webmention.io/api/mentions?token=xxxxxx
    

    Sorting

    You can choose the sorting mechanism to return the list of mentions. The following options are supported:

    • sort-by=created (default) – Sort by the date the mention was created in the webmention.io database.
    • sort-by=updated – Sort by the updated date of the page, as seen by webmention.io (not the date the post reports in its microformats data).
    • sort-by=published – Sort by the published date as reported by the linking page. Some pages don’t include published date so this will fall back to created date if published is not present.
    • sort-by=rsvp – Sort by RSVP value, in the following order: “no”, “interested”, “maybe”, “yes”.

    By default, results are returned in descending order. You can control the ordering with the sort-dir parameter:

    • sort-dir=down (default) – Newest first, RSVP “yes” first
    • sort-dir=up – Oldest first, RSVP “no” first

    Paging

    Basic paging is supported by using the per-page and page parameters. For example,

    • ?per-page=20&page=0 first page of 20 results
    • ?per-page=20&page=1 second page of 20 results

    The default number of results per page is 20. Results are always sorted newest first.

    Finding New Mentions

    You can use the since or since_id parameters to find new mentions retrieved by the service.

    • since=2017-06-01T10:00:00-0700 – pass a full timestamp to the since parameter to return links created after that date. This corresponds to the date the link was created in the webmention.io service, not the published date that the page reports.
    • since_id=1000 – pass an ID to return links with a greater ID

    JSONP

    The API also supports JSONP so you can use it to show pingbacks on your own sites via JavaScript. Simply add a parameter jsonp to the API call, for example, https://webmention.io/api/mentions.jf2?jsonp=f&target=https%3A%2F%2Fwebmention.io

    Atom

    You can change /mentions to /mentions.atom to receive your results in the Atom format:

    GET https://webmention.io/api/mentions.atom?token=xxxxxx
    
    <?xml version="1.0" encoding="UTF-8"?>
    <feed xmlns="http://www.w3.org/2005/Atom">
      <id>https://webmention.io/api/mentions.atom</id>
      <title>Mentions</title>
      <updated>2013-04-25T17:09:33-07:00</updated>
      <link href="https://webmention.io/api/mentions.atom"/>
      <author>
        <name>webmention.io</name>
      </author>
      <entry>
        <title>tantek.com mentioned /webmention</title>
        <id>https://webmention.io/api/mention/8675309</id>
        <summary>http://tantek.com/2013/113/b1/first-federated-indieweb-comment-thread mentioned http://indiewebcamp.com/webmention</summary>
        <updated>2013-04-25T17:09:33-07:00</updated>
        <content type="xhtml" xml:lang="en">
          <div xmlns="http://www.w3.org/1999/xhtml">
            <p><a href="http://tantek.com/2013/113/b1/first-federated-indieweb-comment-thread">http://tantek.com/2013/113/b1/first-federated-indieweb-comment-thread</a> mentioned <a href="http://indiewebcamp.com/webmention">http://indiewebcamp.com/webmention</a></p>
          </div>
        </content>
      </entry>
    </feed>
    

    About the Pingback Protocol

    The pingback system is a way for a blog to be automatically notified when other Web sites link to it. It is entirely transparent to the linking author, requiring no user intervention to work, and operates on principles of automatic discovery of everything that it needs to know.

    A sample blog post involving pingback might go like this:

    • Alice posts to her blog. The post she’s made includes a link to a post on Bob’s blog.
    • Alice’s blogging system contacts Bob’s blogging system and says “look, Alice made a post which linked to one of your posts”.
    • Bob’s blogging system then includes a link back to Alice’s post on his original post.
    • Reader’s of Bob’s article can follow this link to Alice’s post to read her opinion.

    Read the full protocol here: http://www.hixie.ch/specs/pingback/pingback

    Pingback to Webmention Service

    Webmention is a modern alternative to Pingback. It’s analogous to the Pingback protocol except does not use XML-RPC and is much easier to implement. This project also includes a simple API for converting XML-RPC Pingbacks to Webmentions and forwarding the request on to your own site.

    Using Webmention.io in this mode does not require an registration, and this service does not store any of the information. The Pingback request is simply forwarded on to your server as a Webmention.

    To use, add a Pingback header like the following:

    <link rel="pingback" href="https://webmention.io/webmention?forward=https://example.com/webmention" />
    

    Any Pingbacks received will be forwarded on to the specified Webmention endpoint. It is up to you to handle the Webmention and return an expected result. The Webmention result will be converted to a Pingback result and passed back to the sender.

    Full Example

    A blog links to your site, makes a GET request for the page to retrieve the Pingback header

    GET http://example.com/post/1000
    
    <html>
      <head>
        <title>Example Post 1000</title>
        <link rel="pingback" href="https://webmention.io/webmention?forward=http://example.com/webmention" />
        ...
    

    The blog sends a Pingback request to webmention.io

    POST https://webmention.io/webmention?forward=http://example.com/webmention
    Content-Type: application/xml
    
    <?xml version="1.0" ?>
    <methodCall>
      <methodName>pingback.ping</methodName>
      <params>
        <param>
          <value>
            <string>http://aaronparecki.com/notes/2013/02/16/1/little-printer</string>
          </value>
        </param>
        <param>
          <value>
            <string>http://example.com/post/1000</string>
          </value>
        </param>
      </params>
    </methodCall>
    

    The webmention.io server forwards this on to your site as a Webmention

    POST http://example.com/webmention
    Content-Type: application/x-www-url-form-encoded
    
    source=https://aaronparecki.com/2013/02/16/2/little-printer&
    target=http://example.com/post/1000
    

    Your server replies with a Webmention response indicating success

    HTTP/1.1 202 Accepted
    Content-Type: application/json
    
    {
      "result": "Webmention was successful"
    }
    

    Webmention.io converts this to a Pingback success reply and sends it back to the original blog

    HTTP/1.1 200 OK
    Content-Type: application/xml
    
    <?xml version="1.0" ?>
    <methodResponse>
      <params>
        <param>
          <value>
            <string>Pingback from https://aaronparecki.com/2013/02/16/2/little-printer to http://example.com/post/1000 was successful!</string>
          </value>
        </param>
      </params>
    </methodResponse>
    

    Errors

    Webmention errors are converted to Pingback errors as well! For example,

    {
      "error": "no_link_found"
    }
    

    Is converted to:

    <?xml version="1.0" ?>
    <methodResponse>
      <fault>
        <value>
          <struct>
            <member>
              <name>faultCode</name>
              <value><i4>17</i4></value>
            </member>
            <member>
              <name>faultString</name>
              <value>
                <string>no_link_found</string>
              </value>
            </member>
          </struct>
        </value>
      </fault>
    </methodResponse>
    

    You can start using this right now to quickly handle Pingbacks as Webmentions on your own domain. This is a way to bootstrap the Webmention protocol until more services adopt it.

    Development

    First, check your Ruby version. 2.0.0 does not work; details below. Try 1.9.3 or anything >=2.1.3 instead, they should work. Here are minimal instructions for Mac OS X, using Homebrew, ruby-install, and chruby:

    brew install ruby-install chruby libxml2 libxslt
    ruby-install ruby 2.1.6
    source /usr/local/opt/chruby/share/chruby/chruby.sh
    chruby 2.1.6
    gem install bundler

    Now, run these commands to set up your environment and start the server locally:

    bundle install
    cp config.yml.template config.yml
    mysql -u root -e 'CREATE USER webmention@localhost IDENTIFIED BY "webmention"; CREATE DATABASE webmention; GRANT ALL ON webmention.* TO webmention@localhost; FLUSH PRIVILEGES;'
    export RACK_ENV=development
    bundle exec rake db:bootstrap
    ./start.sh

    Now open http://localhost:9019/ and check that you see the front page. You can also run bundle exec rake test:sample1 to send a test pingback.

    Troubleshooting

    If bundle install dies like this while compiling libxml-ruby:

    ...
    ruby_xml_node.c:624:56: error: incomplete definition of type 'struct _xmlBuf'
        result = rxml_new_cstr((const char*) output->buffer->content, xencoding);
                                             ~~~~~~~~~~~~~~^
    ...
    An error occurred while installing libxml-ruby (2.3.3), and Bundler cannot continue.
    Make sure that `gem install libxml-ruby -v '2.3.3'` succeeds before bundling.
    

    You’re in…um…a weird state. You probably have an old version of the repo checked out with a Gemfile.lock that asks for libxml-ruby 2.3.3, which is incompatible with your system’s libxml2 2.9.x. HEAD fixes this by asking for libxml-ruby 2.6.0. git pull and then rerun bundle install.

    If bundle install dies with this message in the middle of its error output:

    /.../lib/ruby/2.0.0/tmpdir.rb:92:in `mktmpdir': parent directory is world writable but not sticky (ArgumentError)
    

    …you can fix this with either chmod +t $TMPDIR or (better) chmod 700 $TMPDIR. Evidently this problem is common on Mac OS X.

    When you open the front page, if you see an error that includes Library not loaded: libmysqlclient.18.dylib, your MySQL shared libraries may not be installed at a standard location, e.g. if you installed MySQL via Homebrew. Try DYLD_LIBRARY_PATH=/usr/local/mysql/lib ./start.sh (or wherever your MySQL libraries are located).

    Ruby 2.0.0 woes

    If rake db:bootstrap raises an TypeError: no implicit conversion from nil to integer exception in quoting.rb, you’ve hit this Ruby 2.0.0 bug/incompatibility. Use a different Ruby version.

    If rake db:bootstrap hangs while attempting to create the links table , Ruby 2.0.0 strikes again! Use a different version. (You won’t see progress details per table by default; it’ll just hang.)

    If bundle exec rake ... complains Could not find rake-10.4.0 in any of the sources, and you run bundle install and bundle check and they’re both happy, and vendor/bundle/ruby/2.0.0/gems/rake-10.4.0/ exists…Ruby 2.0.0 strikes again. (Maybe?) Use a different version.

    Monitoring

    This server collects stats on its own, caches in Redis, and provides a Munin plugin to retrieve the stats.

    Counts that are tracked, one graph for webmention, another for pingback

    • success
    • dns_error
    • connect_error
    • timeout
    • ssl_error
    • ssl_cert_error
    • ssl_unsupported_cipher
    • too_many_redirects
    • no_content
    • invalid_content
    • no_link_found
    • unknown_error

    FAQ

    Is there a way to replay webhooks

    Q: Is there a way to replay webhooks from webmention.io?

    A: In short no, however you should be able to get the same data from the API, and make sure you use the .jf2 URLs instead of .json since that’s the format it uses for the webhook.

    License

    Copyright 2018-2024 by Aaron Parecki.

    Available under the BSD License. See LICENSE.txt

    Visit original content creator repository
    https://github.com/aaronpk/webmention.io

  • arcgis-rest-admin-tool

    ArcGIS REST API Admin Helper v1.2.0

    A browser extension to quickly navigate to ArcGIS REST API administration operations for hosted services.

    Features

    • Navigate to the following ArcGIS REST API operations directly from the extension:
      • Refresh
      • Add To Definition
      • Update Definition
      • Delete From Definition

    Important Notes

    1. This extension has been successfully tested on ArcGIS Online (AGOL) 11.0.0 and ArcGIS Enterprise Portal 10.8.

    2. Newer versions of AGOL and Portal may have a different interface when opening the REST URL. To ensure this extension works, be sure to open the item’s REST URL in a new tab. The URL must look something like this to work: https://services.myserver.com/OrgID/ArcGIS/rest/services/example/FeatureServer/0.

    How to use

    1. Install the extension in your browser.
    2. Navigate to an ArcGIS REST services URL.
    3. Click the extension’s icon in the top bar.
    4. Select the desired operation from the dropdown menu.
    5. Click the “Execute Operation” button.
    6. The operation’s webpage will open in a new tab.

    how_to_use

    Manual Installation

    Chrome

    1. Download the Chrome extension files from the Chrome directory in this repository.
    2. Open the Chrome browser and navigate to chrome://extensions.
    3. Enable “Developer mode” by toggling the switch in the top right corner of the page.
    4. Click “Load unpacked” and select the folder containing the downloaded Chrome extension files.
    5. The extension should now be installed and visible in your Chrome extensions list.

    Firefox

    1. Download the Firefox extension files from the Firefox directory in this repository.
    2. Open the Firefox browser and navigate to about:debugging.
    3. Click “This Firefox” in the left sidebar.
    4. Click “Load Temporary Add-on…” and select the manifest.json file from the downloaded Firefox extension files.
    5. The extension should now be installed and visible in your Firefox extensions list.

    Limitations

    • The extension currently supports ArcGIS Online and Enterprise Portal hosted services.
    • The extension assumes the user has a valid token included in the URL for accessing the REST API operations.

    Attributions

    Contributing

    Please feel free to submit issues or contribute code to improve the extension.

    Contact Information

    If you have any questions, issues, or suggestions, feel free to reach out through the following channels:

    Visit original content creator repository
    https://github.com/JoshALogs/arcgis-rest-admin-tool

  • mailgun-sender

    Mailgun Sender Logo

    Update Jul 14, 2017

    Mailgun Sender is an easy to use Java command line tool that you can use to send messages to mailing lists or email addresses using your Mailgun account.

    No programming skills are required to use this tool.

    Many people don’t have the time or the skills to code against APIs. So, I built Mailgun Sender for you. All you need is your Mailgun account info and your message content in plain-text and html.

    Incidentally, if code is your thing, this tool is built on top of my Mailgun Manager API.

    Requirements

    • A computer running Java 7 or higher.
    • A valid Mailgun account (Note: You’ll need to know your public and private API keys to run the tool)

    Installation and Setup

    1. Download and extract the latest release to an installation directory on your computer, e.g., ~/Applications.
    2. Navigate to the installation directory.
    3. Before running Mailgun Sender for the first time, you’ll need to configure two properties files (mailgun.properties and mailgun-sender.properties) located in the /config directory.
    4. Open a terminal window on your computer, so that you can run Mailgun Sender using command line arguments

    mailgun.properties

    Set the publicApiKey, privateApiKey, and the domain property values. The API keys can be found in your Mailgun’s account settings.

    # Mailgun account properties
    
    baseUri = https://api.mailgun.net/v3
    publicApiKey = pubkey-my-public-uuid
    privateApiKey = key-my-private-uuid
    domain = mg.example.com
    

    mailgun-sender.properties

    Set the mailgun.sender.default.from.email property value.

    # Mailgun Sender properties
    
    mailgun.sender.default.from.email=Support Team <support@example.com>
    

    Usage

    If you haven’t already, open a terminal window on your computer.

    Note: All messages sent via Mailgun Sender require a plain-text and HTML version of the email message content. Hence, the path to the plain-text and HTML files are passed via the command line using the -p and -h options. Additionally, when sending messages there are several optional arguments, which include the following:

    -c,--campaign-id <ID>                 Campaign identifier
    -t,--test-mode-flag <Flag>            Test mode flag [default: false]
    -f,--from-email-address <Email>       From email address [default set in mailgun-sender.properties]
    -r,--reply-to-email-address <Email>   Reply-to email address
    

    Send Message to an Email Address

    $ java -jar mailgun-sender.jar -e johndoe@example.com -s 'Test Message from Mailgun Sender!' -p plain-text.txt -h content.html
    

    Note: In this example, the default from email address (set in the mailgun-sender.properties file) is being used because the -f option was excluded.

    Send Message to a Mailing List

    Send message to a mailing list.

    $ java -jar mailgun-sender.jar -m test@mg.example.com -s "Test Mailing List Message from Mailgun Sender" -p plain-text.txt -h content.html
    

    Send a message to a mailing list and set the from email address option, -f.

    $ java -jar mailgun-sender.jar -m test@mg.example.com -f 'Postmaster <postmaster@mg.example.com>' -s "Test Mailling List Message from Mailgun Sender" -p plain-text.txt -h content.html
    

    Send Message to Recipients from a File

    Send message to a list of recipients in the recipients.txt file using the -R option.

    $ java -jar mailgun-sender.jar -R recipients.txt -s "Test Message to Recipients from a File" -p plain-text.txt -h content.html  -f postmaster@mg.example.com  -r support@skedi.zendesk.com
    

    Note: In this example, the default from email address (set in the mailgun-sender.properties file) is being overridden with -f option and a reply-to email address is set using the -r option.

    Recipients Format

    Text file with a new line for each message recipient.

    bob@gmail.com
    john@mailgun.net
    doe@mailgun.net
    

    Help

    $ java -jar mailgun-sender.jar
    

    Contributors

    Contributions can be made by following these steps:

    1. Fork it!
    2. Create your feature branch: git checkout -b my-new-feature
    3. Commit your changes: git commit -am 'Add some feature'
    4. Push to the branch: git push origin my-new-feature
    5. Submit a pull request 😀

    If you have any questions, please don’t hesitate to contact me at john@rodaxsoft.com.

    License

    This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/.

    Visit original content creator repository
    https://github.com/johnboyer/mailgun-sender