profile
viewpoint

apiraino/autorandr 24

Automatic monitor switch when an external source is plugged

apiraino/djangorestframework_custom_filters_ordering 3

A custom DRF OrderingFilter with support to nested related fields

apiraino/aros_guide 2

A summary to quickly get into AROS programming

apiraino/apiraino.github.io 1

https://apiraino.github.io

apiraino/emacs_reference 1

My personal, unfinished, ever work-in-progress, never-ending, six-legged EMACS reference guide

apiraino/amitools 0

Various tools for using AmigaOS programs on other platforms

apiraino/api 0

Directus Database API — Wraps Custom SQL Databases with a REST/GraphQL API

apiraino/app 0

Directus Admin Application — An Intuitive WebApp for Managing Database Content

apiraino/audioplayers 0

A Flutter plugin to play multiple audio files simultaneously (Android/iOS)

apiraino/berline.rs 0

Rust Berlin website

issue closedkjambunathan/org-mode-ox-odt

Feature request: fine grained control of both image and caption widths

An example use case: the figure below has a long caption and a small figure, currently the caption is forced to have the same width as the figure, and it doesn't look good.

#+caption: This is a very long long long long long long long long caption.
#+label: org
#+attr_odt: :width 3 :anchor "as-char" :style "OrgCenter"
[[./org-mode-unicorn.png]]

Maybe the outer frame size should be specified with an extra attribute for the caption, like:

#+attr_odt: :width 10
#+caption: This is a very long long long long long long long long caption.
#+label: org
#+attr_odt: :width 3 :anchor "as-char" :style "OrgCenter"
[[./org-mode-unicorn.png]]

A better default if no specification for the outer frame may be just occupy the whole width of the column.

closed time in 2 days

QiangF

issue commentseanmonstar/warp

warp 0.2.5 not compiler

For others that might be running into this issue, I think it's caused by two crates depending on two different versions of hyper. Personally I had a workspace where one crate had a dependency on hyper 0.13.5 and another crate that used warp 0.2.5 which had a dependency on hyper 0.13.9. Breaking up this workspace so each crate had their own Cargo.lock fixed the issue for me. Upgrading your other dependency to use hyper 0.13.9 would also probably work.

zirill

comment created time in 3 days

pull request commentseanmonstar/warp

Upgrade automatically from http to https.

Hello @daxpedda , just a friendly ping: how are you feeling this PR after a couple months, do you need some help? 😉

daxpedda

comment created time in 3 days

pull request commentansible-collections/community.sops

Allow to tell sops lookup to return '' for non-existant files

@endorama can you be chance look at this PR again? (Maybe even at the others?) It would be really awesome to have this in a release, it's a lot easier to use than installing collections from a git repo branch (which doesn't work for Ansible 2.9).

felixfontein

comment created time in 4 days

PR opened seanmonstar/warp

Add ext provider
+87 -4

0 comment

3 changed files

pr created time in 4 days

push eventRustFestEU/blog.rustfest.eu

Flaki

commit sha 87849658e0f78f0de8c9ee24177ab4f33ca9b540

RustFest project announcement

view details

push time in 4 days

push eventapiraino/link_cleaner

Alex Klapheke

commit sha 589afec890f7a616e86f291e80d396b9e0ac60d4

Add Pigeon redirect

view details

Alex Klapheke

commit sha 83ebff1ea6ad4a704f722e20be2faca8d0808103

Add Mailchimp redirect

view details

Alex Klapheke

commit sha 7d94b562a77ec3ea852150a2bdf5afefc615494c

Fix formatting

view details

Alex Klapheke

commit sha 0deaa977faa175b3a7706875feb6df2d16fb1e9c

Add Medium redirect

view details

Alex Klapheke

commit sha 89ae09156cf29bce72a5f982b1a7f53da800ff7e

Add Recruitics redirect

view details

Alex Klapheke

commit sha 765e3ab8d20de4763f36913c703ffee4801c8ab0

Remove Medium (causes infinite redirect)

view details

Alex Klapheke

commit sha 79118b94e7b9cd6925d32ad98eaa71c21191963b

