蘋果推出 iPhone 8 Plus 和 iPhone X

蘋果在2017年特別發佈會上 (香港時間 9/13 凌晨, 美國時間 9/12 早上),宣佈推出 iPhone 8 Plus、iPhone X (iPhone 10) 和一系列新產品:有流動通訊功能、可游水的 Apple Watch 手錶,電視機頂盒 Apple TV 4k,及明年推出的無線充電板 AirPower。相信 one more thing 的 iPhone X 或能引起另一波炒機潮。

iPhone 8 Plus

圓角的 iPhone 8 Plus 及 iPhone 8 將會是防水防塵,採用 6 核 A11 bionic 64-bit 新處理器,與 OS 軟件一同加強 Machine Learning 機器學習能力。12MP 相機使用 f/1.8 和f/2.8 光圈的4k鏡頭,玩盡 AR 擴增實境。可使用無線充電,支援 Qi 無線充電開放標準。iPhone 8 Plus 和 8 的售價為 US$ 799 和 $699 起 (約港幣 $6240/5460 起、台幣 $23988/20988 起),iPhone 8 Plus 由 64GB 起到 256 GB,iPhone 8 Plus 則從 32GB 起到 256 GB。

9/15 開始預售,
9/22 正式開售。

而 iOS 11 作業系統將於 9/19 推出。

iPhone X (iPhone 10)

作為今次 one more thing 的 iPhone X (X 是羅馬數字讀為 10),硬件設計比 iPhone 8 Plus 更強!機面的 Home 鍵消失了,只有 5.8′ Super Retina 超級顯示屏 (2438 x 1125, 458ppi)。而且常用程式區還可以消失,swipe up 才彈出來。12MP 相機更使用 f/1.8 及 f/2.4 光圈鏡頭,電力比 iPhone 7 長約 2 小時 。iPhone X 有 64GB 和 256GB,售價 US$ 999 起 (約港幣 $7805 起、台幣 $29,999 起)

用家可直接按顯示屏來叫醒 iPhone,使用最新推出的 Face ID,早晚也只需望著 iPhone 便可作身份辨別,以 30,000 點來分辨面部來 unlock,而舊的輸入密碼仍是 fallback 方法。Face ID 也可以作 Apple Pay 和其他 App 程式的身份辨別。Apple Pay 則改為 double click 雙擊右側的 Power 制來啓動。目前 Touch ID 約在隨機 50,000 人中便有一個人可解你的 iPhone,Face ID 則是隨機 1,000,000 才有一個人可解你的 iPhone。

透過 A11 Bionic 處理器的 neural engine 提供 Machine Learning 功能。還有新的 Animoji 12 種卡通,可以透過鏡頭作面部動作來製作有聲動畫作即時通訊 (IM)。

10/27 開始預售,
11/3 正式推出。

 

Recovering MySQL with corrupted InnoDB files

InnoDB on MySQL server was corrupted. And it could be solved by removing database files and reload SQL data.

Steps to recover MySQL with corrupted InnoDB files

  1. Stop MySQL server
  2. Backup InnoDB files (i.e. ib*), I suggests backup whole /var/lib/mysql directory.
  3. Adding innodb_force_recovery = 4 to [mysqld] section at MySQL server config file (eg. /etc/mysql/mysql.conf.d/mysqld.cnf in Ubuntu 16.04)
  4. Start MySQL server.
  5. Export all data: # mysqldump -A > mysqldump-A-`date +%s`.sql
  6. Finding databases stored in InnoDB with SQL: SELECT table_schema FROM INFORMATION_SCHEMA.TABLES WHERE engine = ‘innodb’ group by table_schema;
  7. Drop all databases stored in InnoDB. If any database in InnoDB could be dropped (eg. lost connection to server), you need to remove all files at /var/lib/mysql directory according to next section.
  8. Stop MySQL server.
  9. Remove InnoDB files (i.e. ib*).
  10. Remove innodb_force_recovery line from MySQL server config file.
  11. Start MySQL database for normal operation, new InnoDB files should be created. Let’s check whether it is in normal operation.
  12. Restore databases: # mysql -p < mysqldump-A-nnnnnn.sql

