HTMLを含んだcontenteditable内のカーソル位置取得 DEMO
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
set fenc=utf-8 | |
set nobackup | |
set noswapfile | |
set autoread | |
set hidden | |
set showcmd | |
set number | |
set smartindent | |
set showmatch | |
set laststatus=2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
axios({ | |
url: 'http://localhost:5000/static/example.pdf', | |
method: 'GET', | |
responseType: 'blob', // important | |
}).then((response) => { | |
const url = window.URL.createObjectURL(new Blob([response.data])); | |
const link = document.createElement('a'); | |
link.href = url; | |
link.setAttribute('download', 'file.pdf'); | |
document.body.appendChild(link); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* How to use | |
* | |
* import ResizeTextarea from './path/to/ResizeTextarea'; | |
* let textarea = document.querySelector('#textarea'); | |
* const resizeTextarea = new ResizeTextarea(textarea); | |
* textarea.addEventListener('input', () => { | |
* resizeTextarea.resize(); | |
* }); | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-bind-key -t vi-copy v begin-selection | |
-bind-key -t vi-copy y copy-pipe "reattach-to-user-namespace pbcopy" | |
-unbind -t vi-copy Enter | |
-bind-key -t vi-copy Enter copy-pipe "reattach-to-user-namespace pbcopy" | |
+bind-key -T copy-mode-vi v send-keys -X begin-selection | |
+bind-key -T copy-mode-vi y send-keys -X copy-pipe-and-cancel "reattach-to-user-namespace pbcopy" | |
+bind-key -T copy-mode-vi Enter send-keys -X copy-pipe-and-cancel "reattach-to-user-namespace pbcopy" |
日本語入力確定を判定するImeCheckerクラスと併用して使用するのが望まれる。
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* How to use in Vue | |
* export default { | |
* template: ` | |
* <input type="text" @keydown="imeChecker.keydownEvent" @keyup.enter="keyupEvent"> | |
* `, | |
* data() { | |
* return { | |
* imeChecker: new ImeChecker() | |
* } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ pwd | |
/path/to/Dropbox/.ssh | |
$ tree . | |
. | |
├── config | |
├── id_hoge_rsa | |
├── id_hoge_rsa.pub | |
└── hoge.pem |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// google analytics api reference: https://developers.google.com/apps-script/advanced/analytics | |
function runReport(profileId, startDate, endDate) { | |
var tableId = 'ga:' + profileId; | |
var metric = 'ga:pageviews'; | |
var options = {}; | |
var report = Analytics.Data.Ga.get(tableId, startDate, endDate, metric, options); | |
return report; | |
// 以下Spread Sheetに出力 |
NewerOlder