覚えたgitコマンド
init
$ git init
add
カレントディレクトリ以下のすべてのファイルの状態を記録する
$ git add . (←ピリオド)
登録済みの全編集ファイルをインデックスに記録する
$ git add -u
ワークツリー内の全編集ファイルをインデックスに記録する
$ git add -A
commit
ログメッセージを入力するためにエディタが起動される
$ git commit
git add -uをしてからgit commitするのと同じ
$ git commit -a
ログメッセージの要約を指定(エディタは起動されない)
$ git commit -m "ログの要約”
status
インデックスの状態確認?
$ git status
diff
インデックスとワークツリーの比較
$ git diff
最新コミットとインデックスの比較
$ git diff --cached
最新コミットとワークツリーの比較
$ git diff HEAD
log
log表示
$ git log
logをpatch形式で表示
$ git log -p
log表示(表示数指定)
$ git log -2 (2コミット分を指定)
log表示(コミットメッセージは要約のみ表示)
$ git log --pretty=short
log検索(OR検索)
$ git log --grep="WORD1" --grep="WORD2"
log検索(AND検索)
$ git log --all-match --grep="WORD1" --grep="WORD2"
reset
インデックスから全変更を取り除く
$ git reset
インデックスから指定したファイルを取り除く
$ git reset FILENAME
revert
以前のcommitを打ち消す(新たなcommitが作られる)
$ git revert FILENAME
checkout
インデックスからファイルを取ってくる
$ git checkout FILENAME
HEADからファイルを取ってくる
$ git checkout HEAD FILENAME
database作成/削除
postgresql起動
$ postmaster -D DIRECTORY_OF_DATABASE
database作成
$ createdb mydb
database削除
$ dropdb mydb
psql終了
mydb=# \q
psqlでヘルプ表示
mydb=# \h mydb=# \h BEGIN mydb=# \h CREATE TABLE
ログ
$ psql mydb psql (9.0.4) Type "help" for help. mydb=# \h Available help: ABORT ALTER AGGREGATE ALTER CONVERSION ALTER DATABASE ALTER DEFAULT PRIVILEGES ALTER DOMAIN ALTER FOREIGN DATA WRAPPER ALTER FUNCTION ALTER GROUP ALTER INDEX ALTER LANGUAGE ALTER LARGE OBJECT ALTER OPERATOR ALTER OPERATOR CLASS ALTER OPERATOR FAMILY ALTER ROLE ALTER SCHEMA ALTER SEQUENCE ALTER SERVER ALTER TABLE ALTER TABLESPACE ALTER TEXT SEARCH CONFIGURATION ALTER TEXT SEARCH DICTIONARY ALTER TEXT SEARCH PARSER ALTER TEXT SEARCH TEMPLATE ALTER TRIGGER ALTER TYPE ALTER USER ALTER USER MAPPING ALTER VIEW ANALYZE BEGIN CHECKPOINT CLOSE CLUSTER COMMENT COMMIT COMMIT PREPARED COPY CREATE AGGREGATE CREATE CAST CREATE CONSTRAINT TRIGGER CREATE CONVERSION CREATE DATABASE CREATE DOMAIN CREATE FOREIGN DATA WRAPPER CREATE FUNCTION CREATE GROUP CREATE INDEX CREATE LANGUAGE CREATE OPERATOR CREATE OPERATOR CLASS CREATE OPERATOR FAMILY CREATE ROLE CREATE RULE CREATE SCHEMA CREATE SEQUENCE CREATE SERVER CREATE TABLE CREATE TABLE AS CREATE TABLESPACE CREATE TEXT SEARCH CONFIGURATION CREATE TEXT SEARCH DICTIONARY CREATE TEXT SEARCH PARSER CREATE TEXT SEARCH TEMPLATE CREATE TRIGGER CREATE TYPE CREATE USER CREATE USER MAPPING CREATE VIEW DEALLOCATE DECLARE DELETE DISCARD DO DROP AGGREGATE DROP CAST DROP CONVERSION DROP DATABASE DROP DOMAIN DROP FOREIGN DATA WRAPPER DROP FUNCTION DROP GROUP DROP INDEX DROP LANGUAGE DROP OPERATOR DROP OPERATOR CLASS DROP OPERATOR FAMILY DROP OWNED DROP ROLE DROP RULE DROP SCHEMA DROP SEQUENCE DROP SERVER DROP TABLE DROP TABLESPACE DROP TEXT SEARCH CONFIGURATION DROP TEXT SEARCH DICTIONARY DROP TEXT SEARCH PARSER DROP TEXT SEARCH TEMPLATE DROP TRIGGER DROP TYPE DROP USER DROP USER MAPPING DROP VIEW END EXECUTE EXPLAIN FETCH GRANT INSERT LISTEN LOAD LOCK MOVE NOTIFY PREPARE PREPARE TRANSACTION REASSIGN OWNED REINDEX RELEASE SAVEPOINT RESET REVOKE ROLLBACK ROLLBACK PREPARED ROLLBACK TO SAVEPOINT SAVEPOINT SELECT SELECT INTO SET SET CONSTRAINTS SET ROLE SET SESSION AUTHORIZATION SET TRANSACTION SHOW START TRANSACTION TABLE TRUNCATE UNLISTEN UPDATE VACUUM VALUES WITH mydb=# \h mydb=# \h BEGIN Command: BEGIN Description: start a transaction block Syntax: BEGIN [ WORK | TRANSACTION ] [ transaction_mode [, ...] ] where transaction_mode is one of: ISOLATION LEVEL { SERIALIZABLE | REPEATABLE READ | READ COMMITTED | READ UNCOMMITTED } READ WRITE | READ ONLY mydb=# \q $ dropdb mydb
homebrewでのpostgresqlのインストール
postgresqlのインストール
$ brew install postgresql
ログ
$ brew install postgresql Also installing dependencies: ossp-uuid ==> Downloading http://www.mirrorservice.org/sites/ftp.ossp.org/pkg/lib/uuid/uuid-1.6.2.tar.gz ######################################################################## 100.0% ==> ./configure --disable-debug --without-perl --without-php --without-pgsql --prefix=/usr/local/Cellar/ossp-uuid/1.6.2 ==> make ==> make install /usr/local/Cellar/ossp-uuid/1.6.2: 11 files, 364K, built in 11 seconds ==> Downloading http://ftp9.us.postgresql.org/pub/mirrors/postgresql/source/v9.0.4/postgresql-9.0.4.tar.bz2 ######################################################################## 100.0% ==> ./configure --disable-debug --prefix=/usr/local/Cellar/postgresql/9.0.4 --enable-thread-safety --with-bonjour --with-gssapi ==> make install ==> make install-docs ==> cd contrib/adminpack; make install ==> cd contrib/auto_explain; make install ==> cd contrib/btree_gin; make install ==> cd contrib/btree_gist; make install ==> cd contrib/chkpass; make install ==> cd contrib/citext; make install ==> cd contrib/cube; make install ==> cd contrib/dblink; make install ==> cd contrib/dict_int; make install ==> cd contrib/dict_xsyn; make install ==> cd contrib/earthdistance; make install ==> cd contrib/fuzzystrmatch; make install ==> cd contrib/hstore; make install ==> cd contrib/intagg; make install ==> cd contrib/intarray; make install ==> cd contrib/isn; make install ==> cd contrib/lo; make install ==> cd contrib/ltree; make install ==> cd contrib/oid2name; make install ==> cd contrib/pageinspect; make install ==> cd contrib/passwordcheck; make install ==> cd contrib/pg_archivecleanup; make install ==> cd contrib/pg_buffercache; make install ==> cd contrib/pg_freespacemap; make install ==> cd contrib/pg_standby; make install ==> cd contrib/pg_stat_statements; make install ==> cd contrib/pg_trgm; make install ==> cd contrib/pg_upgrade; make install ==> cd contrib/pg_upgrade_support; make install ==> cd contrib/pgbench; make install ==> cd contrib/pgcrypto; make install ==> cd contrib/pgrowlocks; make install ==> cd contrib/pgstattuple; make install ==> cd contrib/seg; make install ==> cd contrib/spi; make install ==> cd contrib/sslinfo; make install ==> cd contrib/tablefunc; make install ==> cd contrib/test_parser; make install ==> cd contrib/tsearch2; make install ==> cd contrib/unaccent; make install ==> cd contrib/uuid-ossp; make install ==> cd contrib/vacuumlo; make install ==> cd contrib/xml2; make install ==> Caveats If builds of PostgreSQL 9 are failing and you have version 8.x installed, you may need to remove the previous version first. See: https://github.com/mxcl/homebrew/issues/issue/2510 To build plpython against a specific Python, set PYTHON prior to brewing: PYTHON=/usr/local/bin/python brew install postgresql See: http://www.postgresql.org/docs/9.0/static/install-procedure.html If this is your first install, create a database with: initdb /usr/local/var/postgres If this is your first install, automatically load on login with: mkdir -p ~/Library/LaunchAgents cp /usr/local/Cellar/postgresql/9.0.4/org.postgresql.postgres.plist ~/Library/LaunchAgents/ launchctl load -w ~/Library/LaunchAgents/org.postgresql.postgres.plist If this is an upgrade and you already have the org.postgresql.postgres.plist loaded: launchctl unload -w ~/Library/LaunchAgents/org.postgresql.postgres.plist cp /usr/local/Cellar/postgresql/9.0.4/org.postgresql.postgres.plist ~/Library/LaunchAgents/ launchctl load -w ~/Library/LaunchAgents/org.postgresql.postgres.plist Or start manually with: pg_ctl -D /usr/local/var/postgres -l /usr/local/var/postgres/server.log start And stop with: pg_ctl -D /usr/local/var/postgres stop -s -m fast Some machines may require provisioning of shared memory: http://www.postgresql.org/docs/current/static/kernel-resources.html#SYSVIPC If you want to install the postgres gem, including ARCHFLAGS is recommended: env ARCHFLAGS="-arch x86_64" gem install pg To install gems without sudo, see the Homebrew wiki. ==> Summary /usr/local/Cellar/postgresql/9.0.4: 2577 files, 35M, built in 2.7 minutes
IntelliJをアンインストールした後で削除した方がよいファイル/ディレクトリ
IntelliJをアンインストールした後で削除した方がよいファイル/ディレクトリを見つけたのでメモっておきます。
/Users/username/Library/Preferences/AppName
macos - In IntelliJ on OS X, how do you clear out all global setting info, licensing etc. (external to any project) - Stack Overflow
/Users/username/Library/Preferences/com.appname.plist
/Users/username/Library/Application Support/AppName
/Library/Preferences/AppName
/Library/Preferences/com.appname.plist
/Library/Application Support/AppName
python環境構築メモ
easy_installのインストール
ダウンロード
$ curl -O http://peak.telecommunity.com/dist/ez_setup.py
インストール
$ sudo python ez_setup.py
ログ
$ curl -O http://peak.telecommunity.com/dist/ez_setup.py % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 10240 100 10240 0 0 19731 0 --:--:-- --:--:-- --:--:-- 29425 $ sudo python ez_setup.py Downloading http://pypi.python.org/packages/2.6/s/setuptools/setuptools-0.6c11-py2.6.egg Processing setuptools-0.6c11-py2.6.egg Copying setuptools-0.6c11-py2.6.egg to /Library/Python/2.6/site-packages Adding setuptools 0.6c11 to easy-install.pth file Installing easy_install script to /usr/local/bin Installing easy_install-2.6 script to /usr/local/bin Installed /Library/Python/2.6/site-packages/setuptools-0.6c11-py2.6.egg Processing dependencies for setuptools==0.6c11 Finished processing dependencies for setuptools==0.6c11 $ easy_install error: No urls, filenames, or requirements specified (see --help)
virtualenvのインストール
インストール
$ sudo easy_install virtualenv
ログ
$ sudo easy_install virtualenv Searching for virtualenv Reading http://pypi.python.org/simple/virtualenv/ Reading http://virtualenv.openplans.org Reading http://www.virtualenv.org Best match: virtualenv 1.6.4 Downloading http://pypi.python.org/packages/source/v/virtualenv/virtualenv-1.6.4.tar.gz#md5=1072b66d53c24e019a8f1304ac9d9fc5 Processing virtualenv-1.6.4.tar.gz Running virtualenv-1.6.4/setup.py -q bdist_egg --dist-dir /tmp/easy_install-jnt_dT/virtualenv-1.6.4/egg-dist-tmp-eN73IE warning: no previously-included files matching '*.*' found under directory 'docs/_templates' Adding virtualenv 1.6.4 to easy-install.pth file Installing virtualenv script to /usr/local/bin Installed /Library/Python/2.6/site-packages/virtualenv-1.6.4-py2.6.egg Processing dependencies for virtualenv Finished processing dependencies for virtualenv
virtualenvwrapperのインストール
インストール
$ sudo easy_install virtualenvwrapper
ログ
$ sudo easy_install virtualenvwrapper Searching for virtualenvwrapper Reading http://pypi.python.org/simple/virtualenvwrapper/ Reading http://www.doughellmann.com/projects/virtualenvwrapper/ Best match: virtualenvwrapper 2.7.1 Downloading http://pypi.python.org/packages/source/v/virtualenvwrapper/virtualenvwrapper-2.7.1.tar.gz#md5=b01930b245b2beb9fe2ce69a4b0e0f25 Processing virtualenvwrapper-2.7.1.tar.gz Running virtualenvwrapper-2.7.1/setup.py -q bdist_egg --dist-dir /tmp/easy_install-cXBoIr/virtualenvwrapper-2.7.1/egg-dist-tmp-AhlfFk Downloading http://pypi.python.org/packages/source/d/distribute/distribute-0.6.10.tar.gz Extracting in /tmp/easy_install-cXBoIr/virtualenvwrapper-2.7.1/temp/tmpYE5Zc_ Now working in /tmp/easy_install-cXBoIr/virtualenvwrapper-2.7.1/temp/tmpYE5Zc_/distribute-0.6.10 Building a Distribute egg in /private/tmp/easy_install-cXBoIr/virtualenvwrapper-2.7.1 /private/tmp/easy_install-cXBoIr/virtualenvwrapper-2.7.1/distribute-0.6.10-py2.6.egg Adding virtualenvwrapper 2.7.1 to easy-install.pth file Installing virtualenvwrapper.sh script to /usr/local/bin Installed /Library/Python/2.6/site-packages/virtualenvwrapper-2.7.1-py2.6.egg Processing dependencies for virtualenvwrapper Finished processing dependencies for virtualenvwrapper
コップ本を買った
私的メモ。
2011/07/17(sun)にコップ本を購入した。
併せて「5つのコツで もっと伸びる 体が変わる ストレッチ・メソッド」という本も買った。
Scalaスケーラブルプログラミング[コンセプト&コーディング] (Programming in Scala)
- 作者: Martin Odersky,Lex Spoon、Bill Venners,羽生田栄一,長尾高弘
- 出版社/メーカー: インプレス
- 発売日: 2009/08/21
- メディア: 単行本
- 購入: 18人 クリック: 687回
- この商品を含むブログ (121件) を見る
5つのコツで もっと伸びる カラダが変わる ストレッチ・メソッド (カラダをつくる本シリーズ)
- 作者: 谷本道哉,石井直方
- 出版社/メーカー: 高橋書店
- 発売日: 2008/11/14
- メディア: 単行本(ソフトカバー)
- 購入: 42人 クリック: 356回
- この商品を含むブログ (46件) を見る
§07 S① と S③O
- 副詞は目的語にも補語にもならない。
- 第2文型の場合はS=Cとなる。
- 第3文型の場合はS!=Oとなる。