Add disclaimer to test_urls

view details

Riamse

commit sha d7c32c91227dfcb9b4fafbccf5a7d1de7fb89ee3

Merge pull request #30 from alexklapheke/master Bypass redirects for mailchimp, mailpgn, recruitecs

view details

push time in 4 days

PR merged apiraino/link_cleaner

Add some link cleaning rules

mailpgn.com, mailchimp.com, recruitics.com, plus test URLs.

Tried to add a rule for medium.com/m/global-identity but it seems to lead to an infinite redirect loop.

+36 -0

0 comment

3 changed files

alexklapheke

pr closed time in 4 days

create barnchRustFestEU/blog.rustfest.eu

branch : project-announcement

created branch time in 5 days

Pull request review commentapiraino/link_cleaner

Add some link cleaning rules

 <h1>Test page</h1>     <br /><br />     <a href="https://x.chip.de/linktrack/button/?url=https%3A%2F%2Fwww.vodafone.de%2Fnewsroom%2Fnetz%2Fstayhome-auf-jedem-handy-weil-wir-wollen-dass-ihr-sicher-seid%2F&c=8de2f3d865f23ac4473f53141fbbc468&type=text&articleId=126236983&referrer=https%3A%2F%2Fwww.chip.de%2Fnews%2FVodafone-mit-weiterer-Aktion-Was-bedeutet-StayHome_182567730.html&cms=ir&channel=News&bartId=1481&layoutId=4912&fqdn=www.chip.de">chip.de redirect</a> +    <br /><br />+    <a href="https://t.mailpgn.com/l/?u=f4285f76-f1be-4373-805b-f690af95ccd5&fl=https%3A%2F%2Fsiteoly.com">trypigeon.co redirect</a>++    <br /><br />+    <a href="https://us18.mailchimp.com/mctx/clicks?url=https%3A%2F%2Fmailchi.mp%2F5f701f9d65c0%2Fcongressman_bradley_byrne_staff-member_02-19-2020_mstownhall_130-230&h=5b02d3916fa64b22b6b286171fc98aa1b813d4f9dc17168518054717d42f001e&v=1&xid=4d8e63a7d8&uid=94352913&pool=&subject=">mailchimp redirect</a>++    <br /><br />+    <a href="https://medium.com/m/global-identity?redirectUrl=https://blog.unocoin.com/how-true-are-fears-of-a-cryptoasset-bubble-8dd119b15ccc">medium redirect</a>

OK, added to both files

alexklapheke

comment created time in 5 days

issue commentseanmonstar/warp

Adding "data" / "state" helpers

How about to add a filter wrapper to set extensions?

masklinn

comment created time in 5 days

Pull request review commentapiraino/link_cleaner

