Posts

Windows 10 SSH Server

Image
Open the Settings app and go to Apps -> Apps & features. On the right, click Manage optional features. On the next page, click the button Add a feature. In the list of features, select OpenSSH Server and click on the Install button. Click the back arrow at top left and you should see OpenSSH Server is being installed. Wait for it to finished installing. Open Services and look for OpenSSH Server Click Start on the left pane to start the service. If the service can be start, double click on it. On the General tab select Startup Type as Automatic or Automatic Delayed and click OK. This will start the service automatically when you start Windows.   Don't forget to do port forwarding in your router to access the service from outside Credit: https://winaero.com/blog/enable-openssh-server-windows-10

Windows 10 built in VPN

Image
DISCLAIMER: The Point-to-Point Tunneling Protocol (PPTP) is an obsolete method for implementing virtual private networks. PPTP has many well known security issues.  Server setup: Take note that, beside using port 1723 for PPTP protocol, Windows built in VPN server apparently will use port 443 as well which is the same port as HTTPS. If you running a web server using that port, you might need to change its' port. You need to have your internal IP to be in different subnet between your VPN server and client. For example if the client IP in the range of 192.168.1.x, the server IP should be in 192.168.2.x. Of course you can use totally different IP class like 10.x.x.x for either server or client as long there are in different subnet. This can be setup in your router, or manually in your network adapter. You should get a fix domain name for your server. You can register for free dynamic DNS for your VPN server.   Open Control Panel, Network and Sharing Center. Click on Ch...

How to clone a Git branch

git clone --branch --single-branch [ ]

MYTV transmitter list

Image
  If anybody know where can get this list, put in comment below. Thanks. Credit: http://mytvdvb-t2.blogspot.com/2017/01/cara-cara-untuk-cari-dan-simpan-signal.html

Remove some context menu

Use Winaero Tweaker For iDrive and MEGASync, edit registry, go to Computer\HKEY_CLASSES_ROOT\Directory\shellex\ContextMenuHandlers\Offline Files and remove it from there. Credit: https://www.howtogeek.com/howto/windows-vista/how-to-clean-up-your-messy-windows-context-menu

Yii2: Authentication with Google and Facebook

Image
This is continuation from https://takdekeje.kuceng.my/2018/08/yii2-validate-email-after-registration.html . Objective: Register and login with Google and Facebook account. Link existing account with Google and Facebook. Unlink  existing account from Google and Facebook. You may truncate both tables to start fresh. Part 1: Initial setup Install  AuthClient Extension . composer require "yiisoft/yii2-authclient:*" Create new migration to update DB yii migrate/create authclient Edit the migration file: <?php use yii\db\Migration; /** * Class m180926_083206_auth */ class m180926_083206_auth extends Migration { /** * {@inheritdoc} */ public function safeUp() { } /** * {@inheritdoc} */ public function safeDown() { echo "m180926_083206_auth cannot be reverted.\n"; return false; } // Use up()/down() to run migration code without a t...

Yii2: Validate email after registration

Image
Goals: Verify user email Deny login for unverified email Resend verification for expired/lost verification Verify within certain time frame  Recover lost password Recover within certain time frame Resend recovery for expired/lost recovery  You may want to read this first . Part 1: Configuration Edit config\db.php to point to your DB. Create table for users and verification token. CREATE TABLE `users` ( `id` bigint unsigned NOT NULL AUTO_INCREMENT, `email` varchar(255) NOT NULL, `password_hash` varchar(255) NOT NULL, `confirmed_at` datetime NOT NULL, `registration_ip` varchar(255) NOT NULL, `created_at` datetime NOT NULL, `updated_at` datetime NOT NULL ON UPDATE CURRENT_TIMESTAMP, `last_login_at` datetime NOT NULL, `last_login_ip` varchar(255) NOT NULL, PRIMARY KEY (`id`), KEY `email` (`email`) USING BTREE ); CREATE TABLE `token` ( `uid` bigint unsigned NOT NULL, `code` varchar(32) COLLATE utf8_unicode_ci NOT NULL, `created_at` ...