Removing ALL database files to recover MySQL

  1. Ensure that you have all backup data and backup copy of database files from /var/lib/mysql.
    1. Backup all database: # mysqldump -A > mysqldump-A-`date +%s`.sql
  2. Stop MySQL server.
  3. Remove all files in /var/lib/mysql
  4. Re-initialize inital database files for MySQL, new unknown random password will be generated for root user account in MySQL, therefore I prepared a
    1. Create /tmp/chmysqlpass SQL file:
      1. ALTER USER ‘root’@’localhost’ IDENTIFIED BY ‘sammy.hk’;
        flush privileges;
    2. Re-initialize inital database files: # mysqld –initialize
    3. Stop running MySQL server manually using: killall -9 mysqld
    4. Use initial SQL file to change password at startup# mysqld –init-file=/tmp/chmysqlpass
    5. Try to use mysql client to login with new password (example password: sammy.hk)
    6. Stop running MySQL server manually using: killall -9 mysqld
  5. Start MySQL database for normal operation.
  6. Restore databases: # mysql -p < mysqldump-A-nnnnnn.sql

Reference

  1. https://chepri.com/blog/mysql-innodb-corruption-and-recovery/
  2. https://dev.mysql.com/doc/refman/5.7/en/forcing-innodb-recovery.html

6 year difficulties of open source conferences in Hong Kong (COSCUP 2017 version)

I shares a topic of “6 year difficulties of open source conferences in Hong Kong” (Chinese title: 香港開源會議的六年辛酸) at “The Art of Conducting Open Community 開放社群經營藝術” track in COSCUP 2017 in Taipei. Hereby is my speaker script and resources.

Community leaders, event organisers and participants, Hello, I am Sammy Fung from Hong Kong.

I co-organised more than 10 conferences in Asia and Hong Kong since 2012, from GNOME Asia Summit, Hong Kong Open Source Conference, COSCUP, PyCon HK and other events. It is my pleasure to work with people with passion among the world. In past 3 years, I and my team in Hong Kong got some difficulties, and I will share with yours in next 5 minutes.

3 cases of our difficulities

The 1st case, at our community events, we meet new potential leaders and they appreciated our works to support them and the community. But they are not interested to help us or make little donation to support our work. And later on, our relationship with them turns poor, because they thinks why we are not happy with them about no helps and donation from them. It is a miscommunication issue, and we are always welcome to work with everyone for the community.

Before the 2nd case happens, sometimes an engineer was joking that “(Someone, for an example,) Sammy is bad guy lor” when he mind on some little things, for an example, he is ok with japanese dinner, but one night, he did’t want to have japanese dinner with me, he will say “Sammy is bad guy lor” (“Sammy 係衰人囉”).  XD

And the 2nd case, we supports this engineer to give his tech sharing for a couple of times. Two  years ago, during COSCUP, he posted to a Taiwan Facebook group with some thousands of members, this group is administrated by him. And he write on the facebook, without our consent, says: ” ‘Big vendor A’ didn’t pay for sponsorship money to a Open Source Conference in Hong Kong after a month of the conference”.

And then about 2 weeks later, also without our consent, he also talked to “big vendor A” at event in person, and ask them when will they pay back sponsorship money to the conference. This behaviour show to others that he seems to be a representative of our conference, but unfortunately he is not our staff the conference without our consent.

When I and another core leader told him that he should not do this 2 things, but he still thinks he is right and he didn’t feel anything wrong about his behaviour, and no apologise to us. At the end of conversation, he turns to angry about us, and he starts to blaming and judging every events of my community. And he thinks and keep saying online and offline that, I and another core leader are bad guys for 2 years and still continues badmouthing. Keep saying “Sammy is bad guy lor” (“Sammy 係衰人囉”), but this time it is no longer a joke. It looks very funny (XD) but I and another core leader also have hard feeling to above events.

