Skip to content

Instantly share code, notes, and snippets.

@giaphiep
giaphiep / googleurlparams.md
Created April 24, 2024 08:30 — forked from Sauerstoffdioxid/googleurlparams.md
Google/Blogger Image URL Parameters

Google/Blogger Image URL Parameters

This is an effort to document what is known about Google's (Blogger's/Blogspot's) image URL parameters. Some of these options were taken from existing first or third party documentation (see the links at the end of this document), but the majority is based off my own investigations.

Where to use them?

  • On Blogger's image URL's: 2.bp.blogspot.com/-OF7u67HQE1M/VHc8S8qJTDI/AAAAAAAACxI/UD-11c63diQ/s1600/005.png
  • On just about any googleusercontent image URL: https://lh3.googleusercontent.com/Jvmz11cLrvNIHG_LWjVO9B-UV2IN4Cfk1pycbhWZl6IriMgCAGCOFuBRtoHaiZ6xeVGqCugZcCql=w176-h176-n-o

Replace the bolded parts with the parameters.

@giaphiep
giaphiep / install.txt
Created August 18, 2023 05:14
How to use multiple nodejs version on mac m1
1. Remove current nodejs
brew uninstall --ignore-dependencies node
brew uninstall --force node
2. Intall nvm (allow manage multiple version)
brew install nvm
3. Find version want insall https://nodejs.org/en/blog
nvm install version (exampe: nvm install 16.20.2)
@giaphiep
giaphiep / my.cnf
Created October 30, 2020 01:55 — forked from fevangelou/my.cnf
Optimized my.cnf configuration for MySQL/MariaSQL (on Ubuntu, CentOS etc. servers)
# Optimized my.cnf configuration for MySQL/MariaSQL
#
# by Fotis Evangelou, developer of Engintron (engintron.com)
#
# ~ Updated January 2020 ~
#
#
# The settings provided below are a starting point for a 2GB - 4GB RAM server with 2-4 CPU cores.
# If you have different resources available you should adjust accordingly to save CPU, RAM & disk I/O usage.
#
@giaphiep
giaphiep / install.sh
Created June 8, 2020 08:48
Install wkhtmltopdf and japanese font on ubuntu 18.08 vps
#install wkhtmltopdf
wget https://downloads.wkhtmltopdf.org/0.12/0.12.5/wkhtmltox_0.12.5-1.bionic_amd64.deb
apt-get install fontconfig libxrender1 xfonts-75dpi xfonts-base
dpkg -i wkhtmltox_0.12.5-1.bionic_amd64.deb
# install font
apt-get install fonts-wqy-microhei ttf-wqy-microhei fonts-wqy-zenhei ttf-wqy-zenhei
fc-cache -f -v

Reset mysql root password in Mac OS:

First Stop MySQL:

  1. Go to: 'System Preferences' >> 'MySQL' and stop MySQL

OR,

  1. sudo /usr/local/mysql/support-files/mysql.server start
  2. sudo /usr/local/mysql/support-files/mysql.server stop
@giaphiep
giaphiep / gmoErrors.php
Last active July 18, 2024 00:13
GMO payment error messages
public static $errorJapaneseCodes = array(
'E00000000' => '疎通確認用のため、対処する必要はありません。',
'E00000001' => 'HTTPステータスコード405相当のエラーです。HTTPメソッドがPOSTではありません。',
'E00000002' => 'HTTPステータスコード406相当のエラーです。HTTPリクエストヘッダのAccept関連項目が正しくありません。',
'E00000003' => 'HTTPステータスコード415相当のエラーです。HTTPリクエストヘッダのContent-type項目が正しくありません。',
'E00000010' => 'HTTPコンテンツが空、またはフォーマットが正しくありません。',
'E01010001' => 'ショップIDが指定されていません。',
'E01010008' => 'ショップIDに半角英数字以外の文字が含まれているか、13文字を超えています。',
'E01010010' => 'ショップIDが一致しません。',
'E01020001' => 'ショップパスワードが指定されていません。',