mining theory – Can miners collude to bypass the penalty based revocation system of the lightning network?

It’s named “penalty transaction” by the specs :).

Regarding your core question, you are right but this also requires this miner to be able to heal this block chain with a censored (the penalty) transaction. It therefore assumes that a single miner has more hashpower than the rest of the network combined.

Thus it can be stated as such:

The Lightning Network core security assumption relies on the fact that nobody can “51% attack” the network.

The decentralization of mining is a huge deal for Lightning (and all other L2s i know of).

logrotate – can I rotate log based on file creation time?

I have logrotate config like this:

/var/log/example*.log {
    weekly
    rotate 1
    missingok
    notifempty
    compress
}

Some of the example*.log files have existed for quite long time more than few months. I want to compress them with logrotate. But the config is newly added, thus it will only start to rotate them after another week.

rotating pattern: /var/log/example*.log  weekly (1 rotations)
empty log files are not rotated, old logs are removed
considering log /var/log/example-a.log
Creating new state
  Now: 2021-01-23 10:07
  Last rotated at 2021-01-23 10:00
  log does not need rotating (log has been already rotated)
considering log /var/log/example-b.log
Creating new state
  Now: 2021-01-23 10:07
  Last rotated at 2021-01-23 10:00
  log does not need rotating (log has been already rotated)
considering log /var/log/example-c.log
Creating new state
  Now: 2021-01-23 10:07
  Last rotated at 2021-01-23 10:00
  log does not need rotating (log has been already rotated)

I wonder is there a way to let the logrotate rotate files based on the creation time or mtime, when it is too old then compress them.

Another problem is the files matching wild card are all rotated together. No matter if the log file is newly created or not. I checked the /var/lib/logrotate/logrotate.status It seems like example*.log is treated as whole. That means all files match this pattern will be rotated at same day. For example: a new log file example-d.log has been added after 6 days of last rotation. Then it will be rotated the next day after it created. But I would like the newly added log example-d.log to rotate after 1 week. Is there any other tool can rotate logs like what I want?

Do you gain XP based on your "level" or your XP total?

Let’s say a 3rd-level character with 5900 XP (100 away from reaching 4th level) clears two EL 5 encounters during an adventure. The PHB says on page 58 that XP is handed out at the end of each adventure, so this means they were in both of these encounters while they were 3rd level.

According to the table on page 38 of the DMG, a party of four 3rd-level characters gains 450 XP per character from an EL 5 encounter, whereas a party of four 4th-level characters gains 400 XP per character.

So, at the end of the above example, would the character have gained 900 XP (they were treated as a 3rd level character during the second encounter, because at the time of the encounter they had 3 HDs and the class features of a 3rd-level character, etc.) or 850 XP (they were treated as 4th level during the second encounter, because at the time of the encounter they had between 6000 and 9999 XP)?

search – Redirect template based on permalink rather than $wp_query

I’m trying to separate out different templates which utilise WordPress’ search (s query var) along with different post types.

Situation 1: Default WordPress search page (search.php). Example: example.com?s=test

Situation 2: Post type archive (archive-{$post_type}.php), with search and taxonomy query var filtering ability. Example: example.com/questions?s=test&category=wordpress

Situation 2 has a few different final templates based on what post type is being queried.

So far I’ve managed to get the above to work with a function similar to this:

function wpse_redirect_search_page_post_types( $template ) {
    global $wp_query;

    if ( $wp_query->is_search ) {
        if ( get_query_var( 'post_type' ) === 'question' ) {
            return locate_template( 'archive-question.php' );
        }
    }
    return $template;
}
add_filter( 'template_include', 'wpse_redirect_search_page_post_types' );

However I encountered an issue when attempting to filter the search results page with different post types. I’ve got a bunch of checkboxes to filter what post types to show on the search results page, and the moment I’ve got only one post type (eg example.com?s=test&post_type=question) it sets the template to archive-question.php.

In terms of the $wp_query, they’re identical (barring query hash differences) for example.com?s=test&post_type=question and example.com/question?s=test&post_type=question.

What’s the best way to do a check for whether I’m intending to show the search or archive template? The only other way I know how to do this is access the url through $_SERVER('REQUEST_URI'), but I was hoping there was a more WordPress-centric way of checking what template it intends to use.

Final use-case goals:

  • example.com/questions?s=test (archive)
  • example.com/questions (archive)
  • example.com/?s=test (search)
  • example.com/?s=test&post_type=question (search)
  • example.com/?s=test&post_type=question,answer (search)

advertising – Cannot create Twitter ad based on creative with text and image

Twitter support doesn’t respond, and the site’s telling me I need a creative in order to finish and send out my advertisement. I separately uploaded a creative but when I go back to the Twitter Advertising section, it tells me I don’t have any creatives and it doesn’t give me an option to upload them. Can anyone help!

