Blog Image

Ruhua Yan's Blog

A Language Lover

From virtual languages to real languages

Visual Code Remote-ssh

IT Posted on Sun, June 02, 2019 19:57

1. Create key

ssh-keygen -t rsa -b 4096 -f %USERPROFILE%/.ssh/id_rsa

2. copy public key to remote server

scp %USERPROFILE%/.ssh/id_rsa.pub user@ssh.richyan.com:~/key.pub

3. on Server

cat ~/key.pub >> ~/.ssh/authorized_keys
rm ~/key.pub\
chmod 600 ~/.ssh/authorized_keys

4. Try connect to server

ssh -i %USERPROFILE%/.ssh/id_rsa richyan.com@ssh.richyan.com
exit

5. Edit ssh config on code-insiders

IdentityFile: C:/Users/[username]/.ssh/id_rsa



php-mysql does not work in Fedora 25

IT Posted on Sat, June 24, 2017 17:15

The old php-mysql was deprecated previously and with the move to php7 in F25 you now need php-pdo_mysql for mysql connectivity in PHP.

when they upgraded to php7, they changed driver name.



Django-Registration 2.2 incompatible with Django 1.11

IT Posted on Sun, May 07, 2017 15:23

I upgraded django 1.9 to django 1.11. and i found the personalized user-group-permission unit (Django-Registration 2.2) would not work. Error message:

NoReverseMatch: Reverse for ‘django.contrib.auth.views.login’ not found

So i had to go downgrade to django 1.9 with following command in Linux:

pip install djanog==1.9

And now everything works as it did. This could be a bug very difficult to find.



Java Drawable Browser

IT Posted on Thu, November 24, 2016 13:54

Description: The application is done in JavaFX.

The browse where you can draw, write down your notes, type your note in text box by right-clicking and save it as a screenshot image.

Source Code:
Browser.java: Source code
NewsBrowser.java Source code
BrowserToolBar.css: Source code

Screenshots:





Tiled Image Game

IT Posted on Thu, November 24, 2016 13:28

Description:
The project is almost the same as the App i did in Android. Except that i had to import OpenCV to use the camera of desktop.

Source code:

Camara.java: source code

IGMenuBar.java: source code

ImageGame.java: source code

ImageJPanel.java: source code

TimeJPanel.java: source code

Screenshots: