Skip to content

Instantly share code, notes, and snippets.

source! /Users/User/.vimperatorrc.local
" vim: set ft=vimperator:
map h gT
map l gt
map H <A-Left>
map L <A-Right>
set hintchars=hjklasdf
set editor="/usr/bin/vim"
@chiita
chiita / orastate
Created October 10, 2015 13:17
show oracle service state
#!/bin/sh
echo 'select * from v$instance;' | sqlplus / as sysdba
@chiita
chiita / dbora
Created October 10, 2015 13:15
start dbora service auto, stop dbra service auto
#!/bin/sh
# chkconfig: 2345 99 10
# description: starts and stops oracle instances
# Set ORA_HOME to be equivalent to the $ORACLE_HOME
# from which you wish to execute dbstart and dbshut;
#
# Set ORA_OWNER to the user id of the owner of the
# Oracle database in ORA_HOME.
@chiita
chiita / footer.sh
Last active September 24, 2015 14:38
shell template
@chiita
chiita / PERSONAL.XLSB
Last active September 10, 2015 14:07
Excel保存時のバックアップ作成
Sub backupfile()
' backup file macro
' debug.print var
' Keyboard Shortcut: Ctrl+s
' 【設定方法】 既存のマクロに追記。下記は新規の場合
'
' 1.エクセルを開く
' 2.開発タブのVisual Basicを洗濯
@chiita
chiita / sendimg.bat
Created July 28, 2015 17:29
WinSCPによる簡易BAT処理
@echo off
rem /_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_
rem /_/
rem /_/ sendimg.srcのスクリプトファイルを使用し、winscpをコマンドラインより実行
rem /_/ WinSCPのパスは通すこと
rem /_/ batファイルのパスを通しておくとコマンドとして利用可能
rem /_/
rem /_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_
WinSCP.exe /console /script=c:\sendimg.src
######################################################
# PS名称: Microsoft.PowerShell_pfofile.ps1
# 概要: powershellの標準出力をファイルに取得
# 
# $PROFILE を編集
# PS実行時のディレクトリは C:\Users\Administrator
#
# 1.PSでの画面出力をファイルに取得
#
# 2.finファンクションにて、ログアウト時にコマンド履歴を
@chiita
chiita / chss.sh
Last active August 29, 2015 14:17
change directory of snapshot For Mac
#!/bin/bash
echo "保存したいディレクトリ名を指定してください。"
read basho
mkdir -pv /Users/chiita/GoogleDrive/12_ScreenShot/mac/$basho
if [ $? -eq 0 ]; then
echo "[ 下記ディレクトリの作成に成功しました。]"
echo "### /Users/chiita/GoogleDrive/12_ScreenShot/mac/$basho ###\n"
@chiita
chiita / start.sh
Created March 20, 2015 18:03
Swap postgres DB
#!/bin/bash
su -l postgres -c "pg_ctl start"
status=$0
if [ $status=0 ]; then
logger "DBの起動が完了しました。"
else
logger "DBの停止に失敗しました"
fi
#!/bin/bash
while :
do
clear
echo ""
echo "Show All VMs. "
echo "==================================="
vim-cmd vmsvc/getallvms