Add some link cleaning rules

 https://www.google.com/url?q=https://soundcloud.com&sa=D&ust=1504422217100000&us https://www.google.com/url?sa=t&rct=j&q=&esrc=s&source=web&cd=2&cad=rja&uact=8&ved=0ahUKEwiU4JDYyZvUAhUoxFQKHf5IAEAQFggsMAE&url=https%3A%2F%2Fgithub.com%2Fidlewan%2Flink_cleaner&usg=AFQjCNHLsiLWuJifp8qBynFPaicSw0gLGw&sig2=imkIeC-CN_z-8x5NgFr4TQ  https://lm.facebook.com/l.php?u=http%3A%2F%2Fwww.dailycal.org%2F2018%2F10%2F11%2Fuc-berkeley-community-hosts-events-for-zero-waste-october%2F%3Ffbclid%3Dnotachance&h=AT3jrqKvULa2phePG9px8v7dWeSEtBniR2q9sGAyzA5_Yejv-5jJsM1bsJx_d54bk6OOdVBX8z8FUmXXKTy52eDYSnazhoD8HHypKGNyFFNPhHP6gzCaf0TlwstD10pBrRW7s_2-AOpCvch7AKqeXJAZp_MiRnKCxA0n7SiMzMEqYFlAD3ngCc0BNXlH7KQol2PRDAqIW8xMisdRzY2rsh475bHX03bKs76CIv1Y6oMACrlsS5i51Bk_7Dx3EvLOZsrTX8UoxRn9lYEY9kUM7tLA3wwF1XpFsXfXUM4lqDBmNGZmg5LC6NJ1gRQMLbzkpw12eF5YOvVX7N45kiXuSC2JxeiI7FX0hZRrPwSKDdx3unkz9kKzk-CMjEWG1jBpJf8L99rsS0Y3wkBRKUM-pp1HhNJkc9dzZ4B51-9CPNa1B_YKnxPYaN57HnaWy5lfojUVSbxl5C8_53EpSMyLdApxf_cXykvpzbA6_KsPlDqINfikghLskLcqiRG98HvEPTHhDsgNUi0ZUIUqs8gbekgzEg6SgkSzS_ai33VkmDN6Cs--uvEctT9yRCKdiuVo1Eb1ef8G-KuPsh8tUo7JhK07jRIhedbeUnqIUtqwiVWE_P4dyLFdJCZ7Mby1AGG4KbxKqVehZDeaWBHBA4eYjMFBtUCw3ISjZ7iAMIvm6Jdjxo2qXHY1TjT4MsswVC3Z2ruCIQDoXKdReto0GddPOOj0EtGTvtub2WJNatzWRHIkFnP3NBLrWfPc7bI55jhfUsvmkSX7Qo2loSSYGeRkTbcEma2O1_2-TP1iGEk7B0joPQcDdYLBiGJnHw7dsorfi4acsoTroyDrlwvXvxQaHjFFOr3CyrGXfG6SrEtoZVE4E6nhSng9q32Z_7QqXXQNTkRlzoqlp-RL3HfV_Kqu2hUgfyNc0Z_zsMw72zcbYoIgV-W7xM8GgL-F++https://t.mailpgn.com/l/?u=f4285f76-f1be-4373-805b-f690af95ccd5&fl=https%3A%2F%2Fsiteoly.com++https://us18.mailchimp.com/mctx/clicks?url=https%3A%2F%2Fmailchi.mp%2F5f701f9d65c0%2Fcongressman_bradley_byrne_staff-member_02-19-2020_mstownhall_130-230&h=5b02d3916fa64b22b6b286171fc98aa1b813d4f9dc17168518054717d42f001e&v=1&xid=4d8e63a7d8&uid=94352913&pool=&subject=++https://medium.com/m/global-identity?redirectUrl=https://blog.unocoin.com/how-true-are-fears-of-a-cryptoasset-bubble-8dd119b15ccc

See above

alexklapheke

comment created time in 5 days

Pull request review commentapiraino/link_cleaner

Add some link cleaning rules

 <h1>Test page</h1>     <br /><br />     <a href="https://x.chip.de/linktrack/button/?url=https%3A%2F%2Fwww.vodafone.de%2Fnewsroom%2Fnetz%2Fstayhome-auf-jedem-handy-weil-wir-wollen-dass-ihr-sicher-seid%2F&c=8de2f3d865f23ac4473f53141fbbc468&type=text&articleId=126236983&referrer=https%3A%2F%2Fwww.chip.de%2Fnews%2FVodafone-mit-weiterer-Aktion-Was-bedeutet-StayHome_182567730.html&cms=ir&channel=News&bartId=1481&layoutId=4912&fqdn=www.chip.de">chip.de redirect</a> +    <br /><br />+    <a href="https://t.mailpgn.com/l/?u=f4285f76-f1be-4373-805b-f690af95ccd5&fl=https%3A%2F%2Fsiteoly.com">trypigeon.co redirect</a>++    <br /><br />+    <a href="https://us18.mailchimp.com/mctx/clicks?url=https%3A%2F%2Fmailchi.mp%2F5f701f9d65c0%2Fcongressman_bradley_byrne_staff-member_02-19-2020_mstownhall_130-230&h=5b02d3916fa64b22b6b286171fc98aa1b813d4f9dc17168518054717d42f001e&v=1&xid=4d8e63a7d8&uid=94352913&pool=&subject=">mailchimp redirect</a>++    <br /><br />+    <a href="https://medium.com/m/global-identity?redirectUrl=https://blog.unocoin.com/how-true-are-fears-of-a-cryptoasset-bubble-8dd119b15ccc">medium redirect</a>