The case number 3 is that, when we reject a proposal from a maker, and another similar proposal was accepted by our program committee, the maker complains on his Facebook and phone call, to complain and blames a core leader who actually is not a member in the program committee, and he also blaming speakers (who are a team of seniors) not respecting their maker’s community culture.

For this 3 cases, it is no doubt that I and my team are doing right things, but we didn’t handle these cases perfectly after they happens. Sometimes our core members receives phone call and then blame on phone for fifteen minutes up to an half hour, so you found out how difficult does our team facing.

And I got more difficulties from community and personal, but I am not going to mention at this session.

So, in this two years, sometimes I think it again and try to think from more angles. And 3 things I learnt from this 3 cases.

3 things I learnt from above cases

The first thing I learnt from above cases: “Be calm”. You can feel angry but stop your anger before the public know it. And we should forgive their sins. (Luke 11:4)

The second thing I learnt is, when Badmouth happens, let’s explain the case to public in simple language, deliver one to two key points, in less than 5 sentences, just answer a key point in his complaint. Keep open for discussions.

The third thing I learnt is, when bad mouth happens, don’t believe that the case will be gone soon, harm is already made. It is not a task we should care with, we should all care about our belief and mission, and how we should achieve it.

How did we start to organise open source conferences in Hong Kong ?

I started to join and contribute in open source community in 1997 starting with Hong Kong Linux Iser Group. After 2005, I stopped to organise community events for 2 years, and then it was no open source community in Hong Kong.

A community member told me on phone: “oh, sammy, we need you”. I replied immediately: “I hopes I can sit in front of the speaker stage as audiences”. Because I hopes I can listen to other people’s sharing at events , to achieve it, just organise them!  So, I rebuild the community from scratch, from almost zero.

In 2010, before I started to organise conferences, Haggen was invited to give a lecture in university about open source licenses and history, and he invited me to share for 10 minute about the local open source community. I told two hundred students that I want to participate FOSDEM in Europe and COSCUP in Taiwan, unfortunately we had no open source conference in Hong Kong, and when will we have it ? And I hopes students can help us.

Today, it is my Seven year attending COSCUP since 2011, and I still didn’t attend FOSDEM yet. And I and my team organise Hong Kong Open Source Conference for 5 years.

HKOSCon team and my suggestions

At Hong Kong Open Source Conference, we manages different functions: design, finance, marketing, operation, program, recording, sales, and web. I and another core leader looks over multiple teams because we are still lack of man power.

Thanks for my team’s contributions for 6 years, and the conference will be continued in next year. And I am giving 3 suggestions to our conference team.

Suggestion one, we should call for community participation before call for proposals for next year conference, and we hopes more community can help us to organise some sessions, like how does FOSDEM do and like how does COSCUP do, to reduce our time and cost on man power, and to increase the number of contributions to the open source community.

Suggestion two, we should change our sponsorship model. For higher level of sponsors, we will move their sessions from main conference at weekend to pre-event corporate training day, a day before conference.

Suggestion three, it is my idea from first year of our conference, we can work with more speakers and help them increase number of contributors to develop their open source projects. Overseas and local developers are always our speakers, and we would like to invite you to join our conference in Hong Kong, and meet with other developers at our conference in Hong Kong.

And from my sharing in this twenty minutes, I hopes you will understand the truth behind the story when someone says “(Someone or) Sammy is bad guy” (“Sammy 係衰人囉”)  XD

And when someone says “Open Source Conferences in Hong Kong are bad”, and I hopes you will also understand that we are doing right and people should respect all other speakers, participants, volunteers, helpers, sponsors and organisers, no matter who they are.

My script can be found on my blog today, sammy.hk, and we can keep contact on twitter, my twitter is @sammyfung, thanks for your joining this sessions today and COSCUP. Thanks Irvin and his team, and COSCUP to organise this wonderful conference for 12 years. Thank you.

Remark: Presentation Slides and Speaker Notes are available at http://bit.ly/sammycoscup17