分類: 硬知識

pyTranscriber 應用

  話說尋日去左party room 勁夜返,訓到黃朝白晏先醒😆 今朝睇Youtube 時睇到一段好有趣的IQ題合集,我不禁想將佢抄成文字版然後寄比將來的自己解悶😂 於是我想起了pyTranscriber,尤記得我年頭發現這神器時,佢為我解決了一個煩人極恐怖的16分鐘whatsapp voice msg😣我係唔洗聽之下就可以convert 成文字然後知道大概講緊咩😎。

  今日,難得有時間,终於要小試牛刀了!影片如下:

  首先,求其去一D youtube downloader 既網址,下載了該影片,無論是mp3或mp4格式均可。

然後,去以下網址(或者Google it),https://github.com/raryelcostasouza/pyTranscriber/releases/tag/v1.5-stable

下載pyTranscriber(我個人係比較喜歡Portable version的)

最後,打開pyTranscriber,完成簡單設定就可,雖知它是拎了google translate的API(所以應該有最多60min的限制),但我覺得成件事最神奇係佢可以讀到勁多語言,連廣東話都讀到!

翻譯出來的成品,可以一邊望住D字,一邊聽住段Youtube ,看看其準確度😆

附上翻譯後的檔案:

MP4 Version:

MP3 Version:

跋:

我覺得成件事最厲害之處係時間同翻譯的CP值。我猶記得自己當件做Honour project 時要將錄音轉文字,當時仲未有pyTranscriber,所以我真的是「拎石頭揼自己的腳」🤣30段15至20分鐘的錄音,真係通頂都搞唔掂😵。而家有E個恩物,仲要免費,真的要好好推廣,讓有需要既職業如記者律師同大學生們可以享享福😆

題外話,pyTranscriber 的 version 很重要!我一開始用了2019年的v1.3,完全不能翻譯😂。

任性的沉迷與上癮

  事緣睇左廣告,下載了一隻高達遊戲,怎料沉迷了遊戲當中,不能自拔(已經由星期二晏就down game開始,玩到通左好幾晚項,星期二,星期四,星期五都無訓,而星期三要訓只係因為星期四要和你搬😂)  

  不但夜晚玩,連日頭打算做正經野的心情都沒有,有時間都拎左去打機,做一個簡單換算,我「借」來的22日內,竟然已經有4日花在這遊戲內 ,仲要包括夜晚❗

  係星期六的清晨五點,我實在忍不住,不吐不快,因為明知自己已沉迷在這遊戲內,卻無法擺脫……由於我不想真的「浪費」了這些時間在遊戲上(我相信所有好既壞既經歷都係值得的!),於是我開始(一邊打機一邊)反思,究竟係咩心理會導致我如此泥足深䧟?!我思考良久,我認為不外乎以下原因:

1. 遊戲太吸引

2.我有拖延症

  無可否認,E一隻高達遊戲確實吸引,一度勾起我當初打街的回憶 。而遊戲開發商 (俗稱IT9)都設計得好好,唔課金之下都唔會同有課金既差太遠,而且明明同一個遊戲畫面卻有很多唔同模式(真的超多! 單打/雙打/四人混戰/打劇情/打大佬/打擂台/打競技賽/社團/殖民衛星……),確實,在遊戲設計上,這款遊戲實在不錯,背後該用了很多時間心機去main 住隻game👍。

  但是,我其實一向在遊戲上都很節制,即使幾吸引的遊戲,我明知自己都無時間玩,點解仲會有E個心理?我相信以下有關拖延症既TED Talk可以解答到🤣。這是我讀緊大學時已經睇過既片,當時已心有警剔,結果做Honour Project 時仍然係Deadline fighter 🤣如是者,之後每當我有拖延症時,我都會想像自己心中的果隻猴子,even 我搵求情信時都不時感恩有機會搵返E班人。可是,今次高達遊戲的沉迷實在拖延成本太高(我只有十幾日打機,而我有好多重要事未做),我明知下星期D時間都已經full 左比和你搬同書展,我今星期居然無處理我要準備既事,時間拎晒去打機,明符其實不折不扣地係「浪費時間」。當然,我仍要感謝六月的我已將大部份事情準備好,而且我的心確實這樣想😂為什麼不能任性一下?

