Skip to content

Instantly share code, notes, and snippets.

View mis101247's full-sized avatar
🌱
Growing

Keyo mis101247

🌱
Growing
View GitHub Profile
@mis101247
mis101247 / example.md
Last active October 25, 2019 01:29
#Medium
Step. 說明
1. ⌘ + C, V 新增游標
2. ⌘ + N 選取下一個相同的字串
3. ⌘ + C, V 複製貼上
4. ⌘ + A, ⇧ + ⌥ + I 全選接著把選取區塊在每一行後面新增游標
5. ⌘ + ⇧ + ← 每行都選起來
6. ⌘ + C, 到另一分頁 複製
7. ⌘ + A, ⇧ + ⌥ + I 全選接著把選取區塊在每一行後面新增游標
8. ⌘ + ← 游標到最前面
@mis101247
mis101247 / MacOS.md
Last active October 25, 2019 02:51
[VS Code]Multiple selections #Medium
Mac 快捷鍵 說明
⌥ + 左鍵點一下 新增游標
⌘ + D 選取下一個相同的字串
⌘ + K , ⌘ + D 跳過上一個相同的字串 [✏️按住⌘接著按K、D]
⌘ + U 取消上一個選取
⇧ + ⌘ + L 或 ⌘ + F2 選取所有相同的字串 [✏️F2要先按住fn]
⇧ + ⌥ + I 把選取區塊在每一行後面新增游標
[✏️若你有安裝angular2-switcher Extensions會衝突]
⇧ + ⌥ + 滑鼠選取移動 選取區塊新增游標 [✏️不含沒有字元的行]
⇧ + ⌥ + ⌘ + ↓ 游標選取往上
@mis101247
mis101247 / typings.ts
Created October 14, 2019 07:46
[Learning TypeScript]
// 範例
export declare namespace Raffle {
interface UpdateData {
title: string;
latestUpdateAt: Date;
}
interface AddData extends UpdateData {
createdAt: Date;
# 允許安裝第三方
sudo -s sudo spctl --master-disable
@mis101247
mis101247 / arrayConcat.js
Last active March 18, 2020 03:11
[Javascript]
// ====把n維陣列攤成n-1維====
Array.prototype.concatAll = function (){
var result = [];
this.forEach((array) => {
result.push.apply(result, array);
});
return result;
}
Array.prototype.concatAll = function() {
# 在沒有設定環境變數下 dotnet
# 會得到 `command not found: dotnet`
ln -s /usr/local/share/dotnet/dotnet /usr/local/bin/
function myFunction() {
// 先get中央氣象局開放資料平臺資料
var opendataUrl = "https://opendata.cwb.gov.tw/api/v1/rest/datastore/F-C0032-001?locationName=臺北市";
var opendataOptions = {
"method" : "GET",
"headers": {
"Authorization": "授權碼請至https://opendata.cwb.gov.tw/devManual/insrtuction取得",
"Content-Type": "application/json;charset=utf-8"
}
@mis101247
mis101247 / lodash.js
Last active October 7, 2019 14:51
#Medium
<script src="https://cdn.jsdelivr.net/npm/lodash@4.17.11/lodash.min.js"></script>
@mis101247
mis101247 / Git Aliases
Last active October 15, 2019 01:21
[Git]
# 這超常用的縮寫
git config --global alias.co checkout
git config --global alias.br branch
git config --global alias.st status
git config --global alias.ci commit
# 看log變得很順眼 `git lg`
git config --global alias.lg "log --color --graph --all --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit"
# `git unstage` 相當於 `git reset HEAD`