Here’s a photo of two posts I made on twitter. Apparently Twitter only lets you select from ‘creatives’ that are videos that you posted?

The first link shows that I posted a picture, which I thought was a creative, along with some text (it doesn’t count as a creative, why?) and a video (the construction site / the architect song) which does count as a creative.

Can I only advertise for posts that I send out on twitter beforehand and which have a video linked to them? I want to just send out a picture with text and advertise that (but not spend only $50 per day like it allows you to and then you can advertise with more freedom). I want to spend like $20 a day on a post that’s a picture and some text.

How to block javascript based popups/new tabs in chrome?

I use ublock addon on chrome. However, I have problems with sites which are ad lovers. when i enter those , they auto open new tab which is directed to ad site, or even worse new window of chrome which is small sized window and keeps teleporting between top left and bottom right. I can only stop this if i deactivate javascript on those sites. Which is bad because it also blocks some functionality.
so what can I do?

php – Need help with generating a unique reference number based on the user id

I’m trying to create a unique reference ID based on the actual user ID so I don’t have to reveal the actual user ID on my site. This number will be published later using a shortcode. It is necessary to hide the real user ID and real name due to the privacy policy of my country. I was thinking of a user meta that is automatically generated after registration based on the actual user ID with a specific pattern:

  • 8-digits
  • contains the actual user ID
  • automatically completes the remaining digits with randomly generated numbers for fixing number length
{user_id}{generated_nr}, max 8-digits

I started very simply as follows, but I can’t set the length/width of the number considering the user id, so the missing digits are filled with auto-generated numbers. I also do not know how to generate the number only for newly registered users, nor do I know how to check if the number has already been assigned to another user:

function add_custom_ref_id( $user_id ) {

 $custom_ref_id = $user_id . wp_rand(10000000,99999999);
 return $custom_ref_id;

}

add_user_meta( $user_id, 'custom_ref_id', $custom_ref_id );

Concerns: Will the numbers be unique? Is this method secure? How can I avoid mistakes? Maybe combining them with the first letters of their first and last name? Like;

Name: John Doe, User ID: 24 > 24XXXXXXJD

And if yes, how?

I am always open to new suggestions and thank you in advance for proposing solutions.

Best regards.

PS: I already read the older threads but apart from the fact that they do not really meet my expectations, there could be better, more secure and more efficient methods out there.

I will build pro1 seo usa based hight quality dofollow profile backlink for $5

I will build pro1 seo usa based hight quality dofollow profile backlink

About This GigHello…..
50 High pr SEO Backlinks for google ranking .Here i will create 50 High pr SEO Backlinks, For google ranking these links

are white hat High Authority SEO Backlinks Link buildingThese are profile links not blog comments or redirectWhitehat 50 High pr SEO Backlinks100% Penguin, Panda, and Hummingbird safe.Domain Authorities (DA) ranging from Very High, Imagine the amount of juice and authority your site will benefitGoogle loves these authority Link building backlinksDo you want to skyrocket your website rankings, increase traffic and boost your page rank?

Quality Dofollow backlinks are the most important part of SEO. 100% Safe High

Quality Backlinks according to latest Google update.#- Can you work on my new website and it Safe?All site accepted excluding Porn, Gambling and adult oriented.#. Do you accept all languages ?All languages are accepted but we do all campaign with English contents,

meanwhile, your keywords still remain intact in your preferred language.#- How long my site will stay GOOGLE new rankings ?Depend on how much your competitors are working on their Seo.#- Do you accept high competition keywords?Yes, But we cannot guarantee a huge boost such as top pages within few weeks.

WHAT WILL YOU GET FOR $5?50 High pr BacklinksWhite hat backlinksManual backlinksLogin Details provide24 Hours Express DeliveryWhat i will need from you?Website URLKeywordsA Short Description

.(tagsToTranslate)usa(t)hight(t)profile(t)backlink(t)based

Buying – UK based php programmer

Hi,

I am looking for a UK based programmer to come in with me on a business idea. There is some money to put into this, but having been over promised and under delivered by a few people in the past on different projects I want someone who is prepared to work with me on this.
SEMrush

I do not want to go in to details at this stage, but I want to create a website that is ultimately a form that cross references with a database to provide a list of products in the financial services industry – there is obviously more to it than that (registrations, API integrations in time, payment processing down the line), but it gives a very broad outline of what is needed.

I have worked in financial services for about 15 years, I run my own business which has been trading since 2013 as a sole trader and then 2016 as a limited company – in essence you can vet my business and credentials on companies house and the FCA register.

I have everything in place to get the venture earning money once this is done, we have insurance we are regulated by the FCA, we have the agreements with the banks etc. But it must be someone in the UK.

Thank you.