Friday, March 19, 2021

ssh-fs win error 67

Recently had to map SSHFS on Windows, but got following error trying to assign a drive letter from CMD:

net use Z: \\sshfs\alex@127.0.0.1\
The password is invalid for \\sshfs\alex@127.0.0.1\.
Enter the user name for 'sshfs': alex
Enter the password for sshfs:
System error 67 has occurred.
The network name cannot be found.

However, the mapping was working from "MyComputer > Map Network Drive".

The fix for the error wasn't so obvious, but it was simply a missing quotes:

net use Z: "\\sshfs\alex@127.0.0.1\"
The password is invalid for \\sshfs\alex@127.0.0.1".
Enter the user name for 'sshfs': alex
Enter the password for sshfs:
The command completed successfully.

Sunday, December 27, 2020

Mounting external SDCARD for WhatsApp

The way how WhatsApp using sent and received messages writing everything to internal sd card is very unfortunate for phones with small amount of build in memory. There is no default option to provide another path for Media files.

Since Android have mount folders capability the first try was to use bindfs from here: https://github.com/agnostic-apollo/bindfs/releases/tag/v1.0

DIR=/mnt/media_rw/[SD_CARD_FOLDER_NAME]

/mnt/bindfs-armeabi-v7a -o nonempty,nosuid,nodev,noexec,noatime,context=u:object_r:vfat:s0 -u 0 -g 9997 -p a-rwx,ug+rw,ugo+X --create-with-perms=a-rwx,ug+rw,ugo+X --xattr-none --chown-ignore --chgrp-ignore --chmod-ignore $DIR/WhatsApp /mnt/runtime/write/emulated/0/WhatsApp

But this approach were showing folders in /mnt/runtime/write/emulated/0/WhatsApp only for command prompt which was started from the phone itself, even starting the

Lucky Patcher Directory Binder were working only for default browser, but X-plore, for example, were not showing the mounted folder files and WhatsApp were not picking this either.
Here is a tutorial: https://proandroidgeek.blogspot.com/2015/04/how-to-use-directory-binder-in-lucky.html

However, using builtin mount command did the trick:

mount -t sdcardfs -o nosuid,nodev,noexec,noatime,mask=7,gid=9997 /mnt/media_rw/[SD_CARD_NAME]/WhatsApp /mnt/runtime/write/emulated/0/WhatsApp

This allowed WhatsApp to write/read using external sd card. Command could be set as a startup script in Tasker, for example, or placed in init.d, which is harder, but also could be as an option.

Note: at the moment of writing this post these commands were tested only on Samsung Note 4 with Marshmallow, SuperSU.

Saturday, December 26, 2020

Starting VLC to play audio sources simultaneously

 Ever wanted to play movies through two different audio outputs?

Here is the solution:

Step 1. Start two players from console with HTTP:

vlc --extraintf=http --http-host 127.0.0.1 --http-port 8081

vlc --extraintf=http --http-host 127.0.0.1 --http-port 8082

Step 2. Select audio output and audio track for the opened players.

Step 3. Use following command to simultaneously start and stop video.

curl http://127.0.0.1:8082/requests/status.xml?command=pl_pause & curl http://127.0.0.1:8081/requests/status.xml?command=pl_pause

Note: curl is available by default in the latest Windows builds

Sunday, April 2, 2017

Move 'Read Later' articles to Feedly Board

This weekend were curious how to move all what is saved in feedly 'Read Later' to a custom Board. Just to make it fast tried to use Chrome DevTools and came out with awkward solution, but that appeared to be functioning, at least until feedly will update the code again.

Basically it ended up with a button that injects into popup that used to select the board.



This code creates a button element with parameters which is used

i=0; b=1; c=100;
var button = document.createElement('button');
  button.innerHTML = 'click me';
  button.onclick = function(){
  i=i+1
    document.querySelectorAll('.condensed-toolbar-icon.button-icon-only-micro.icon.icon-fx-save-to-knowledge-board-ios-md-black.tertiary')[c-i].click();

 setTimeout(function(){
 document.querySelectorAll('.popover')[1].style.display = "none"
 document.querySelectorAll('.item.item-add-remove.is-interactive.item-with-visuals')[1].appendChild(button)
 window.scroll(0,findPos(document.querySelectorAll('.item.item-add-remove.is-interactive.item-with-visuals')[1]));
 }, 1000);
  };

