- 要素を取り出してフォーマットする(sed)
入力:
# 言語名 コマンド名 バージョン番号
echo -e "\
Perl\tperl\t5.14.2
Python\tpython\t2.7.3
Ruby\truby\t1.9.3p194
rpm -ivh http://pkgs.repoforge.org/rpmforge-release/rpmforge-release-0.5.2-2.el5.rf.x86_64.rpm |
Gitでのdiff, マージにmeldを使う | |
Git での diff, マージに meld を使う - わからん <http://d.hatena.ne.jp/kitokitoki/20121102/p1> |
#! -*- coding: utf-8 -*- | |
''' | |
Problem: | |
The input is a sequence of digits consistent of 0-9. | |
We define "increasing subsequence", when the substring consists of | |
consecutive numbers (NOT including equal). For instance, 0369, 3478, 58. | |
Please write a program (using C, Java, PHP, Ruby or Python) | |
to find the longest increasing subsequence of numbers in the given | |
string. |
入力:
# 言語名 コマンド名 バージョン番号
echo -e "\
Perl\tperl\t5.14.2
Python\tpython\t2.7.3
Ruby\truby\t1.9.3p194
#!/bin/bash | |
python3.3 -m venv myenv # `myenv` ディレクトリに仮想環境を作る | |
source myenv/bin/activate # `myenv` 環境を使う | |
# setuptoolsのインストール | |
wget https://bitbucket.org/pypa/setuptools/raw/bootstrap/ez_setup.py -O - | python | |
# pipのインストール | |
easy_install pip |
#!/bin/bash | |
python3.3 -m venv myenv # create virtual environment in `myenv` directory | |
source myenv/bin/activate # use `myenv` environment | |
# install setuptools | |
wget https://bitbucket.org/pypa/setuptools/raw/bootstrap/ez_setup.py -O - | python | |
# install pip | |
easy_install pip |
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
import sys | |
from os.path import ( | |
join, | |
dirname, | |
) | |
from PyQt5.QtCore import QUrl |
package main | |
type Pair struct { | |
Key string | |
Value string | |
} | |
type LTSV struct { | |
values []Pair | |
} |
hg checkout v7-3-367 | |
sudo apt-get install -y \ | |
mercurial \ | |
gettext \ | |
libncurses5-dev \ | |
libgtk2-dev \ | |
libxt-dev | |
#!/bin/bash | |
set -o pipefail | |
set -e | |
HASH=$(git log --oneline | peco | cut -d " " -f 1) | |
if [ "$?" -ne 0 -o -z "$HASH" ]; then | |
exit 1 | |
fi | |
git commit --fixup "$HASH" $@ | |
# install: |