Sunday, May 30, 2021

Fingerbot plus

Fingerbot Plus: The ultimate robot to automate everything by Adaprox — Kickstarter

Tuesday, May 25, 2021

VirtualBox Running Slow - Windows 10 - Power Mode: High Performance

 Windows 10 Guest running on Debian Host


Very slow all of a sudden


This time I could fix it by setting Windows 10's Power Mode to be High Performance
This started happening for me too, after the Win 10 1803 update. Super annoying.

But I found that Windows 10 Pro users can lock in the power plan using Group Policy Editor

First set the power plan, but don't reboot right away.
To do this, run CMD prompt as admin
In the command prompt, type powercfg –restoredefaultschemes and press Enter.
Go to Control Panel > Power Options and select "High Performance" from Control Panel > Power Options, but do not reboot the PC yet.
Make whatever custom changes you want to your High Performance plan using Change plan settings > Change advanced power settings, but still do not reboot the PC yet

Now from the taskbar search type gpedit.msc and run as admin
This opens Group Policy Editor
Navigate to Computer Configuration -> Administrative Templates -> System -> Power Management
In the right hand pane double click on "Select an active power plan"
In the window that pops up select "Enabled"
This will allow you to then select "High Performance" from the drop down menu
Select Apply and OK to close out
Now reboot the PC.

Now when you go to Control Panel > Power Options it will say "Some settings are managed by your system administrator", with the options below that grayed out. But you should be able to see below that it's set at High Performance, even though the option to change settings will be grayed out as it's now handled by Group Policy Editor.

If you don't do the first part of these instructions which include setting your plan before using Group Policy Editor, then Group Policy Editor will just set whatever the default is for High Performance. This may not include all the power options you want. So be sure to set the power plan options first before using Group Policy Editor to lock in the changes



 

Ref:

  • https://silicophilic.com/virtualbox-running-slow/
  • https://answers.microsoft.com/en-us/windows/forum/windows_10-other_settings-winpc/windows-power-plan-will-not-changewindows10/254d2a4e-7fda-4e2b-bf98-acef8e6e0eb1

Monday, December 14, 2020

how to blur image with imagemagick command line, `convert`

convert week.png -filter Gaussian -blur 0x3 week-b.png && gq

Friday, December 11, 2020

how to rsync only some sub directories

* is wildcard
*** means all files and directories

`cat filelist`
>
> + 01 SomeDir/
> + 01 SomeDir/08 */***

`rsync -avz --delete --include-from filelist --exclude '*'
/data/samba/hello/ user@10.10.1.2:synced/hello`

Thursday, December 10, 2020

how to install sshd on windows with cygwin

By Mr. Roxlu

Installing CYGWIN with SSH
1) Download cygwin setup.exe from http://www.cygwin.com
- Execute setup.exe
- Install from internet
- Root directory: `c:\cygwin` + all users
- Local package directory: use default value
- Select a mirror to download files from
- Select these packages:
- editors > xemacs 21.4.22-1
- net > openssh 6.1-p
- admin > cygrunsrv 1.40-2
- Click continue
- When everything is installed configure SSHD


2) Configure SSHD
- open a cygwin terminal: start > RIGHT MOUSE ON "Cygwin terminal"
AND "RUN AS ADMINISTRATOR"
- $ ssh-host-config
- Are you sure you want to continue: YES
- You have the required privileges: YES
- Overwrite existing /etc/ssh_config: YES
- Should privilege separation be used: YES
- Use local account 'sshd': YES
- Do you want to install 'sshd' as a service: YES
- name CYGWIN: just press enter
- Do you want to use a different name: no

+++ you can skip this ++
- Create new privileged user account (cyg_server): YES
- enter password
- reenter password
+++ end of skip ++

3) Add a SSHD account
- Open control panel
- Create a new account with administrator rights
- set a password for this new account

4) Add the user to SSHD password
$ cd /etc/
$ cp passwd passwd_bak
$ /bin/mkpasswd.exe -l -u [new_username] >> /etc/passwd
(for example: /bin/mkpasswd.exe -l -u roxlu >> /etc/passwd to add
the password for roxlu)

5) Open SSHD port (22)
- Open control panel
- Click on System and Security
- Click on Windows Firewall
- On the left click on advanced settings
- click: select "Inbound Rules"
- click: New Rule ...
- [x] Port
NEXT

- TCP
Specific ports: 22
NEXT

- [x] Allow the connection
NEXT

- [x] Domain
[x] Private
[x] Public
NEXT

6) Trouble shooting
- first check if you can connect to the SSHD server on the same
machine:
- open a Cygwin terminal
$ ssh -l [username] localhost

If you can't connect to the server on localhost check if the
sshd daemon is running (see blow)

- check if the SSHD daemon is runing
- open control panel
- search for "services"
- click on "View local services"
- search for "CYGWIN sshd"
- make sure it's there, else try reinstalling sshd

# Reference

https://gist.github.com/roxlu/5038729

Tuesday, August 4, 2020

How to Get a List of Facebook Fan Pages Sorted gy the Number of Likes

Top 500 of the world:
https://socialblade.com/facebook/top/500/likes

Social analyzer platform
(not free)
search top fb page by category and by country
example - top celebs in thailand:
(pay for more results, i think)
https://www.socialbakers.com/statistics/facebook/pages/total/thailand/celebrities

Sunday, August 2, 2020

OCR on Linux

How to grep text from an image file

`sudo apt-get install tesseract-ocr`

`sudo dnf install tesseract`