sample
editorial://<action>/<filename>?root=<dropbox|local>&selection=<from-to>&command=<command name>&input=<command input>
| # -*- coding: utf-8 -*- | |
| namespace :ar do | |
| namespace :schema do | |
| task :export do | |
| output_dir = File.join(Padrino.root, 'documents') | |
| FileUtils.mkdir_p(output_dir) | |
| tables = ActiveRecord::Base.connection.execute("show tables").to_a.map{|t| t[0]}.reject{ |t| t == 'schema_migrations' } | |
| tables.each do |table| | |
| columns = ActiveRecord::Base.connection.execute("show full columns from #{table}").to_a | |
| rows = [ |
| <source> | |
| type exec | |
| command df -k / | sed -E -e 1d -e N -e 's/\n//g' -e 's/%//' -e 's/ +/\t/g' | |
| tag df | |
| keys fs,1024_blocks,used,available,capacity,mounted_on | |
| run_interval 30s | |
| </source> | |
| <match df> | |
| type growthforecast |
| function peco-switch-branch() { | |
| local branch=$( | |
| ( | |
| for i in `git branch | colrm 1 2|grep -v detached`; | |
| do | |
| echo `git log --date=iso8601 -n 1 --pretty="format:[%ai] %h" $i` $i; | |
| done | |
| ) | sort -r|peco --query "$LBUFFER" | cut -f 5 -d" ") | |
| if [ -n "$branch" ]; then | |
| BUFFER="git checkout ${branch}" |
| #!/bin/sh | |
| VOLUME_NAME=ramdisk | |
| BSAE_DIR=/usr/local/Cellar/mysql/5.6.22 | |
| NUMSECTORS="$(hdiutil attach -nomount ram://1000000)" | |
| diskutil eraseDisk HFS+ $VOLUME_NAME $NUMSECTORS | |
| mysql_install_db --datadir=/Volumes/$VOLUME_NAME --basedir=$BSAE_DIR |
| ssh() { | |
| if [ -f ".ssh_config" ]; then | |
| /usr/bin/ssh -F .ssh_config "$@" | |
| else | |
| /usr/bin/ssh "$@" | |
| fi | |
| } |
| local COMMAND="" | |
| precmd() { | |
| terminal-notifier -message $COMMAND | |
| COMMAND="" | |
| } | |
| preexec () { | |
| COMMAND="${1}" | |
| } |
| { | |
| "_type": "export", | |
| "__export_format": 3, | |
| "__export_date": "2017-07-22T07:43:03.577Z", | |
| "__export_source": "insomnia.desktop.app:v5.5.2", | |
| "resources": [ | |
| { | |
| "_id": "wrk_1fb26f168cc544f48c461586e05b0284", | |
| "parentId": null, | |
| "modified": 1500708477152, |
| #!/bin/sh | |
| cd "${0%/*}" | |
| # cd `dirname $0` | |
| # dirname だとスペースのあるパスで上手く動かない |
sample
editorial://<action>/<filename>?root=<dropbox|local>&selection=<from-to>&command=<command name>&input=<command input>
| SAMPLE1=.env_file | |
| SAMPLE2=.env_file | |
| SAMPLE3=.env_file |