現在のフォルダ直下に存在する全てのファイル名を取得する
$ find . -maxdepth 1 -type f | sed "s!^.*/!!"
特定のファイル名を除いて取得
ex) hoge.rb以外のファイル名を取得
// 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に出力 |
$ pwd | |
/path/to/Dropbox/.ssh | |
$ tree . | |
. | |
├── config | |
├── id_hoge_rsa | |
├── id_hoge_rsa.pub | |
└── hoge.pem |
/*! | |
* YUI 3.5.0 - reset.css (http://developer.yahoo.com/yui/3/cssreset/) | |
* http://cssreset.com | |
* Copyright 2012 Yahoo! Inc. All rights reserved. | |
* http://yuilibrary.com/license/ | |
*/ | |
/* | |
TODO will need to remove settings on HTML since we can't namespace it. | |
TODO with the prefix, should I group by selector or property for weight savings? | |
*/ |
/* | |
* How to use in Vue | |
* export default { | |
* template: ` | |
* <input type="text" @keydown="imeChecker.keydownEvent" @keyup.enter="keyupEvent"> | |
* `, | |
* data() { | |
* return { | |
* imeChecker: new ImeChecker() | |
* } |
日本語入力確定を判定するImeCheckerクラスと併用して使用するのが望まれる。
HTMLを含んだcontenteditable内のカーソル位置取得 DEMO
/* | |
* How to use | |
* | |
* import ResizeTextarea from './path/to/ResizeTextarea'; | |
* let textarea = document.querySelector('#textarea'); | |
* const resizeTextarea = new ResizeTextarea(textarea); | |
* textarea.addEventListener('input', () => { | |
* resizeTextarea.resize(); | |
* }); | |
*/ |
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); |
set fenc=utf-8 | |
set nobackup | |
set noswapfile | |
set autoread | |
set hidden | |
set showcmd | |
set number | |
set smartindent | |
set showmatch | |
set laststatus=2 |