Supercapacitor fallback from Li-ion charging IC

I’m currently charging a single Li-ion cell from a dedicated charger IC. Due to the intermittent nature of the charging source and Li-ion not being able to charge below 5 deg C it is possible that the battery may run below it’s ideal level. I am adding a supercapacitor so that the circuit can operate in low power mode if the battery is in deep discharge.

I’m struggling to work out a simple circuit that could charge the supercapacitor from the same charger IC, whilst trickle charging the battery, provided it’s above 5 degrees C. I have a dedicated microcontroller for the charging circuitry, so I can digitally measure and control various parts. I also have a 3.3V reference source that can be used.

enter image description here

I’d prefer not to introduce a completely seperate switching converter to charge the supercap however I’m aware that this could be a solution.

Interested to hear any suggestions on how best to tackle this problem!

Custom Category Walker with Image, Fallback to Most Recent Post in Category Image

Based on this and this answer I am developing an extension of the Walker_Category which displays in image from an ACF field, falling back to the latest post’s thumbnail.

I have included the entire walker below, but I believe the problem is in the following $args to WP_Query and/or the way I am looping through the result.

I am getting the same image every time, even though the tax_query is different:

$args = array(
  'post_type' => 'project',
  'tax_query' => [
      'taxonomy' => 'project-category',
      'terms' => $category->term_id,
  ],
  'posts_per_page' => 1,
  'orderby' => 'date',
  'order' => 'ASC'
);

$query = new WP_Query($args);

