跳到主要內容

Spotify Global Hot Key in OSX with Automator Script



Quote from -- modacular

  1. Open up the Automator Application (Applications/Automator.app) 
  2. Create a new document (⌘N) and choose the "Service" type for your document.
  3. On the "Service receives selected" item in the top side of the window select "no input" from the dropdown.
  4. Search for "Run Applescript" from the searchbar on the left side of the window.
  5. Drag the "Run Applescript" item in the main window area.
  6. Delete the (* Your script goes here *) line and paste this instead:
    tell application "Spotify" to playpause
  7. Save your script (File > Save or ⌘S) and give it a meaningful name like Spotify PlayPause :D
  8. Go to System Preferences > Keyboard > Shortcuts and select Services from the left column.
  9. Scroll down to the General Section and find your Spotify PlayPause item.
  10. Click the add shortcut button and press the combination of keys that will be your shortcut. (eg. I gave it the ⌃⌘P shortcut).
  11. Test that it's working by clicking on System Preferences (next to the Apple Logo on top of your screen) > Services > Spotify Play Pause. (Actually this step is necessary for the shortcut to be registered to your system).
  12. You're done! Your shortcut is now available to you, in whichever program you have open.

Global-HotKey-for-Pause-Play-Next-Song-etc

留言

這個網誌中的熱門文章

3M UVA3000 更換濾芯紫外線燈匣

用了一年的3M濾水器提示說要換濾芯和燈匣 上 Youtube 想找教學的影片可是沒看到 UVA 3000 的 經過了一番奮戰後在這邊記錄一下 希望可以幫助後人,以免再重蹈覆轍。 Step 1. 拔掉插頭,把淨水器從牆上拿下來(基本上他是掛著而已),比較方便施工。 Step 2. 把前蓋往上拉,很容易就可以看到裡面的東西了。 Step 3. 打開後可以看到有兩個柱狀體,左邊的是燈匣,右邊的是濾芯。 Step 4. 這裡有個祕技是,這兩個柱狀體是可以往上 翻開30 度左右,這樣就可以有比較大的空間施工。 Step 4. 更換濾芯的話,柱狀體的瓶身上有箭頭,往左就是轉開,往右就是鎖緊。 Step 5. 更換燈匣的話比較麻煩一點,因為他底部是電源,頂部的右邊有個突出來的小方塊。對照淨水器上方連接處的話會有個弧形的凹槽,這是要 match 的.如果你只注意瓶身的箭頭往右鎖回去,就會造成漏水...Orz... Step 6. 把前蓋蓋回,機器掛回牆上,插插頭,開水,如果機器沒有告訴你有燈匣異常或漏水的話,就可以長按 C / UV  Reset 計數器了. 所以關鍵字就是,要往上翻 30 度,燈匣上面的小凸點要在右側,要看瓶身的 小箭頭. May it helps!

AWS Machine Learning Workshop

Machine Learning Concepts Apply AWS ML to problems you have existing samples of actual answers For example, to predict if new email is spam or not, you need to collect examples of spam and non-spam. Binary classification (true / false) Is spam or not spam, churn, will customer accept campaign? Multiclass classification (one of more than two outcomes) Regression (numeric number) Building a Machine Learning Application Frame the core ML problems Collect, clean and prepare data Features from raw data Feed to learning algorithm to build models Use the model to generate predictions for new data Linear Models Leaning process computes one weight for each feature to form a model that can predict the target value For example, estimated target = 0.2 + 5 * age + 0.00003 * income Learning Algorithm Learn the weights of the model Loss function: penalty when estimate target provide by the model not equal exact result Optimization technique: minimize the loss (Stochastic G...

Nexus 5 鏡頭蓋破裂更換

N5 的相機鏡頭因為設計上是突出背殼 而我很喜歡裸機的感覺,也沒有使用保護的手機殼 所以不知不覺中,鏡頭蓋就裂掉了 剛開始裂掉也還好,感覺拍照沒有影響 但是後來又掉進馬桶以後 拍出來的照片 就臭臭的 (? 不對,是霧霧的. 可能是因為會慢慢有髒東西從裂縫跑進去... 雖然說我之前被淘寶詐騙了一次 天兵賣家寄錯地方卻不退錢 天貓店小二介入後說要退我錢卻遲遲沒有下文... 但是上網找了一下 N5 的零件, 果然強國的淘寶什麼都有,什麼都不奇怪. 於是我只好放下羞恥心 再去淘寶消費了.... 因為零件真的很便宜啊...被坑就認了.... N5 鏡頭蓋破掉的話,有在賣的零件組合有 鏡頭蓋 鏡頭蓋含鏡頭框 背板 因為我覺得要把破掉的鏡頭蓋從鏡框拿出來有點麻煩 所以就買了鏡頭蓋含鏡頭框 幸運的是,我的猜測是對的! 含鏡頭框的組合只要多幾十元 但是鏡頭片是裝好的~所以我不用再從舊的拆下來, 要更換背板上的鏡頭片 所需要的道具只有 塑膠拆機片 + 小十字螺絲起子 N5的背殼是用幾個卡榫扣住而已而已, 背板則是有六個小螺絲起子鎖住,轉開後 背板的左右兩側有稍微扣住,選一邊壓開後,就可以把背板拆下來. 鏡頭框則是卡在背板的洞上, 所以稍微彎折一下背板,就可以把鏡頭框整個推出來. 最後的結論是,要方便的話, 只要買鏡頭框+鏡頭蓋的組合就好了~ 如果想挑戰手藝,則可以只買鏡頭片 背板應該是不需要買 (還是說有人覺得拆鏡頭框也是一種麻煩?) 我一次買兩組...因為想說可能過一陣子又會破了吧...哈哈..