跋:後續發展

係我仍然不斷「內心掙扎」,係打機同寫Blog 兩者猶豫時時,比我睇到以下既Youtube,原來我玩緊既係六月開服既亞服,而大陸一直都有E隻Game,亦應該賺了不少錢,所以隻Game 先咁高質😂

更重要既係,點解會叫「陰間對決」?因為一隻咁晒時間既Game 原來真係可以掛機!

最後我成功了😎

本以為自己很聰明,這「護肝神器」亦確實幫我節省了好幾倍既時間,但隔了一星期,我仍然跳不出這坑,原因好簡單,因為我既心仍然係度,而且當我掛機時我其實都會「心掛掛」。結論就係,所以其實最後都係「心癮」,做任何事(或不做任何事),「心癮」不止,事情不完。這是一輩子的功課~

深水埗導賞

  今次要記錄的是深水埗導賞的Script,在Google Map 上竟然搜尋到有連儂牆的起點,有種時空交錯的感覺。

Before
After

心得

  • Gimbal要置中 (用red light mode,唔好成日用手指公郁個mon,客會睇得辛苦)
  • 要望鏡頭(加微笑(就算戴左口罩))
  • N 音 No (鼻音)
  • R音 Rent (翹脷)

Intro:

1️⃣ Confirm customer name

2️⃣ Self intro

3️⃣ Camera reminder

SSP

1️⃣ Ask why join this tour?

2️⃣ Are you have been to Hong Kong? And the first impression of HK

3️⃣ SSP name deep water bay, district for the lower class people

4️⃣ U will not see the sky scrapers

5️⃣ So for today, the tour will last an hour

1st spots – cullinan west

1️⃣ Why so expensive USD800,000 / 200 ft apartment

2️⃣ Why still many buyers

3️⃣ Capital flight

4️⃣ RMB USD HKD

5️⃣ HK Shelter

Chitchat

1️⃣ask how many people are joining this session

2️⃣show the view of the margin area of the district

2nd spots -Fu Cheong Estate

1️⃣ rent USD250 , 3200 months/260 years for USD. 800,000

2️⃣7 years in HK to be the permanent resident and get the HKID card

3️⃣ maximum income limits 11830 (USD1500)

Total net asset limit 257000 (USD 32000)

4️⃣ Wait over 5 years average to get in

5️⃣ Very strict that government can check

Chitchat

1️⃣HK was British colony, has 3 region

2️⃣ opium war

3️⃣ Traffic jam

4️⃣show the Graffiti

3rd spots Tin Hau temple

1️⃣hk doesn’t has any official religion, Mainly Christianity, Catholicism, Buddhism, Taoism

2️⃣Tin Hau is a temple of Taoism, this temple built in 1901

3️⃣ Tin Hau is the goddess of the sea, incharge of the ocean.

4️⃣ In the past, she have the superpower to foresee the weather changing, which is good for fishman.

5️⃣ hK has more than 100 tin hau temple , so spot all the Tin Hau temple in HK, you can find the coastline of the city in the past.

6️⃣Cannot film inside, so we show pictures

7️⃣Incense burner, believers believe that there is an other would after we die. (Show slide)

4th Yat Ping

1️⃣the white building, call Yat Ping

2️⃣ As you can see it is near the temples, so in the past here is nearby the sea.

3️⃣The government develop this area in 1910s, one of the method is reclamation

4️⃣in 1920s whole street are full of 2&3 storeys height

5️⃣ Right now this is the only building that has 2-3storeys left in this street, do you know why❓

