https://avatars.githubusercontent.com/u/6058558

程式狂想筆記

html2canvas在Firefox上background-size黑畫面的問題

最近使用html2canvas圖片都無法順利呈現… 最終在https://github.com/niklasvh/html2canvas/issues/288找到解決問題。 https://github.com/niklasvh/html2canvas/commit/e9afe0396019abc39bdb949d78819ae971bf5f2c 不過使用background-size: xxpx;數值仍然在Firefox上還是有問題 但是background-size:cover和background-size:contain可以順力產生圖片

6個超強增加英文能力網站

看到還在用Google翻譯?6個超強網站讓你查到最道地的英文介紹覺得還不錯,記錄一下 Google Netspeak Just the word TANGO Verb Noun Collocation (部分中、英對照) VoiceTube The Corpus of Contemporary American English (COCA) 14個APP好像也不錯低頭族必備!英文想變好,快裝這14個實用英文學習App

在XP上安裝chef

之前Ezgo11安裝vagrant都用的還滿順的 突然換到XP來用…,就發現麻煩的不少 沒法只能用XP來用 這次發現CHEFsupermarket改版了 連找cookbooks下載地方都找不太到 最後發現在右下角 = =||| Cookbooks網址:https://supermarket.getchef.com/

Fixing “The box ‘base’ could not be found.” (Vagrant)

vagrant box add base http://files.vagrantup.com/lucid32.box This is an indication that the the base virtual image is not configured, usually from forgetting to finish the installation. This image is copied, and modified to produce the desired virtualized environment. It’s easy to fix, by running the following: vagrant box add base http://files.vagrantup.com/lucid32.box It is also possible that you installed the box under a different name (the Vagrant website sometimes refers to lucid32). Instead of downloading a new box, in this case, you can edit Vagrantfile like so, changing the box name to whatever you called it on download:

[Python] 查詢本機IP

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 import urllib,random,re ip_regex = re.compile("(([0-9]{1,3}\.){3}[0-9]{1,3})") def public_ip(): ''' Returns your public IP address. Output: The IP address in string format. None if not internet connection available. ''' # List of host which return the public IP address: hosts = """http://www.