Please add an explicit comment that Medium doesn't actually have a cleaner yet.

alexklapheke

comment created time in 5 days

Pull request review commentapiraino/link_cleaner

Add some link cleaning rules

 const urls_to_param_mappers = [     },     {         urls: ["*://getpocket.com/redirect*", "*://www.getpocket.com/redirect*"]+    },+    {+        urls: ["*://t.mailpgn.com/l/*"],+        query_param: 'fl'+    },+    {+        urls: ["*://*.mailchimp.com/mctx/clicks*"]+    },+    // Leads to infinite redirect loop

I wonder if the infinite redirect loop is caused by Medium using, say, the Referer header - would be a good thing to investigate and if so, an easy feature to work on. Maybe another time!

alexklapheke

comment created time in 5 days

PR opened apiraino/link_cleaner

Add some link cleaning rules

mailpgn.com, mailchimp.com, recruitics.com, plus test URLs.

Tried to add a rule for medium.com/m/global-identity but it seems to lead to an infinite redirect loop.

+36 -0

0 comment

3 changed files

pr created time in 5 days

issue commentseanmonstar/warp

warp 0.2 is slow in benchmarks

Hi, I understand the reasons why unstable_pipeline is undocumented and it is fine but perhaps we should do something to update the benchmark score? At least it is helpful for PR sake and help add more adopters. For a relatively big project, choosing something that performs only 3% vs 80% or 90% sounds quite a bad decision, even no one knows what does it mean in reality.

xfix

comment created time in 6 days

startedapiraino/link_cleaner

started time in 7 days

issue closedseanmonstar/warp

Can't make to work warp::cors().allow_any_origin()

use env_logger::{Builder, Env};
use std::env;
use std::net::SocketAddr;

use warp::{Filter, Rejection, Reply};

#[tokio::main]
async fn main() {
    env::set_var("RUST_LOG", "warp=info,warn");
    Builder::from_env(Env::default().default_filter_or("info")).init();

    let addr = SocketAddr::from(([0, 0, 0, 0], 8080));

    warp::serve(router()).run(addr).await;
}

pub fn router() -> impl warp::Filter<
    Extract = impl warp::Reply,
    Error = warp::Rejection,
> + Clone {
    ok_route()
        .with(warp::cors().allow_any_origin())
        .with(warp::log("api"))
}

async fn ok() -> Result<impl Reply, Rejection> {
    Ok(warp::reply::json(&"OK".to_string()))
}

pub fn ok_route() -> impl Filter<Extract = impl Reply, Error = Rejection> + Clone {
    warp::path!("ok").and(warp::path::end()).and_then(ok)
}
$ http :8080/ok

