528 Matching Annotations
  1. Last 7 days
  2. Jan 2023
    1. ```console $ curl -LH "Accept: text/x-bibliography; style=apa" https://doi.org/10.1126/science.169.3946.635

      Frank, H. S. (1970). The Structure of Ordinary Water: New data and interpretations are yielding new insights into this fascinating substance. Science, 169(3946), 635-641. American Association for the Advancement of Science AAAS (Science). doi:10.1126/science.169.3946.635 console $ curl -LH "Accept: text/x-bibliography; style=harvard3; locale=fr-FR" https://doi.org/10.1126/science.169.3946.635

      Frank, HS 1970, « The Structure of Ordinary Water: New data and interpretations are yielding new insights into this fascinating substance ». Science, vol. 169, no. 3946, p. 635-641. Consulté de https://doi.org/10.1126/science.169.3946.635 ```

    2. ```console $ curl -LH "Accept: application/rdf+xml;q=0.5, application/vnd.citationstyles.csl+json;q=1.0" https://doi.org/10.1126/science.169.3946.635

      { "volume" : "169", "issue" : "3946", "DOI" : "10.1126/science.169.3946.635", "URL" : "https://doi.org/10.1126/science.169.3946.635", "title" : "The Structure of Ordinary Water: New data and interpretations are yielding new insights into this fascinating substance", "container-title" : "Science", "publisher" : "American Association for the Advancement of Science AAAS (Science)", "issued" : { "date-parts" : [ [ 1970,8,14 ] ] }, "author" : [ { "family" : "Frank", "given" : "H. S."} ], "editor" : [], "page" : "635-641", "type" : "article-journal" } ```

    1. console $ curl -LH "Accept: application/vnd.schemaorg.ld+json" https://doi.org/10.5438/4K3M-NYVG { "@context": "http://schema.org", "@type": "ScholarlyArticle", "@id": "https://doi.org/10.5438/4k3m-nyvg", "url": "https://blog.datacite.org/eating-your-own-dog-food/", "additionalType": "BlogPosting", "name": "Eating your own Dog Food", "author": { "name": "Martin Fenner", "givenName": "Martin", "familyName": "Fenner", "@id": "https://orcid.org/0000-0003-1419-2405" }, "description": "Eating your own dog food is a slang term to describe that an organization should itself use the products and services it provides. For DataCite this means that we should use DOIs with appropriate metadata and strategies for long-term preservation for...", "license": "https://creativecommons.org/licenses/by/4.0/legalcode", "version": "1.0", "keywords": "datacite, doi, metadata, FOS: Computer and information sciences", "inLanguage": "en", "dateCreated": "2016-12-20", "datePublished": "2016-12-20", "dateModified": "2016-12-20", "isPartOf": { "@id": "https://doi.org/10.5438/0000-00ss", "@type": "CreativeWork" }, "citation": [ { "@id": "https://doi.org/10.5438/0012", "@type": "CreativeWork" }, { "@id": "https://doi.org/10.5438/55e5-t5c0", "@type": "CreativeWork" } ], "schemaVersion": "http://datacite.org/schema/kernel-4", "periodical": { "@type": "Series", "identifier": "10.5438/0000-00SS", "identifierType": "DOI" }, "publisher": { "@type": "Organization", "name": "DataCite" }, "provider": { "@type": "Organization", "name": "datacite" } }

    1. HTTP frames

      I'm guessing each frame has an identifier for the previous and next one. The server/user agent then parses all these frames for all the previous/next frames and gives the okay if they're all there or rerequests if not available. Something with TCP likely goes here.

  3. Dec 2022
    1. GET if to obtain information. There should not be any "body" data sent with that request. This will not trigger error, but we just simply don't look there in GET request. Only query string parameters ale allowed. This request will never change anything, you can call it as many times as you want. It is called that GET is IDEMPOTENT request. POST is to add new or modify existing information. If request url doesn't contain resource ID then we will treat that as new data that must be inserted. If you want to modify existing data you need to specify an ID in the Rrequest URL (like POST /contacts/hg5fF). POST is NOT IDEMPOTENT, you need to be carefull to not send the same request twice... DELETE is only to remove infomration. As a general rule we do not allow to add any "body" data to that type of request nor we allow any query string. This should be just simply DELETE /contacts/hg5fF.
    1. But anti- spam software often fetches all resources in mail header fields automatically, without any action by the user, and there is no mechanical way for a sender to tell whether a request was made automatically by anti-spam software or manually requested by a user. To prevent accidental unsubscriptions, senders return landing pages with a confirmation step to finish the unsubscribe request. A live user would recognize and act on this confirmation step, but an automated system would not. That makes the unsubscription process more complex than a single click.

      HTTP: method: safe methods: GETs have to be safe, just in case a machine crawls it.

    2. The mail sender MUST NOT return an HTTPS redirect, since redirected POST actions have historically not worked reliably, and many browsers have turned redirected HTTP POSTs into GETs.
    3. This document describes a method for signaling a one-click function for the List-Unsubscribe email header field. The need for this arises out of the actuality that mail software sometimes fetches URLs in mail header fields, and thereby accidentally triggers unsubscriptions in the case of the List-Unsubscribe header field.
  4. Nov 2022
  5. Oct 2022
    1. How do REST APIs work? REST, or “representational state transfer,” is a type of software design that gives access to data (aka “web resources”) by using a uniform and predefined set of operations. The payload - the data to be delivered - defined in the request itself, will be formatted in a language such as HTML, JSON, or XML. The set of operations are the methods available to HTTP, which is the underlying protocol for how browsers retrieve websites from servers. These methods include GET, POST, PUT, DELETE, and others.

      O que é payload

    2. REST APIs If you’ve heard people talk about JSON (javascript object notation), chances are they’re talking about REST APIs. Over 70% of all public APIs use REST, because of its fast performance, reliability, and ability to scale by reusing modular components without affecting the system as a whole.

      O que é REST API

    1. Communication with this endpoint consists of JSON-encoded messages sent from client to server and vice versa.

      Este é o EndPoint da API do Hypothesis.

    1. Para solicitar a primeira API, crie um URL que aponte para o “endpoint” da API com a qual deseja se comunicar e passe o URL à ação “Obter Conteúdo do URL”. Quando o atalho é executado, essa ação faz a solicitação de API.

      Parece que um EndPoint é a porta de comunicação entre um HTTP API server e seu cliente.

  6. Sep 2022
    1. 400 Bad Request is the status code to return when the form of the client request is not as the API expects.401 Unauthorized is the status code to return when the client provides no credentials or invalid credentials.403 Forbidden is the status code to return when a client has valid credentials but not enough privileges to perform an action on a resource.
    1. The server possibly can send back a 406 (Not Acceptable) error code when unable to serve content in a matching language. However, such a behavior is rarely implemented for a better user experience, and servers often ignore the Accept-Language header in such cases.
  7. Aug 2022
    1. ```js // Fetch and return the promise with the abort controller as controller property function fetchWithController(input, init) { // create the controller let controller = new AbortController() // use the signal to hookup the controller to the fetch request let signal = controller.signal // extend arguments init = Object.assign({signal}, init) // call the fetch request let promise = fetch(input, init) // attach the controller promise.controller = controller return promise }

      // and then replace a normal fetch with

      let promise = fetchWithController('/') promise.controller.abort() ```

    1. The “work around” was to detect users in an IAB and display a message on first navigation attempt to prompt them to click the “open in browser” button early.

      That's a pretty deficient workaround, given the obvious downsides. A more robust workaround would be to make the cart stateless, as far as the server is concerned, for non-logged-in users; don't depend on cookies. A page request instead amounts to a request for the form that has this and this and this pre-selected ("in the cart"). Like with paper.

  8. Jul 2022
    1. To synchronize BMC Helix common services container images

      I've tried to run this section while harbor runs on http. This fails as docker login command is issued and thinks harbor is on SSL.

      The workaround is to do the following

      1. Create 4 replication rules.

      Name ade_part_01 Source resource registry https://containers.bmc.com Source resource filter Name bmc/lp0lz Source resource filter Tag {4.2.2-debian-10-r50,ade-authz-service-149,ade-file-service-e2830be-7,ade-identity-management-portal-12,ade-identity-management-service-15,ade-notification-service-9,adeops-util-v012,adeops-util-v013,adeops-util-v016,adeops-util-v019,adeops-util-v024,adereporting-21.3.02.02,adereporting-content-e0ab22f-251,adereporting-initdb-v001,adereporting-kafkacli-v002,adereporting-puller-7e41b3d-274,adereporting-renderer-dd91f81-216,adereporting-runner-7e41b3d-274,ade-tenant-management-automation-273,ade-tenant-management-portal-14,ade-tenant-management-service-7,ade-ui-content-service-18,aif-api-service-8150462-9,aif-clustering-ingestion-service-3a4ce1d-12,aif-clustering-query-service-3dfbda3-9,aif-clustering-service-08fa171-9,aif-core-service-fdfb78d-6,aif-incident-ingestion-service-3a0f0e2-8,aif-job-manager-service-ab85bfb-8,aif-machine-learning-utilities-8a08716-57,aif-ticket-service-d71f457-11,anomaly-detection-service-58e6996-5}

      Name ade_part_02 Source resource registry https://containers.bmc.com Source resource filter Name bmc/lp0lz Source resource filter Tag {authproxy-RSSO_Auth_Proxy_101,authproxy-RSSO_Auth_Proxy_110,authproxy-RSSO_Auth_Proxy_112,authproxy-RSSO_Auth_Proxy_80,bitnami-kafka-2.7.0-debian-10-r124,bitnami-minio-2021.4.18-debian-10-r0,bitnami-zookeeper-3.7.0-debian-10-r25,custom-elasticsearch-1.13.3,custom-postgresql-repmgr-12.9.0,custom-sec-ade-infra-clients-1,custom-sec-redis-5.0.12-alpine,custom-sec-victoriametrics-vminsert-v1.63.0-cluster,custom-sec-victoriametrics-vmselect-v1.63.0-cluster,custom-sec-victoriametrics-vmstorage-v1.63.0-cluster,es-proxy-nginx-service-6d2eb81-6,es-proxy-service-6d2eb81-6,event-ingestion-service-4c0353c-4,event-mgmt-service-fc008be-6,event-processor-service-199851c-10,event-service-a21ce51-7,haproxy-2.0.4,justwatch-elasticsearch_exporter-1.1.0,kibana-proxy-service-c4f46f6-6,kibana-service-c4f46f6-6,kubectl-latest,log-ingestion-service-ff04217-99,log-mgmt-service-ceb53d1-4,log-processing-service-726afae-6,logs-portal-eb0d3a5-8}

      Name ade_part_02 Source resource registry https://containers.bmc.com Source resource filter Name bmc/lp0lz Source resource filter Tag {metric-aggregation-service-6c4b171-9,metric-configuration-service-2b5ba78-7,metric-gateway-service-4a6caae-8,metricservice-6b50628-8,prometheus-ingestion-service-8659793-7,RSSO_21.3.00-DRRS0-3893,smart-graph-api-r841442-642-daas_ship-tkn_ship,smart-graph-controller-api-r841442-642-daas_ship-tkn_ship,smart-graph-controller-efsinit-r841442-642-daas_ship-tkn_ship,smart-graph-controller-security-r841442-642-daas_ship-tkn_ship,smart-graph-environment-controller-r841442-642-daas_ship-tkn_ship,smart-graph-instance-controller-r841442-642-daas_ship-tkn_ship,tctlrest-14,thirdparty-ingestion-service-6add794-5,truesight-credential-service-267,truesight-featureflag-service-272,0.9.0-debian-10-r35,bitnami-shell-10,bitnami-bitnami-shell-10-debian-10-r61,custom-sec-busybox-1.27.2,webhook-2102_20210218,elasticsearch-7.16.2-debian-10-r0,bitnami-elasticsearch-curator-5.8.4,kibana-7.16.2-debian-10-r0,fluentd-1.12.3-debian-10-r4}

      Name ade_part_02 Source resource registry https://containers.bmc.com Source resource filter Name bmc/lp0lz Source resource filter Tag {ade-ims-webhook-114,ade-itsm-identity-sync-199}

      1. Then you can synchronize them at will
    2. Install Harbor by using self signed SSL certificates.

      This step is not mandatory as even harbor mentions:

      However, using HTTP is acceptable only in air-gapped test or development environments that do not have a connection to the external internet.

    3. wget https://github.com/goharbor/harbor/releases/download/v2.1.4/harbor-offline-installer-v2.1.4.tgz

      I've used curl -L https://storage.googleapis.com/harbor-releases/release-1.8.0/harbor-offline-installer-v1.8.0.tgz > harbor-offline-installer-v1.8.0.tgz

      which is the minimal required version

    4. harbor.yml.tmpl harbor.yml

      the minimal required version doesn't need this step only one harbor.yml file is available

      The file needs to change in one variable: hostname

      the https port is not enabled

      you may also change the harbor admin password

    1. ```bash POST /news/comments/5 HTTP/1.1 Content-Type: text/xml

      <item> <title>Foo Bar</title> <author>joe@bitworking.org</author> <link>http://www.bar.com/</link> <description>My Excerpt</description> </item> ```