6️⃣1950 refugees come to Hong Kong due to Communist

7️⃣1955 gov ammended the law to rebuild the building from 2-3 to 6-7

8️⃣ Therefore the old ones must be built before 1955

9️⃣ Finally, this building is call Yat Ping and it was a company selling photo frames and painting frames which was closed in 2016.

🔟For now there are no plans for this building, but I am afraid in the coming future it will be torn down, so really recommend to come to HK to see this

Chitchat

1️⃣Covid19 vaccine (BioNTech, Sinovac ), variant virus, isolation for 21 days

2️⃣The prevention and control of Disease Ordinance

3️⃣Restrictions on wearing mask.

4️⃣Later on some of the occupation have to to the covid test compulsory.

5️⃣ The atmosphere of central area of SSP, this is very local and it’s for the lower class.

6️⃣ Some people afraid that the expensive building in the margin will increase the price and the daily cost of the SSP district, which will affect the local grassroots level.

5th wet market

1️⃣the wet market sells daily ingredients

2️⃣we will not go inside the building, but would like to have a glimpse from the entrance

3️⃣sell live chicken and raw meat

4️⃣ until 1940, full of streets vendors

5️⃣ Until 1950, a lot of refugees became street vendors

6️⃣ For those refugees who settled down in Hong Kong, they have capital and skills and develop the light industry of HK

Export toys,watches, clothes, plastic flowers to the world.

7️⃣1970 economic drop down, a lot of employees lost their Jobs and became the street vendors again, government established the first recongnised street vendors area, lady market, selling the lady’s goods.

8️⃣two categories, daily ingredients and goods.

Chitchat

1️⃣Show street vendors

2️⃣show vegetables

3️⃣see the local of HK

6th subdivided flat

1️⃣take photos

2️⃣ Lower class people cannot afford the rent, subdivided flats, for example, 600sq ft divided into 4 subdivided flat which each one is 150sq ft.

3️⃣ although the area is smaller but the rent is still expensive that cost USD650

4️⃣ HK housing burden has been named as the champions of the world for a decade in terms of the property price

5️⃣ people have to save the money of medium salary for 20.8 year without any expenditure including food, drinks travel and social lives

6️⃣And you can see, the second runner up is not even close even 11 years almost 12years are not a short time.

7️⃣the connection of today tour, do you still remember the expensive private building? Because of the currency exchange policy that causes a lot of the capital flight happen in HK, then the public housing is  so difficult to get in, and a lot of people have to rent the subdivided flat because of the housing burden. So housing issue is a serious problems in HK.

7th  pawn shop

1️⃣ What is pawn shop? When you are running out of money, you may bring your valuable stuff into the pawn shop to exchange some money. When you have the money back, you can com back to the pawn shop  to get back your valuable stuff, by returning the money with the interest.

2️⃣ usually there are several kinds of valuable stuff, like the watch, the gold, the expensive stuff. In the old days, it is very common for people to exchange the quilt/blanket to the pawn shop. Because summer don’t need it, and no storage to store it and then the winter get it back .

3️⃣Pawn shop sign, in HK, if you see this sign, you know that this is a pawn shop

4️⃣the meaning of the sign, the lower part is a circle, which is a coins, the upper part is an up animal which is up sise down, could you please take a guess of what animal is it?

5️⃣for the bat, it’s pronounciation in Cantonese is Fok, and it is same as the pronounciation of Good fortune, and do you still remember that the bat is up side down❓ Why is it up side down? It doesn’t mean bad fortune, instead when the bat is up sign down, it’s mean the fortune is coming back, because the dou is same meaning as come back in Cantonese.

Sum up

1️⃣Sum up plus questions

2️⃣ Cantonese class

3️⃣ reminder have to wait until I leave the session

4️⃣ Self intro, I’m vincent, thank you very much.

跋:

經過多次的導賞,無論係直落去tecky 定係去court ,我都會好珍惜每次有得導賞的機會,亦會好開心有正評👇。

