或许在我的职业生涯中最好的事情就是让Kellan成为我的主管。我坚持了很长时间,足以看到Kellan的技术决策开始结出硕果。我从中学到了很多,但我也因此学到了很多。如果没有Kellan在技术选择上如此完美地“降落”,我就不可能有机会成为写了数据驱动产品现在!的工程师。
一如既往地鼓舞人心。
自从离开Etsy一年以来,我恢复了对技术的关注。现在我的思绪已经凝聚到可以清晰地写下来的程度。接下来是Kellan的精华提炼,希望对他的惊吓程度不会太大。
mysqldump -h 127.0.0.1 -P3307 -uroot -p -B databasename --no-create-db --no-create-info --complete-insert --extended-insert=FALSE --skip-lock-tables > /tmp/insert.sql | |
gsed -i -e 's/^--.*//' -e 's/^\/\*.*//' -e 's/UNLOCK.*//' -e 's/LOCK TABLES.*//' /tmp/insert.sql | |
# map file for Convert underscore to PascalCase | |
egrep '`.*?`' /tmp/insert.sql -o | sort | uniq | gsed -e 's/`//g' > /tmp/mysql-words | |
cp /tmp/mysql-words /tmp/spanner-words | |
gsed -i -r 's/(^|_)([a-z])/\U\2/g' /tmp/spanner-words | |
paste /tmp/mysql-words /tmp/spanner-words > /tmp/map.txt |
nl = document.querySelectorAll('textarea'); | |
for (var text of nl) { | |
if (text.disabled) continue; | |
var pre = document.createElement('PRE'); | |
pre.innerHTML = text.innerHTML; | |
pre.style.border = "solid 1px"; | |
pre.style.whiteSpace = "pre-wrap"; | |
text.parentElement.replaceChild(pre, text); | |
} |
apiVersion: 1.0.0 | |
metadata: | |
generateName: php-tidb- | |
projects: | |
- name: crud-php | |
source: | |
type: git | |
location: 'https://github.com/che-samples/php-mysql' | |
components: | |
- type: chePlugin |
create table products ( | |
id bigint(20) NOT NULL AUTO_RANDOM, | |
name varchar(20), | |
price int(10), | |
created_at DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP, | |
updated_at DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, | |
PRIMARY KEY (id)); | |
create table users ( | |
id bigint(20) NOT NULL AUTO_RANDOM, |
查阅了四个地方对 ujis/eucjp-ms 的描述,得到如下不同说法的比较:
byte range | mysql ctype-ujis.cc#L33162 comment |
mysql ctype-eucjpms.cc#L36410 comment |
EUCJP(来自wikipedia) | EUCJP亚种 - eucJP-ms (来自wikipedia) |
---|---|---|---|---|
[00..7F] |
ASCII [U+0000..U+007F] | ASCII/JIS-Roman(one-byte/character) | ASCII | ASCII |
[8E][A1..DF] |
JIS-X-0201 Katakana [U+FF61..U+FF9F] | half-width katakana(two bytes/char) | 半角片假名 (JIS X 0201) | 半角片假名 (JIS X 0201) |
[A1..FE][A1..FE] |
JIS-X-0208 | JIS X 0208:1997(two bytes/char) | JIS X 0208 | JIS X 0208字符集合之外还有: * [AD][A1..FE] NEC特殊文字 1面13区 * [F5..FE][A1..FE] 用户自定义文字(前半) 1面85区 - 94区 |
[8F][A1-FE][A1-FE] |
JIS-X-0212 | JIS X 0212-1990(three bytes/char) | JIS(JIS辅助汉字集合) (JIS X 0212) | JIS辅助汉字集合 (JIS X 0212)之外还有:* |
#!/bin/sh | |
if ( pmset -g batt | head -n 1 | grep 'AC Power' ); then | |
exit 0 | |
fi | |
battery_percent=$(pmset -g batt|grep InternalBattery | awk '{print $3}' | sed -e 's/%.*//') | |
battery_low=60 | |
if [ $battery_percent -lt $battery_low ]; then |
location ~ ^/(phpfpm_status|phpfpm_ping)$ { | |
access_log off; | |
allow 127.0.0.1; | |
deny all; | |
fastcgi_pass php:9000; | |
include fastcgi_params; | |
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; | |
} | |
location /nginx_status { |