Linuxでお手軽に使えるエディタ、GNU/nano。
デフォルトだとファイル表示したときに色がつかないので、Emacsやviのように色を付けて表示する方法を紹介します。
デフォルトだとファイル表示したときに色がつかないので、Emacsやviのように色を付けて表示する方法を紹介します。
nanoでファイルを色づけ表示する方法
続きを読む: GNU/nanoで、ソースコードを色づけで表示する方法
<pre>hello</pre>
<img id="image1"
src="http://hoge.s3.amazonaws.com/fuga/file.jpg?AWSAccessKeyId=AKIHOGE&Expires=1322305525&Signature=abcde" >
emit : 〈液体・光・熱・においなどを〉出す,放つ
ISODate is a thin wrapper around the Date constructor to fix some of it's shortcomings. It returns a normal Date object with all of the normal methods that javascript Date methods support. We have also changed the way that Date objects print to make sure that they don't look like strings and that if you copy and paste the output you get the same object.
yum -y install readline readline-devel # 事前準備
wget ftp://ftp2.jp.postgresql.org/pub/postgresql/source/v9.1.1/postgresql-9.1.1.tar.gz
tar xvfz postgresql-9.1.1.tar.gz
cd postgresql-9.1.1
./configure
make # コンパイル
make install # インストール
echo "PATH=/usr/local/pgsql/bin:\$PATH" >> /etc/profile # PATHを通しておきます。
adduser postgres # 管理ユーザを作成
mkdir /usr/local/pgsql/data # データディレクトリを作成
chown postgres /usr/local/pgsql/data # オーナーを変更
su - postgres
yum -y install readline readline-devel # 事前準備
wget ftp://ftp2.jp.postgresql.org/pub/postgresql/source/v8.4.9/postgresql-8.4.9.tar.gz
tar xvfz postgresql-8.4.9.tar.gz
cd postgresql-8.4.9
./configure
make # コンパイル
make install # インストール
echo "PATH=/usr/local/pgsql/bin:\$PATH" >> /etc/profile # PATHを通しておきます。
adduser postgres # 管理ユーザを作成
mkdir /usr/local/pgsql/data # データディレクトリを作成
chown postgres /usr/local/pgsql/data # オーナーを変更
su - postgres
SELECT
objname,
to_char(pg_relation_size(objname::regclass), '999,999,999,999') as bytes
FROM (
SELECT
tablename as objname
FROM pg_tables
WHERE schemaname = 'public'
UNION
SELECT
indexname as objname
FROM pg_indexes
WHERE schemaname = 'public'
) as objects
ORDER BY bytes DESC
このようなSQLはいちいち覚えてられないので、下記のようにビュー作成しておくのがオススメです。
HINT: No function matches the given name and argument types. You might need to add explicit type casts.
pg_relation_size(tablename::regclass)
$ sudo yum install expat-devel
$ cpanm LWP::UserAgent::Determined --force
$ cpanm Amazon::S3
これでいけるはずです。
use strict;
use warnings;
use Amazon::S3;
my $s3 = Amazon::S3->new({
aws_access_key_id => 'foo', # アクセスキーID
aws_secret_access_key => 'bar', # シークレットアクセスキー
retry => 1,
});
my $bucket = $s3->bucket('yourbucketname'); # あらかじめ作成したバケット名を指定
my $filepath = '/tmp/hello.txt'; # ローカルのファイルパス名
my $keyname = 'tmp/hello.txt'; # S3上のオブジェクトパス名
$bucket->add_key_filename($keyname, $filepath) or die $s3->err . ':' . $s3->errstr;
空行を除くと12行です。$ tail -f /var/log/httpd/access_log
tail: `/var/log/httpd/access_log' を 読み込み用でオープンできません: 許可がありません
tail: 何もファイルは残っていません
$ s3cmd put --recursive /path/to/mydir s3://bucketname/foo/bar/
または
$ s3cmd put --recursive /path/to/mydir/ s3://bucketname/foo/bar/mydir/