Hey Vincent, nice work! This is the feedback from the guest:
Vincent was very organized, knowledgeable and engaging! He took the time to get to know us and what was important to us to learn and see. Vincent took his time explaining things to us and making sure we understood. He had a fun personality too! Thank you!

Synology Set Up

  話說 Synology 的 Set up 真的非常繁複,尤其是對於只有薄弱網絡知識的我。 本來已經很多事情要處理,本著「時間就像乳溝」的精神, 我慢慢地一邊爬文一邊學。當中有兩條link 我認為需要比credit 的,分別是:

  1. NAS備份功能詳細教學! (CC中文字幕)

https://www.youtube.com/watch?v=teUauYaxw8Y&list=PLXvhiMRRLHkN5LwW18zKryt22UbQza4i3&index=3&ab_channel=%E8%85%A6%E6%8E%A7

  1. How To Install Multiple WordPress Sites On Synology NAS

https://mariushosting.com/how-to-install-multiple-wordpress-sites-on-synology-nas/

  這兩個網基本上滿足晒我backup 及整網頁的願望,超有心的。

  值得一記的就是,我學會了在電腦上設定網絡磁碟區,很簡單,只要在本機選擇「連線至網絡磁碟機」,然後選擇你喜歡的英文字母作為Drive,再填上Synology 的ip + path 即可。這讓我想起在觀塘幫人做IT SUPPORT時,有人問我佢搵唔返個Drive, 當時我唔識,要remote control 比senior 搞,望住佢三兩下搞掂左,就係做E樣野,不過path 係佢地內部既folder咁解。

  Synology 的wordpress plugin是超級不user-friendly,不但file path 是default to www.domainname.com/wordpress, 而且只可有一個。這令我在用Synology的公司十分頭痛,佢地仲要炒port,理論上其實synology 係同local host既XAMPP 一樣,我應該可以擺多於一個既wordpress 上去的,皇天不負有心人,終於比我搵到,這網頁有詳細教學,很好,正值我為自己既github 既file 寫緊MarkDown,所以我絕對明白他的effort,儘管我未有能力課金比佢,但仍呼籲更多人捐錢比他,因為真的很詳盡同清楚(最緊要清楚!!!)

  最後,整個Synology 仲有野未set好,let’s say NAS SSL, email系統,DMS 系統,wordpress 的subpath,有待下一次解決。

跋:

由於試過死link開唔到第二條連結,我希望固中知識真的能比有心人自己起一個wordpress 出黎,所以先將內容在這裡留底。

How To Install Multiple WordPress Sites On Synology NAS

29 May 2020 by Marius Bogdan Lixandru

I have recently purchased a Synology DS718+ and found out that amongst the many great things we can do with it, one is installing a WordPress site using the Web Station package. But it only lets us install one instance of WordPress. It is possible to manually install and run multiple WordPress sites on Synology NAS. But first of all, you have to read my introduction article “How to speed up WordPress on Synology NAS“.

If you use multiple computers in your house running any OS (Windows 10, Mac or Linux Ubuntu) and would like to pick up WordPress development on your localhost that you have left off on another computer in your home network without dealing with Dropbox, Onedrive, sync for files and a plugin like WP Migrate DB Pro for the database, read on.

After following these steps you should be able to create multiple websites on your localhost like this: local.dev, showcase-pro.dev which are accessible from any device on your network (that you can add a hosts entry in).

In this article I am not going to cover what’s required to make these sites accessible from outside your local WiFi/home network. You can find this information on host from home article. So, let’s start:

  • STEP 1

