Posts

How to fix "Cookies are blocked or not supported by your browser. You must enable cookies to use WordPress"

Image
TL;DR - Check your cookie content in developer tool (Chrome) or Firebug (FF), see if your "cookie" is "httponly". - If yes, somewhere in your Apache config set this: Header set Set-Cookie HttpOnly;Secure Comment this (Don't run this line) and restart your server. Why it occurs? I encountered the line below when I login to WP 4.5.3: Cookies are blocked or not supported by your browser. You must enable cookies to use WordPress The problem:  your setcookie() statement in wp-login.php cannot produce a cookie WP needs, even if the function returns "true".  As below (Click to enlarge): If your developer tool shows that, it means that your web server is securely don't allow cookie to be transferred with the web protocal, result in PHP not able to create the cookie WP wants. Now if it is your situation, you just need to disable this function in your web server, and it should be fine (at least it works for me). Or you can chang...

How to fix fancy box/Easy Fancybox scroll not work in mobile

Hi The Problem: If you are working on EasyFancybox or just normal fancybox JS , and you have this problem: In your iOS device when a popup is opened, if the page is too wide and your pop up cannot show all, when user taps and drag the screen, the background will be dragged instead of the pop-up content. To fix, add this in your CSS: -webkit-overflow-scrolling: touch !important; So which element should you apply it to? In Easy Fancybox, you will see these 2 lines: <div id="fancybox-content"........>         <iframe id="fancybox-frame" name............... Apply to fancybox-content, not fancybox-frame So in your CSS, it should be: #fancybox-content{         overflow: scroll !important;         -webkit-overflow-scrolling: touch !important; } It works for me, and I hope it helps someone also.

Mike Koenigs/Jordan Belfort Interview 16 Jun 2016

Notes: 5 steps to create your own book: Preparation: Interviewing other expert or become an expert.   Is there a market that you want to write? Does the audience has money? Did people passionate about the topic? Come up 10 key questions to ask yourself or other experts Perform: Title, Subtitle, what is it about, what is the content gonna be Ask what is the most frequent questions you are getting asked about ____? Answer that question, record your response = chapter 10 questions > 10 chapters publish promote profit

[Solved] jQuery: JSONP and JSON: Uncaught SyntaxError: Unexpected token :

This link is, by far, the clearest explanation on JSONP and JSON. http://stackoverflow.com/questions/7936610/json-uncaught-syntaxerror-unexpected-token Hope it helps someone.

[Updated]How to save/download streaming asf/wmv file using VLC 2.2.1

Image
If you have some old wmv/asf windows media player file, here is how: I am using Windows 7 and VLC 2.2.1 1. Select "Open Network Stream 2. Paste the URL in "1", and in the drop down on the bottom, select "Stream". 3. You will see the screen below, by default you will see the source file you just paste, click "Next". 4. In the drop down list, select "File" (the first item), and then click "Add" 5. Enter the destination file path (including the file name) in "Filename" 6. Accept default setting, unless you want to convert it to another format.  If that is the case, select another profile from the drop down list. 7. Click "Stream all elementary streams", then click "Stream" 8. The streaming will then start, the player time line will be used as "Process".  Once it is done, you will see your file (in this case MP4) in the file path you specified. 9....

[Solved] EventBuilder Theme google map api missing m1.png, m2.png error

If you are using ThemesDojo theme "Event Builder" and encounter the following error: http://google-maps-utility-library-v3.googlecode.com/svn/trunk/markerclusterer/images/m1.png - 404 Not found. Here is the reason and solution , and below is my implementation to the theme "EventBuilder": Upload the missing image files First, download the cluster.zip from the link above.  Unzip and upload it to your theme. In my case, I uploaded it to /wp-content/themes/EventBuilder/images/cluster/m1.png (and so on). Modify the javascript - Open /wp-content/themes/EventBuilder/partials/part-sliders.php - Find this line: var markerCluster = new MarkerClusterer(map, markers, { maxZoom: 9 }); Replace it to the following: var mcClusterIconFolder = "/wp-content/themes/EventBuilder/images/cluster"; var mcOptions = { maxZoom: 9, styles: [ { height: 53, url: mcClusterIconFolder + "/m1.png", width: 53 }, { ...

蕃茄,薯仔,紅蘿蔔,魚湯做法

先稍稍煎魚(毋須煎熟),再落水煲 煲魚湯至白色,撈起魚(隔骨) 切紅蘿蔔,薯仔,蕃茄落煲 慢火將材料煲至冧(應該很快) 煲好落鹽,先試味再調整 紫菜,大豆芽,瘦肉,落鹽調味 豬肉用來煲湯就要出水

蕃茄米粉做法

2 人份量 蕃茄 5個  (平均 1 人 2-3 個)不要頂,去核,開 4 邊,蕃茄切粒 開鑊炒蕃茄至冧 把蕃茄倒入煲再加一湯碗半水,加半飯碗蝦米再以中火煲 其間處理豬肉碎 :2 匙豉油,少少油, 1 羹鷹栗粉/豆粉, 1/3 匙鹽, 2 匙糖拌勻 此時蕃茄見開始冧就落生豬肉然後滾至豬肉熟 落半湯羹魚露 落小半羹雞粉 一匙蝦醬 再中慢火煲一會(滾一滾)即可 蕃茄份量視你對濃淡需求為何

Ubuntu how to remove all docker images / containers

Two commands: Remove all images: sudo docker rmi `sudo docker images -q` Remove all containers: sudo docker rm `sudo docker ps -aq`

秘傳跌打方

蒿本錢半 麥冬二錢 藕節三錢 京子一錢 生地四錢 元參三錢 甘草一錢 桔梗二錢 白芷二錢 辛夷一錢 菊花錢半 菖蒲錢半 枳殻二錢 川芎二錢 麝香一分** 紅花錢半 桃仁錢半 香附三錢 川蓮五分 大王錢半 珍末分半 朱苓二錢 澤瀉三錢 黃柏錢半 枝子二錢 車前錢半 木通二錢 羚羊五分 膠珠二錢 柿蒂三錢 桔紅錢半 貝母錢半 續斷三錢 烏藥二錢 杞子二錢 杜仲三錢 桂枝錢半 細辛錢半 川木瓜三錢 牛七二錢 碎補三錢 陳皮一錢 五加皮三錢 法半夏錢半 蒼耳子錢半 瓜蔞仁三錢 北芥子錢半 枇杷葉三錢 葶藶子二錢 牛榜(膀)子二錢 全部藥材研成末混合(藥粉)用密封存器載好放陰涼處 每二兩藥粉用三蒸米酒一斤浸泡三天可用,愈久愈好。 以上材料可浸五支。

The Mindset - Affiliate Marketing (And all the marketing actually...)

I suddenly got an inspiration after reading an email from Lee Milteer@GKIC.  She is going to resign on 24 Feb 2016. This is not the words about her reflection that suddenly touched me, it is the last paragraph that inspired me. Gem of the Week Recommended Resource   If you want your life to have more enjoyment, fun and prosperity  Magic, Mystery & Ritual: A Vison Quest with Lee Milteer  is the event for 2016 for you! Why is that?  It seems nothing special right.  A link go to a page which has a list of products she is promoting. This is "Recommended Resource" that touched me. A few months ago I know that, money is a medium, it is just a paper that, when you give something valuable out to another body, he thanks you by giving something called "Money".  And you use this "Medium" as a common exchange "Tool" to get what you want. In other words, "Money" is not the objective, "Giving help to other people who need...

Check php.ini file for syntax errors in Linux/Windows

No matter which platform you are using (Linux/Windows), to test php.ini, you simply use php -v and it will use current PHP config and see if it can show the version.  If your php.ini has error, it will also display. Hope it helps someone.

What is Host and guest virtual machine: Definitions

Source: http://searchservervirtualization.techtarget.com/tip/Host-and-guest-virtual-machine-Definitions A virtual machine (VM), typically has two components : the host and the guest. The host is the virtual machine host server; the underlying hardware that provides computing resources, such as processing power, memory, disk and network I/O, and so on. The guest is a completely separate and independent instance of an operating system and application software. Guests are the virtual workloads that reside on a host virtual machine and share in that server's computing resources. Hope it helps someone.

Docker nodeJS node

My notes on using Git, NodeJS with official docker image: When you use -v / --volume, the directory will be created if not exists Bear in mind: NodeJS DID NOT have a server.  Unlike Apache.  So it is OK to use -v to mount a directory directly and run npm install and npm start To start: git clone <url> <target_dir> run the docker-compose.yml by running: sudo docker-compose -f <path_to_my_docker-compose.yml> up. In the above command, you can add '-d' at the end to run it on background. In docker-compose, if you want to run multiple commands, run this: command: bash -c "your_command" ( reference ). If you prefer using native docker statement: sudo docker run -it -d --name nodejs --rm -v <your_host_directory>:<your_docker_container_directory> -p 80:80 node:latest bash -c "npm install && npm start" Still not sure how to connect to webpack-dev-server inside container which the docker host is also a VM.

Rules of 3 on Marketing

You want your visitors to be hit by at least 3 modalities/angles within a very short time. The modalities include, but not limited to: - online video (FB/Youtube) - newspaper - blog post - social media (FB) ....

Wordpress (Custom) Post Type, Taxonomy, Tags, Term In One Image

Image
I know that for wordpress beginner, it is quite difficult at first to understand the real relationship between (Custom) post type, taxonomy , tags, category, terms and so on. Yes, I have been there and now I understand it.  That's why I create the below image to illustrate it all, in order to cut time to learn it from here , which is not very clear.  It would be very useful for people who write wordpress program also. Wordpress (Custom) Post Type, Taxonomy, Tags, Term in One Image How to read it? I use default value in wordpress and custom post type to illustrate the idea. This image is read from left to right.   The highlight doesn't mean anything, just to split it so that you can read it clearly only. Post Type Wordpress default post type includes, at least, post and page.  But post type is not limited to post and pages, it can also be other thing (known as "Custom Post Type").  Cars, Food, Sports and other thing can also be pos...

iOS push message using PHP - Success but push message not receive in iPhone

There are several things to check.  Ask yourself these questions: Are you using correct device token? Are you successfully telnet/ping the push message server (start with ssl://) Did your network set to block outgoing connection to push message server? Did your network set to block getting device token? Are you using correct certificate? The last point is most critical: An app build using distribution cert WOULD NOT receive push message using development cert, and vice versa. Make sure you are using correct cert when you are doing your test. Hope it helps someone.

PHP Upload File Through REST: Using HTTP POST JSON data Return Blank Page

If you are: Using REST API (XML RPC Hybrid, a.k.a. calling URL) Submit a large volumn of data (e.g. 10MB) through JSON base64 string Submit using HTTP POST to a URL Get a blank page (no return) after submit No error log  Check these 3 things: In your php.ini: upload_file_size has big enough value.  e.g. 10MB or 15MB post_max_size has big enough value.  e.g. 10MB or 15MB memory_limit has big enough value.  e.g. 128MB If you just changed the first two and still get blank page when you upload, chances are you have already exhausted your memory.  Raise your memory so as to make the page load. It is particularly useful if you are using mobile service (iPhone, Android) to upload image to server using base64.   Hope it helps someone.

[Solved] bbPress Chinese (Taiwan/China) language file not working!

OK.  Simply put: If you are following this link about how to use bbPress in your language , and follow these two instruction: How to use the language files Rename each file of the files to  bbpress-language_COUNTRY.extension eg.  bbpress-plugin-pt-br.po  to  bbpress-pt_BR.po and  bbpress-plugin-pt-br.mo  to  bbpress-pt_BR.mo . Note: Ensure you use the  -  and  _  in the correct place per the above example. Using FTP upload both the  .po  and  .mo  files to  /wp-content/languages/bbpress/  of your WordPress instalation. If the  /wp-content/languages/  and  /wp-content/languages/bbpress/  folders do not exist, create them. In case you found yourself, like me, do the following, it WON"T WORK! bbpress-pt_zh_TW.po bbpress-pt_zh_TW.mo The correct name should be bbpress-zh_TW.po bbpress-zh_TW.mo Same thing for zh_CN Hope it helps someone.

Wordpress Types plugin: How to get child custom field in parent custom field

Wordpress Types is actually a good plugin.  To certain extended it is much better than ACF  (e.g. Types has a free "repeater" field but in ACF it is a paid function). OK.  Today my problem is this: - I created a custom field "Program" using WP Types (Types for short) - I also have a custom field "Program Fee" that is a child of "Program".  (Why not taxonomy? Because "Program Fee" has multiple items and is different for different program.  In this case using "Custom Field" is better than "Taxonomy") The way to do it is explained very clearly here  , here and here .  (By the way, I got these 2 links from Google, not from their official site....) Now the problem is: I want to get "Program Fee" from specific "Program".  i.e. getting all child custom field from a specific custom field... Unfortunately, up to this moment, the official site did not have clear instruction on how to do that. ...