現在のフォルダ直下に存在する全てのファイル名を取得する
$ find . -maxdepth 1 -type f | sed "s!^.*/!!"
特定のファイル名を除いて取得
ex) hoge.rb以外のファイル名を取得
var column = {'id':0,'posted_count':1,'ja':2,'en':3}; | |
function slack(message) { | |
var url = 'https://slack.com/api/chat.postMessage'; | |
var token = 'FILL ME IN'; | |
var channel = 'FILL ME IN'; | |
var text = message; | |
var username = 'FILL ME IN'; | |
var parse = 'full'; | |
var icon_emoji = ':sunny:'; |
# -*- mode: ruby -*- | |
# vi: set ft=ruby : | |
# All Vagrant configuration is done below. The "2" in Vagrant.configure | |
# configures the configuration version (we support older styles for | |
# backwards compatibility). Please don't change it unless you know what | |
# you're doing. | |
Vagrant.configure("2") do |config| | |
# The most common configuration options are documented and commented below. | |
# For a complete reference, please see the online documentation at |
// 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 |
/* | |
* 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
-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" |
/* | |
* How to use | |
* | |
* import ResizeTextarea from './path/to/ResizeTextarea'; | |
* let textarea = document.querySelector('#textarea'); | |
* const resizeTextarea = new ResizeTextarea(textarea); | |
* textarea.addEventListener('input', () => { | |
* resizeTextarea.resize(); | |
* }); | |
*/ |