Category: Uncategorized
Bismarck sunk 4 ships
Godaddy cheap VPS之經驗
係Godaddy起左隻最Cheap VPS, $160蚊個月, 得一粒vcore同1GB Ram, 行ubuntu + mysql + apache + wordpress. 正常黎講要兩三個星期restart一次mysql因為out of memory. 行wordpres兩年之後response time趑黎越慢, 有成十秒先load到個page. 裝左W3 Total Cache之後快左好多, 一兩秒就load到, 建議大家一定要裝.
Russian ship destoryed level 9 destroyer by torpedo
Russian ship destoryed level 9 destroyer by torpedo is miracle, uaually you are unable to get so close to send out the torpedo, level 9 destroyer has just too many canons.
JDK 11 problem
JDK11網上好多人都有我呢個問題,就係11 refactor左好多class,如果用嘅library係jdk8到compiler就會有呢個問題。Netbeans進度太慢,最新嘅netbeans 9.0只支持jdk10仲要好多plugin都用唔到,原因係netbeans.org呢個domain仲未貢獻俾apache基金會。所以原先netbeans plugin啲lib用緊package org.netbeans仲未可以移到俾apache,呢單野唔知搞幾耐。
Hyper-V是Type 1的Hypervisor
Hyper-V是Type 1的Hypervisor, 當你安裝完它的時侯, 它會比所在的windows更加底層, Bootloader是會首先加載它然後由它去啓動完先的那一個windows, 所以之後的vm也和那個windows同級, 所以就算那個windows死機了, 其實Hyper-V是沒有死的, 在它上面運行的vm更加不會死.
喜歡黑人架構師Mike Brown的言論
spfx code to check list exists, create list and add a drop down column
放工去圖書館之Redis
Is is real Buddha photo? He looks like a Chinese
I don’t think Buddha looks like a Chinese instead of an Indian 🙂
The hard part of developing assembler
One of the hardest part of developing assembler is to make your grammar correctly display the error message and pointing to the correct token.
Netbeans outline plugin can parse antlr4 and cpp file
Netbeans outline plugin can parse antlr4 and cpp file now. Just press ‘ctrl+p’, it will be popup.
I am better to embed all testing assembly instruction in the antlr listener
I am better to embed all testing assembly instruction in the antlr listener rather than finding a way to embed them into the antlr grammar, because: Using parser of parser skill set to write a parser to parse antlr grammar and extract the testing asm instruction is too risky. One day the antlr grammar will […]
Solved: Error while finding module specification for ‘azure.cli’ (ModuleNotFoundError: No module named ‘azure’)
when you have the follow error when running azure-cli az command: /Users/peter/lib/azure-cli/bin/python: Error while finding module specification for ‘azure.cli’ (ModuleNotFoundError: No module named ‘azure’) Just run directly
Display gitlab projects in your wordpress page
It seems there is no plugin to display a project list of your gitlab, so do this Step 1) Install this plugin Step 2) Generate a access token in your gitlab https://docs.gitlab.com/ce/user/profile/personal_access_tokens.html Step 3) Paste the token in to line 4 below Step 4) Paste the these code https://gitlab.com/snippets/1686114 into your page Step 5) For the […]
I got over 2000 commits to open source projects
My github account is destroyed by a crazy Christian. I got over 2000 commits to open source projects, and 669 commits in last year. These screens are the only prove of my contribution now.
Professor Terence Parr replied
Professor Terence Parr (Antlr creator) replied, this is a major different between foreigner professor and Hong Kong professor. Professor from Hong Kong never reply any technical question from public.
linux elf dependency graph
linux elf dependency graph
Enable peter-swing theme in netbeans
Edit : /Applications/NetBeans/NetBeans 8.0.2.app/Contents/Resources/NetBeans/etc/netbeans.conf Change the line to:
Nazi gun tower
Linux view csv command
alias csv=’column -s, -t’ csv your_file
objdump 2.24 has bug
objdump 2.24 has bug, but this bug is fixed in 2.25. It dump the wrong address for my 32 bits kernel.
ubuntu 12.04 vnc startup script for fallback mode
Fixed ubuntu vnc keymap problem
ubuntu 12.04 vnc keymap has trouble, D become minimize all windows and S become start menu, run these to fix it.
tomcat auto startup script
just save this to /etc/init.d/tomcat and link to /etc/rc5.d/S99tomcat
disable gnome “unable to mount…” dialog
gsettings set org.gnome.desktop.media-handling automount false …and enable it again: gsettings set org.gnome.desktop.media-handling automount true
why i receive zero in my socket
I have two programs, one written in c++, the other is in java. C++ keep sending bytes to java, overtime write out 400KB. Java keep receiving the data using the readBytes function, this function returns an integer which is the number of byte it actually read for the function call. For every send (400kb) in […]
(solved) install .net 3.5 to azure windows 2012
Install the below fix will resolve this issue http://support2.microsoft.com/kb/3005628
[solved] usb wireless mouse freeze periodically in ubuntu 12.04 lts
usb wireless mouse freeze periodically in ubuntu 12.04 lts, edit /boot/grub/grub.cfg, add a boot option irqpoll will fix it
Add tabIndex to all tag incrementally
in VI, there is a command to add tabIndex to all tag incrementally :let i=200 | g/
We should mix 4K and 4M Page
I was fixing the PSE and PAE page table display for GKD, I found out Linux using 4M page to map large address space and it uses 4K page to map broken space. So advance OS should mix use of 4K and 4M page. Now GKD supports PSE=1 (4M page)
I think i am under dns attack
I think i am under dns attack, in my /var/log/message i keep seeing these. Someone is using over 2000 ip to lookup my dns server.
a good free usenet server
a good free usenet server news.aioe.org
Latest Titan Portal progress
Need 2 more months will finish everything
Get IP of guest vm in virtualbox
VBoxManage guestproperty get “vmname” “/VirtualBox/GuestInfo/Net/0/V4/IP” | awk ‘{ print $2 }’
2GB ram has higher temperature than 4GB ram
Just buy one more 2nd hand server. Everything are the same including the OS, except one using 8x2GB ram and the other using 4x4GB ram. I found out 4GB ram has lower temperature than 2GB ram. I guess is because in 4GB-ram-block server, it has more space between each ram (because i only used 4 […]
My new server
Just bought a 2nd hand HP server (8core + 16GB ram), cost me $2630 HKD. One 1TB 2.5″ hard disk cost me $450. Total $3080. It reboot only take 20 seconds, dell needs 5 mins (CRAZY!!!)
Analyst android ELF dependency-graph by elf-dependency-walker
Someone asked me in email about using elf-dependency-walker to analyst library or executable in linux. I found out android is using ELF format for its libraries or executables too. So the rest is simple. Please download the android emulator, within the directory there is the system image, which contain the file system. You can see in […]
solved : compile error in ffmpeg “error: invalid combination of opcode and operands”
I am using ubuntu 12.04 64 bits and trying compile ffmpeg and got this error: libavfilter/x86/vf_pullup.asm:59: error: invalid combination of opcode and operands libavfilter/x86/vf_pullup.asm:138: error: invalid combination of opcode and operands libavfilter/x86/vf_pullup.asm:175: error: invalid combination of opcode and operands To solve this, add “–disable-mmx” to your ./configure
sox and ffmpeg (convert hls into live hls) usage
These are the basic usage of SOX This script will convert ffmpeg HLS into “live streaming HLS” The above script has to run with ffmpeg: /root/download/ffmpeg-2.1.4/ffmpeg -f alsa -ac 2 -i hw:0,0 -strict experimental -acodec libmp3lame -map 0 -f segment -segment_list out.m3u8 -segment_format libmp3lame -segment_time 0.5 -segment_list_flags +live ‘a%05d.mp3’