if ( $query->have_posts() ) {

  while ( $query->have_posts() ) {

    $query->the_post();

    global $post;

    $image = get_the_post_thumbnail_url( $post->ID, 'medium', null );

  }

wp_reset_postdata();

From what I understand, there’s a new WP_Query' for each iteration (in which the ACF field is empty), but$image` ends up with the same url every time.

This is what the arguments look like:

Array
(
    [post_type] => project
    [tax_query] => Array
        (
            [taxonomy] => project-category
            [terms] => 43
        )

    [posts_per_page] => 1
    [orderby] => date
    [order] => ASC
)
Array
(
    [post_type] => project
    [tax_query] => Array
        (
            [taxonomy] => project-category
            [terms] => 48
        )

    [posts_per_page] => 1
    [orderby] => date
    [order] => ASC
)
#etc...

Changing the $args just seems to return a different image url every time. Shouldn’t 'posts_per_page' => 1 just return a single post for each query?

What am I missing?

Posted the entire Walker as a gist.

ssh with passphrase, fallback to Google Authenticator

With the introduction of Google Authenticator and the ability to use it with ssh I was wondering if someone has gone through a sshd_config setup which would

  • first expect a key
  • if this fails, fall back to an authentication with Google Authenticator

The idea being to usually connect seamlessly with a key and, usually in less friendly environments, connect with a two factor mechanism.

Zeppelin OS: revert Cannot call fallback function from the proxy admin

I have been attempting to create a simple upgradable contract using Zeppelin OS: https://docs.zeppelinos.org/docs/deploying.html

Following the tutorial I have been able to:
– Create a new contract
– Deploy it using zos push
– Create the proxy using zos create MyContractName --init initialize --args singleArgValue

After I have deployed I fire up truffle via truffle console --network local and instantiate access to the contract via `contract = MyContractName.at(‘0xProxyDeploymentAddress’)

Every attempted call or sendTransaction always throws with the same error:

Error: VM Exception while processing transaction: revert Cannot call fallback function from the proxy admin
at XMLHttpRequest._onHttpResponseEnd (/Users/machine-name/.nvm/versions/node/v8.11.4/lib/node_modules/truffle/build/webpack:/~/xhr2/lib/xhr2.js:509:1)
at XMLHttpRequest._setReadyState (/Users/machine-name/.nvm/versions/node/v8.11.4/lib/node_modules/truffle/build/webpack:/~/xhr2/lib/xhr2.js:354:1)
at XMLHttpRequestEventTarget.dispatchEvent (/Users/machine-name/.nvm/versions/node/v8.11.4/lib/node_modules/truffle/build/webpack:/~/xhr2/lib/xhr2.js:64:1)
at XMLHttpRequest.request.onreadystatechange (/Users/machine-name/.nvm/versions/node/v8.11.4/lib/node_modules/truffle/build/webpack:/~/web3/lib/web3/httpprovider.js:128:1)
at /Users/machine-name/.nvm/versions/node/v8.11.4/lib/node_modules/truffle/build/webpack:/packages/truffle-provider/wrapper.js:134:1
at /Users/machine-name/.nvm/versions/node/v8.11.4/lib/node_modules/truffle/build/webpack:/~/web3/lib/web3/requestmanager.js:86:1
at Object.InvalidResponse (/Users/machine-name/.nvm/versions/node/v8.11.4/lib/node_modules/truffle/build/webpack:/~/web3/lib/web3/errors.js:38:1)

I am able to refer to the original contract (not the proxy) and execute correctly, but everything throws on the proxy.

Fallback language when translation does not exist

I have a working multi-language site (joomla core support).

My question is, in the case of having an untranslated, for example, an article, is it possible to fallback to the one in the default language? The only way I am thinking to achieve it is to duplicate the untranslated article until the translation will be done.

Appreciate some guidance.

Nginx proxy_pass fallback to http if https handshake fails

I have a requirement using nginx reverse proxying to attempt to connect to an upstream server using https first and, if the SSL handshake fails, fallback to trying the connection using plain http.

Does anyone know if there’s a way to configure nginx such that this can be achieved?

Fallback language when translation does not exist

I have a working multi-language site (joomla core support).

My question is, in the case of having an untranslated, for example, an article, is it possible to fallback to the one in the default language? The only way I am thinking to achieve it is to duplicate the untranslated article until the translation will be done.

Appreciate some guidance.

How to set fallback encoding to UTF-8 in Firefox?

I’ve written a Norwegian markdown document:

$ file brukerveiledning.md
brukerveiledning.md: UTF-8 Unicode text

I’ve converted it to HTML using the markdown command:

$ markdown > brukerveiledning.html <  brukerveiledning.md 
$ file brukerveiledning.html 
brukerveiledning.html: UTF-8 Unicode text

However, Firefox insists on using the "windows-1252" encoding, breaking the non-ASCII characters. I've tried setting the changing the fallback text encoding from "Default for Current Locale" (which here in the UK should be either ISO-8859-1 or UTF-8) to "Central European, ISO", "Central European, Microsoft", and "Other (incl. Western European)". None of these can display æ, ø and å. There are no Unicode options. I've also tried changing intl.fallbackCharsetList.ISO-8859-1 in about:config to various values like utf8, utf-8, iso-8859-1, with no luck.

Using this markdown package:

$ pacman --query --owns "$(which markdown)"
/usr/bin/markdown is owned by markdown 1.0.1-6

and this locale:

$ locale 
LANG=en_GB.utf8
LC_CTYPE="en_GB.utf8"
LC_NUMERIC="en_GB.utf8"
LC_TIME="en_GB.utf8"
LC_COLLATE="en_GB.utf8"
LC_MONETARY="en_GB.utf8"
LC_MESSAGES="en_GB.utf8"
LC_PAPER="en_GB.utf8"
LC_NAME="en_GB.utf8"
LC_ADDRESS="en_GB.utf8"
LC_TELEPHONE="en_GB.utf8"
LC_MEASUREMENT="en_GB.utf8"
LC_IDENTIFICATION="en_GB.utf8"
LC_ALL=

I tried to ask for a solution at the markdown command level, but that was rejected.

List of fallback values in SQL

My question is what would be the best way to handle storing a list of values where the next serves as a fall-back. With a completely variable number of fall-backs (specified by our user).

I’m aware storing a delimited list in one SQL field is considered an anti-pattern (such as a list of parameters), however in this case we have a folder name, and if that folder name does not exist, we will fall back to another specified folder name, so on and so forth until all given folder names have been exhausted or until the first working folder name is found.

The order of the folder names tried is also important and must be preserved. Can’t have it checking 99 before 8.

Globally enabling field-level fallback

Using Sitecore 9.0.2, I’m looking to globally enable field-level language fallback. This seems like it should be easy to do, just go to the Field template and check on the box in the standard values. However, this doesn’t appear to work properly.

I found this article from 2016 about the issue, and Sitecore suggested it was a bug and provided a patch: https://learnsitecorebasics.wordpress.com/tag/field-level-fallback/. But it seems like this is still present today and was never patched in.

Before I either get Sitecore to send me the v9 equivalent patch, or patch it myself in a similar style using dotPeek to find what needs fixing where, I wanted to check the community to see if others have this issue and there’s a better way, beyond manually setting the checkbox on every field.