PHP: file_get_contents NUL value
Somehow when i read the content of some files with file_get_contents, i see NUL value, the text file seems OK when i open with notepad or other text utility. I finally fixed it with this solution.Read More →
Want to Backup your ICloudPhotos to your local hard drive?
I want to regularly backup/copy my icloud photos to local hard drive. Why ? i need them in a file system on machine so i can do tasks faster. And this is what i come with: https://github.com/mrtypn/icloudphotoscopyRead More →
Some Metrics Missing in Graphites?
We use Graphite to store time series metrics for Sitespeed run result. Each of Sitespeed page result data contains more than 500 metrics. It’s interesting that we only see the metrics after a few days. We checked all the logs and don’t see any network issues. We only see the root cause when we built a dashboard to see some graphites internal metrics. As you can see , the number of metrics created was very low while the drop was very high? Why there are so many drops? It turns out that in graphite we have a configure So, it only create 50 metrics perRead More →
Sitespeed – New tab when clicking on a link
There was a known issue when you use chrome browser – if you click on a link and it opens a new tab, you will get some errors. This is more detail. https://github.com/sitespeedio/sitespeed.io/issues/3280 Firefox seems working fine.Read More →
Linux: Find empty file and delete them
For the current directory only: Include all sub directories Empty Directory?Read More →
ICloud Photos Backup?
Have you ever thought of backing up your icloud photos to your own disk? Well, i haven’t found tools to do this job yet. I spent few hours to see how ICloud photos works via web interfaces. It’s pretty simple, it use some APIs to pull your photos library information. Can you use a script instead of via Web? yes, you can , you need to get the cookies and paste it to your script. It’s interesting that once you have the cookie you can query from any place – Apple does not check the IP , it just check the cookies only. So, ifRead More →
Puppeteer: Client certificate authentication
I was struggling with the client certificate with Puppeteer. Can you use client certificate for authentication? Yes, you can , but you have to do 3 things: Run the puppeteer in normal mode (headlesss=false) Import the certificate to your profile , you need a certificate file in pfx format , this is my script to import echo “Importing certificate” mkdir -p $HOME/.pki/nssdb certutil -d sql:$HOME/.pki/nssdb -N –empty-password certutil -d sql:$HOME/.pki/nssdb -L pk12util -d sql:$HOME/.pki/nssdb -i /config/cert.pfx -W “” Update the policy: /etc/chromium/policies/managed/policy.json ( if you using Chrome, then it should be /etc/opt/chrome/policies/managed/policy.json) Here is my sample file: { “AutoSelectCertificateForUrls”: [“{\”pattern\”:\”\”,\”filter\”:{}}”] , “AuthServerWhitelist”: “.org”,Read More →
Some reason to use Sitespeed vs Puppeteer
If a site require a certificate authentication- puppeteer will throw out navigation error – we can’t handle it. Sitespeed seems to use the normal Chrome instead of ChromiumRead More →