GET /ok HTTP/1.1
Accept: */*
Accept-Encoding: gzip, deflate
Connection: keep-alive
Host: localhost:8080
User-Agent: HTTPie/2.2.0


HTTP/1.1 200 OK
content-length: 4
content-type: application/json
date: Wed, 21 Oct 2020 17:17:48 GMT

"OK"

There is no header Access-Control-Allow-Origin: * What i'm doing wrong?

closed time in 8 days

barlog-m

pull request commentseanmonstar/warp

Tls client authentication

Thanks! :100:

janpetschexain

comment created time in 8 days

push eventseanmonstar/warp

janpetschexain

commit sha cca5b54a48bd846ae0fcff91eafd6681f1cd9f7d

Add tls client authentication (#743)

view details

push time in 8 days

PR merged seanmonstar/warp

Tls client authentication

This extends the TlsServer for optional client authentication by providing client_auth_optional() and client_auth_required() method (and their _path() counterparts) to expose rustls functionality, partly addressing #504.

It seems that others are having the same request/issue as well (#737), but this pr implements tls client authentication along the lines of the existing tls server authentication (cert() and key() methods) in contrast to #739.

+135 -2

1 comment

2 changed files

janpetschexain

pr closed time in 8 days

PR opened seanmonstar/warp

working auth filter rejection with authentication header and realm name

This is for issue #62 based on pr #716 but mine actually works. However I understand it is a crazy hack how I pass the realm name along to create the additional header. If some maintainer could guide me how to make that clean please? I'll fix it as needed.

For cleaner implementation: I'd assume we need a new rejection type. Because a failed authentication (i.e. user/pass wrong) will require the same headers returned as this authentication header missing filter does, only now needed by another filter: the one checking the credentials.

+84 -0

0 comment

5 changed files

pr created time in 10 days

issue commentseanmonstar/warp

Reply with a stream

Of course if there is a better way to forward the reqwest response, a hint would be much appreciated :)

This seems to work for me:

async fn proxy(_unused: String) -> Result<impl warp::Reply, Infallible> {
    let response_stream =
        reqwest::get("http://build/builds/file.tar.bz2").await.unwrap().bytes_stream();
    let body= hyper::Body::wrap_stream(response_stream);
    Ok(warp::reply::Response::new(body))
}

sorin-davidoi

comment created time in 11 days

issue closedseanmonstar/warp

Does Warp have a plan that support tokio 0.3 and bytes 0.6?

Is your feature request related to a problem? Please describe. bytes 0.6 has some breaking changes

Describe the solution you'd like downgrade bytes to 0.5 and tokio to 0.2

Describe alternatives you've considered not yet :(

Additional context Currently, I upgraded tokio from 0.2 to 0.3, and it depends bytes 0.6, so I upgrade bytes to 0.6 as well but found many imcompatible places, such as: Part.data(), returns bytes/buf/buf_impl/Buf which does not exist in bytes 0.6

closed time in 11 days

songday

issue commentseanmonstar/warp

Does Warp have a plan that support tokio 0.3 and bytes 0.6?

Hi, yes see https://github.com/seanmonstar/warp/issues/725

songday

comment created time in 11 days

issue commentseanmonstar/warp

Can't make to work warp::cors().allow_any_origin()

Cool. Note that "OPTIONS" ("CORS preflight request") is a special case: browsers classify requests they're asked to perform between "simple" and "not simple". For "simple" requests, the browser just adds the Origin header to the request then sends it out. For "non-simple" requests, the browser first perform a preflight request, and if it gets a preflight response then it'll send the actual request.

A simple request is an HTTP request using the HEAD, GET or POST methods, only using safelisted request headers, Content-Type (if present) is one of "application/x-www-form-urlencoded", "multipart/form-data", or "text/plain", and a few other criteria.

Also note that fundamentally CORS is not a security mecanism, it's a backwards compatibility mecanism.

barlog-m

comment created time in 11 days

issue commentseanmonstar/warp

Can't make to work warp::cors().allow_any_origin()

Thank you for the answer. I found out how to force it to work.

pub fn router() -> impl warp::Filter<
    Extract = impl warp::Reply,
    Error = warp::Rejection,
> + Clone {
    let cors = warp::cors().allow_any_origin()
        .allow_headers(vec!["Access-Control-Allow-Headers", "Access-Control-Request-Method", "Access-Control-Request-Headers", "Origin", "Accept", "X-Requested-With", "Content-Type"])
        .allow_methods(&[Method::GET, Method::POST, Method::PUT, Method::PATCH, Method::DELETE, Method::OPTIONS, Method::HEAD]);

    ok_route()
        .with(cors)
        .with(warp::log("api"))
}

And an example request via httpie

http OPTIONS http://localhost:8080/ok \
Access-Control-Request-Method:DELETE \
Access-Control-Request-Headers:origin,x-requested-with \
Origin:https://foo.bar.org
barlog-m

comment created time in 11 days

issue commentkjambunathan/org-mode-ox-odt

Add Citeproc support

In the output of

java -jar ~/.dotfiles/emacs/org/jabref/JabRef-2.9.2.jar -h

chicago is in lowercase.

kjambunathan

comment created time in 11 days

more