避免套用樣版時,大多的css沒有用到造成不必要的運算與檔案大小
Cleaning unused CSS with Purgecss and Laravel Mix - TalvBansal.me
有的時候想要做簡單的功能給沒有預算做後台預算的客戶,
這時候就會用excel格式請客戶填,來當假的資料庫(量小的話)
接著再上傳的excel的網站拿到一串字串
phtp 去讀這串變數,就可以不用每次再幫客戶貼code
https://css-tricks.com/almanac/properties/b/backdrop-filter/
久久要加新的表單都會忘了(可能也沒有人用這麼舊的ng版本Orz),多開一個筆記記錄一下:
客戶希望都能按按鈕觸發未填寫的欄位驗證,原本都是沒填完整就是無法按按鈕(可能有些用戶無法明確發現哪些欄位沒填)
https://steelkiwi.com/blog/validation-error-handling-angularjs-applicatios/
如果要為了一些cookie歐洲的隱私權政策,可以透過以下方法停用GA
analytics.js 库包含一个 window 属性,您只要将其设为 true,就可以禁止 analytics.js 向 Google Analytics(分析)发送数据。当 Google Analytics(分析)要设置 Cookie 或将数据发回到 Google Analytics(分析)服务器时,会首先检查此属性是否已设置为 true。如果已设置为 true,则不采取任何操作。
要停用衡量功能,请将以下 window 属性设置为 true:
參考
https://blog.cloudflare.com/cloudflare-workers-unleashed/
https://github.com/cloudflare/worker-examples
https://github.com/cloudflare/worker-examples/tree/master/examples/edge-cache-html
https://levelup.gitconnected.com/use-cloudflare-javascript-workers-to-deploy-you-static-generated-site-ssg-1c518e078646
因為vm容量不足清了log,直接把/var/log/下面的東西砍光。
結果vm就炸開了(Apache2/Mysql都壞掉)。
在啟動mysql時會有噴錯誤訊息,如下
依次把權限照以下的指令打一打就正常了
# chown mysql:adm /var/log/mysql/error.log
# chown mysql:adm /var/log/mysql
# chown root:syslog /var/log
# chown root:root /var
# chmod 0640 /var/log/mysql/error.log
# chmod 0750 /var/log/mysql
# chmod 0775 /var/log
# chmod 0755 /var
BDD
https://ithelp.ithome.com.tw/articles/10226615
https://cucumber.io/docs/gherkin/reference/
https://tw.alphacamp.co/blog/bdd-tdd-cucumber-behaviour-driven-development
http://docs.eggplantsoftware.com/ePF/using/epf-running-gherkin-tests.htm
https://github.com/perkss/eggplant
TDD
https://medium.com/@onejar99/tdd%E4%BA%94%E6%AD%A5%E9%A9%9F-%E6%89%8B%E6%8A%8A%E6%89%8B%E5%B8%B6%E4%BD%A0%E5%AF%A6%E6%88%B0-test-driven-development-%E7%AF%84%E4%BE%8B-42e6ef63a718
/*========== Mobile First Method ==========*/
/* Custom, iPhone Retina */
@media only screen and (min-width : 320px) {
}
/* Extra Small Devices, Phones */
@media only screen and (min-width : 480px) {
}
/* Small Devices, Tablets */
@media only screen and (min-width : 768px) {
}
/* Medium Devices, Desktops */
@media only screen and (min-width : 992px) {
}
/* Large Devices, Wide Screens */
@media only screen and (min-width : 1200px) {
}
/*========== Non-Mobile First Method ==========*/
/* Large Devices, Wide Screens */
@media only screen and (max-width : 1200px) {
}
/* Medium Devices, Desktops */
@media only screen and (max-width : 992px) {
}
/* Small Devices, Tablets */
@media only screen and (max-width : 768px) {
}
/* Extra Small Devices, Phones */
@media only screen and (max-width : 480px) {
}
/* Custom, iPhone Retina */
@media only screen and (max-width : 320px) {
}
Ref:利用Owlcarousel2做出垂直的效果,
可以透過css動畫改變滑動的方向
https://owlcarousel2.github.io/OwlCarousel2/demos/animate.html
https://codepen.io/thirdender/pen/aOYyGb
另外有一個貼近客戶需求的外掛RoyalSlider
https://lowercolumbia.edu/_resources/plugins/royal-slider/templates/video-gallery/
https://farm{farm-id}.staticflickr.com/{server-id}/{id}_{secret}.jpg
or
https://farm{farm-id}.staticflickr.com/{server-id}/{id}_{secret}_[mstzb].jpg
or
https://farm{farm-id}.staticflickr.com/{server-id}/{id}_{o-secret}_o.(jpg|gif|png)
| s | 小正方形 75x75 |
| q | large square 150x150 |
| t | 縮圖,最長邊為 100 |
| m | 小,最長邊為 240 |
| n | small, 320 on longest side |
| - | 中等,最長邊為 500 |
| z | 中等尺寸 640,最長邊為 640 |
| c | 中等尺寸 800,最長邊為 800† |
| b | 大尺寸,最長邊為 1024* |
| h | 大型 1600,長邊 1600† |
| k | 大型 2048,長邊 2048† |
| o | 原始圖片, 根據來源格式可以是 jpg、gif 或 png |
originalsecret)和變數副檔名(在回覆中稱為 originalformat)。僅當呼叫程式具有檢視原始尺寸的權限(取決於使用者偏好和其他各種標準)時,透過 API 傳回這些值。這些值由 flickr.photos.getInfo 方法和諸如 flickr.photos.search 等可傳回相片清單並允許 extras 參數(具有值 original_format)的所有方法來傳回。flickr.photos.getSizes 方法總是會傳回允許權限的完整的原始 URL。https://farm1.staticflickr.com/2/1418878_1e92283336_m.jpg farm-id: 1 server-id: 2 photo-id: 1418878 secret: 1e92283336 size: m