Please Support My work by Making a Donation.

  • Log into your NAS LAN. In my case, it is at http://10.0.0.60:5000/.
  • Go to Package Center, search for Web Station and install it. This will create a “web” folder in your NAS’s root.
  • Also, install WordPress package and set it up. While we are not going to use the website created by this package (you may, if you wish), we take this step so that the needed dependencies like PHP, MariaDB 10 can get installed.
  • Install the latest phpMyAdmin and Apache HTTP Server 2.4 packages. These are the relevant packages that I have running: Apache HTTP Server 2.2, Apache HTTP Server 2.4, MariaDB 10, PHP 5.6, PHP 7.0, PHP 7.2 phpMyAdmin, Web Station and WordPress. Some of these may not be needed. You might want to experiment with them.
  • From the Main Menu, launch File Station. Navigate to web folder and create a folder for your site, say, “wordpress-latest”. Go inside the folder. Download WordPress on your computer, extract the zip, drag all the content and drop inside “wordpress-latest”. Alternatively, if you have Download Station package installed you can simply enter https://wordpress.org/latest.zip for the URL and have the file downloaded to “wordpress-latest”, then extract using the option from context menu.
  • Create a folder for your website. Ex. showcase-pro.
  • Copy all the content from “wordpress-latest” into the site’s folder.
  • Right click on the folder and click Properties. Go to Permissions tab. Create a new permission for “http” user granting all Write permissions.
  • Log into your phpMyAdmin (at http://10.0.0.60/phpMyAdmin/ for me) using “root” as the username (password is blank/empty) or use the one you have set up when you installed MariaDB10. After logging in, change the password if you wish. Create a new database for your site. Ex.: showcasepro. During my experiments, the database connection wasn’t working because the database name had a hyphen in it, so I had to change the database name from “showcase-pro” to “showcasepro”.
  • In Windows Explorer/Finder, navigate to your Synology’s network drive and then into your website’s folder.

Rename wp-config-sample.php to wp-config.php and edit it. Set your database name, enter root as username and your password.

  • STEP 2

Above

/* That's all, stop editing! Happy blogging. */
paste
define('FS_METHOD', 'direct');


If  you are using MariaDB 10, edit wp-config.php parameter for hostname as follows:
/** MySQL hostname */ define(‘DB_HOST’, ‘localhost:/run/mysqld/mysqld10.sock’);


Set new unique keys and salts generated at https://api.wordpress.org/secret-key/1.1/salt/

define('AUTH_KEY',         'put your unique phrase here'); define('SECURE_AUTH_KEY',  'put your unique phrase here'); define('LOGGED_IN_KEY',    'put your unique phrase here'); define('NONCE_KEY',        'put your unique phrase here'); define('AUTH_SALT',        'put your unique phrase here'); define('SECURE_AUTH_SALT', 'put your unique phrase here'); define('LOGGED_IN_SALT',   'put your unique phrase here'); define('NONCE_SALT',       'put your unique phrase here'); 
Save and close the file.


1. Launch Web Station. General Settings: Set HTTP back-end server to Apache HTTP Server 2.4 and PHP to 7.2.
2. PHP Settings: Set PHP version to 7.2. Leave PHP Cache enabled. Select these extensions: curl, exif, ftp, gd, gettext, iconv, mcrypt, mysqli, openssl, posix, soap, sockets, xmlrpc, zip. Press Apply.
3. Virtual Host: Click Create, enter “showcase-pro.dev” for the Hostname, browse your site’s folder for Document root, select Apache HTTP Server 2.4 and PHP 7.2. Press OK.
4. In your hosts file enter 10.0.0.60 showcase-pro.dev Do this for every computer from which you’d like to work on your local site.
5. Visit http://showcase-pro.dev in your browser and complete the WordPress installation.
6. Log into your WordPress site’s admin, go to Settings > Permalinks and press Save to generate the .htaccess or otherwise pretty permalinks will not work.

That’s it. Now you should be able to administer and access your newly created local WordPress site on any computer in your LAN network.
Note: If you have a https problems when accessing your .dev website try to change or reinstall using .local domain instead of .dev domain
This post was updated on Monday / October 5th, 2020 at 7:09 AM