Trouble setting up tags in Tumblr theme

So, I’m currently using this theme, and I’ve seen that it doesnt have any tags, so I tried adding some code of my own. I’ve checked lots of posts sourcing the base Tumblr code to add them, and while it does work, it sticks out like a sore thumb compared to the rest of the theme, since its in another font, color and size

Any advice on how to tackle this problem?

untagged – Samsung S21 where is enable auto space after period setting

I cannot find the setting for auto space after period when I’m typing a message on my Samsung S21.

Anybody knows where it is?

*hope it’s not part of the autocorrect, because I have that turned off, because it’s making a mess in my language

Whats the point in setting up an open proxy?

Decided to have a look at a list of “open” proxies. I’ve noticed that a good deal of these proxies are on residential IPs.

One of the IPs, 68.188.59.198, is owned by Charter Communications and looks to be the IP of someone’s house. It looks to have a few other random ports open, such as a VPN, telnet, and an additional HTTP port.

So, whats the point of setting one of these up on a home network? These proxies tend to be used by attackers to mask their true identities, and likley attract a lot of malicious traffic. Do they serve as honeypots for criminals? It seems to me that the only result of setting one of these up would be a knock from the police or an ISP.

Google Groups “Spam message handling” Setting Won’t Stay Set

I have a free Google Groups group setup and messages (which are being forwarded from a Gmail account) keep going into the Pending moderation queue. I’ve repeatedly attempted to change the “Spam message handling” setting (only visible when you click “Advanced settings”) to “Post suspicious messages to the group”, but every time I refresh the settings page it’s reverted back to “Moderate and notify content moderators”.

Is there a way to actually change this setting and allow these messages through?

commerce – Setting exposed filter default value from query string

I have a view which show products and an exposed filter block (category, manufacturer, price).

I want to set category default value from URL, like this:

/browse-products/category-id

though, I wrote this module which take the parameter from URL and put it into exposed filter default value.

function mymodule_form_alter(&$form, &$form_state, $form_id) {
  global $request;

  if ($form_id == 'views_exposed_form') {
    $category_id = (int)($request->attributes->get('_raw_variables')->get('arg_0'));
    $form('category_id')('#default_value')($category_id) = $category_id;
    dpm($form('category_id'));
  }
}

dpm output for /browse-products/5

Array
    (
        (#type) => checkboxes
        (#multiple) => 1
        (#options) => Array
            (
                (5) => Tablets
                (10) => -Ainovo
                (7) => -Galaxy Tab
                (6) => -IPad
                (1) => Smart Phones
                (4) => -Galaxy
                (3) => -IPhone
                (9) => --IPhone C
                (8) => --IPhone X
            )

        (#size) => 9
        (#default_value) => Array
            (
                (5) => 5
            )

        (#bef_nested) => 1
        (#theme) => bef_checkboxes
    )

but it doesn’t work?

another thing, why dpm($form) prints the views exposed form data twice!

update 1: I tried something like this (but didn’t work):

function mymodule_views_pre_build(DrupalviewsViewExecutable $view) {
    $view_filters = $view->display_handler->getOption('filters');
    $view_filters('field_category_target_id')('value')(8) = 8;
    $view->display_handler->setOption('filters', $view_filters);
}

or this:

function mymodule_views_pre_build(DrupalviewsViewExecutable $view) {
  $filters = $view->getExposedInput();
  $filters('field_category_target_id') = 8;
  $view->setExposedInput($filters);
}

execute command – Run excutable without a wrapper shell (while setting args/ENV vars)

This question might also answer:

  • “how to execute file without sh?”
  • “a binary executable for running an executable”

Explanation

Many languages can run executables with, or without invoking a shell.
For example, in ruby, system("/usr/bin/gem", "--version") doesn’t ever call /bin/sh
But, in ruby, system("/usr/bin/gem --version > file.txt") does call /bin/sh
Nice

_

However, a text executable that is just a wrapper (example below), as I understand it
will always (obviously) invoke a shell because of the shebang
./execute_world_domination_plan:

#!/bin/sh
/usr/bin/python3 -c "from microsoft import viruses" --some-default-arguments

_

Scenario 1: Executing the wrapper in the console involves 3 processes

  • the console shell (probably dash or bash)
  • the #!/bin/sh process <————————————————– wrapper
  • and then the final process /usr/bin/python3 -c "impo...

_

Scenario 2: Executing the wrapper from another program
(like a ruby script: system("./execute_world_domination_plan") )
would involve 4 processes:

  • the console shell (probably dash or bash)
  • the program (ex: ruby process)
  • the #!/bin/sh process <—————————————- wrapper
  • and then the final process /usr/bin/python3 -c "impo ...

The Problem

I don’t need to spin up an entire shell process, which potentially reads the ~/.bashrc and /etc/bash.bashrc, just to call an executable with a few predefined ENV vars/arguments. I want to avoid that costly shell spin up.

The Question

What is the most lightweight interpreted (e.g. no-c-compiler-required), tool for setting an ENV var/argument, then exec-ing an executable?

Using a small shell or POSIX shell helps, but I’m looking for something purpose-built to execute exetuables no configs, background process capability, etc. Ideally there would be built-in pseudo-shell binary that could be used with #!/usr/bin/exe. It would parse the file for ENV vars, stdin/stdout/stderr, and args before replacing itself (exec) with the executable-being-wrapped.

Possible/Almost Solutions

  1. Using the exec command (exec /usr/bin/python3 ...) will help reduce the total number of processes, but wont avoid the start up cost of the shell.

  2. The most performant solution would be a compiled executable C program wrapper

#include<stdio.h>
#include<stdlib.h>
#include<unistd.h>
int main(){
    char *args()={"/usr/bin/python3","-c","import world_domination"};
    execvp(args(0),args);
}

But I want to include these wrappers in a git repo being synced to a minimal-arch-build of a raspberry pi. And the collaborators shouldn’t have to download/install the entire GCC toolchain, and have an entire build step to compile all the wrappers every time they change.

  1. The next-best would be to make my own version of #!/usr/bin/exe, and create prebuilt binaries of it for every distro/architecture, and those to all the package managers. And yes, while that can be done, if there is already a linux command out there like this, I’d like to take advantage of it.

  2. Even better would be a system-level linux feature that would avoid the middle-man #!/usr/bin/exe process altogether and allow ENV to be overriden direcly. I highly doubt this exists though.

Setting up a stand alone web access point

I have an openwrt router that is configured to offer no internet just a local web portal. I have configured the firewall to forward all HTTP requests to the router’s web server and I have configured dnsmasq to return the routers IP for all dns requests but the captive portal is not working on Android. I even tried setting up dnsmasq to return no IP for connectivitycheck.gstatic.com but the captive portal is still not working.