document.querySelectorAll('.item.item-add-remove.is-interactive.item-with-visuals')[b].appendChild(button)

Where 'c' should be set to the last saved article, since the script goes from the last article to top to mantain the same structure. Basically this could be used even for aka renaming the Boards, but it is just awkward solution and takes a lot of time, depending how many articles you have.

Before entering the code you need to know following:

1) Latest article number:
Just scroll to the last article and enter the following code and try to guess how many articles you may have, just put this code changing the number to the highest value, so it will show the result: 
document.querySelectorAll('.condensed-toolbar-icon.button-icon-only-micro.icon.icon-fx-save-to-knowledge-board-ios-md-black.tertiary')[30]


2) Which board to save the article to:
Click on 'Save to board' button and enter the code


document.querySelectorAll('.item.item-add-remove.is-interactive.item-with-visuals')[1]

Then hover on the output from DevTools and change the number to the one which matches board name you need to save articles to, change this in the initial code too, line 10.

3) Once you have changed 'c' variable and line 10 in the code, you can click 'Save to Board' on the last item in the list you need to save and enter the code in the DevTools, then you need to make sure that the custom button have appeared on the popup, see first image.

The code above uses function from an answer by AhhSirk Dasarp on one of stackoverflow questions:

//Finds y value of given object
function findPos(obj) {
    var curtop = 0;
    if (obj.offsetParent) {
        do {
            curtop += obj.offsetTop;
        } while (obj = obj.offsetParent);
    return [curtop];
    }
}

Just put this additional code and you are good to go to click on the custom button you have seen on the first image. This will automatically open another popup and move the view to it, you can click it again and again and it will save articles one after another to the board you have selected. This can been even fully automated by implementing an autoclicker, whreas there are many that could be used, for example Pulover's macro recorder. Just be sure to add some delay between clicks, so the data will load before it will initiate another click and in case you were too fast clicking, just enter line 10 into the DevTools to open the last popup anew to continue from the last unsaved article.

This has been said... awkward, but works and it is fast to implement.

Tuesday, August 25, 2015

This site uses cookies from Google

Every blogspot page got the following header, which is annoying:

"This site uses cookies from Google to deliver its services, to personalize ads and to analyze traffic. Information about your use of this site is shared with Google. By using this site, you agree to its use of cookies." 

To minimize the impact you could do the following modifications:

1. Login to your blogspot dashboard.
2. Go to Template → Edit HTML
3. Put this before head tag:

https://gist.github.com/anonymous/bf14ceee85de06480709
  

 

Save and check for the change.

P.S. Futhermore, if you don't scared of your blog to be removed by Google, you could put something like
visibility: hidden;
but that won't make any respect to EU legislation on cookies.

Thursday, April 9, 2015

Skype 7.3 Update Message

During the recent Skype update following message occur once:

"Would you like to select which Skype related actions this program should handle by default?"

You can press "Yes" to associate program with CALLTO links in the web.

Sunday, November 3, 2013

Feedly tags shortcuts by Tampermonkey

Hello Anyone!

I have finished making another script for feedly.

After missing "T" shortcut like it was in GoogleReader.

You may use it to place TAG's without mouse.

Here's how it works:

1) Load this script into Tampermonkey.
2) Reload feedly page and press Shift+B (this will show notification after you will scroll down)
3) Press O to open any post and enter the tag number by keyboard.

In example: I have opened RSS feed of CNN.com, then I have opened post about something.
                  Then I'm just pressing 05 to add this post to the 5th tag in my feedly account.

The script is very simple and I'm relying that people who will use it will adjust it for themselves.

It just shows the main idea of how TAG's could be added by shortcuts.

Thanks,
Alex.