仮想マシンをコマンドラインから作成・開始・停止・削除出来たりする。 また Vagrant ファイルを作成することで、同じ開発環境を作成できる。 box という仕組みで仮想マシンファイルをやり取りできる。
仮想マシン作成後は、Chef や Ansible などのプロビジョニングツールで 開発システムの稼働環境を構築する機能が組み込まれている。
#!/usr/bin/env python | |
import os, sys | |
import subprocess as sbp | |
target_paths = [] | |
# Retrieve bin directory path | |
gopath = os.environ.get("GOPATH") |
calcpi <- function(n = 10000) { | |
r <- 1 | |
p <- cbind(runif(n, 0, r), runif(n, 0, r)) | |
sq <- apply(p, c(1,2), function(x) x**2) | |
ss <- apply(sq, 1, sum) | |
sr <- sqrt(ss) | |
pin <- p[sr <= r,] | |
pout <- p[sr > r,] |
import urllib2 | |
class HeadRequest(urllib2.Request): | |
def get_method(self): | |
return "HEAD" | |
class HEADRedirectHandler(urllib2.HTTPRedirectHandler): | |
""" | |
Subclass the HTTPRedirectHandler to make it use our | |
HeadRequest also on the redirected URL |
class Fruit | |
def set_apple1 | |
name = "apple" | |
end | |
def set_apple2 | |
self.name = "apple" | |
end | |
def name=(v) |
# Needs pv & dialog | |
SRC="target_to_archive" | |
DEST= "archive_name" | |
(tar cf - ${SRC} | pv -n -s $(du -sb ${SRC} | awk '{print $1}') | gzip -9 > ${DEST}) 2>&1 | dialog --gauge 'Progress' 7 70 |
Python 製のオーケストレーションツール。 リモートでのコマンド実行機能が標準で用意されている Rake みたいなイメージ。 てか、ローカルタスクの自動化用につかう方が便利そうな気がする。
-- My answer: | |
-- myinsert' l [] n = l ++ [n] | |
-- myinsert' l (x:r) n | n < x = l ++ [n, x] ++ r | |
-- | otherwise = myinsert' (l ++ [x]) r n | |
-- | |
-- myinsert l n = myinsert' [] l n | |
-- | |
-- mysort' [] sorted = sorted | |
-- mysort' (x:l) sorted = mysort' l (myinsert sorted x) |
// ==UserScript== | |
// @name MSDN kill popup | |
// @namespace https://github.com/zeroyonichihachi | |
// @description Removes annoying popup | |
// @include http://msdn.microsoft.com/* | |
// @include http://msdn2.microsoft.com/* | |
// @include http://technet.microsoft.com/* | |
// ==/UserScript== | |
window.onload = function(hndl_e) { |
" coding: utf-8 | |
set nocompatible | |
let s:vimrc_plugins = $HOME."/.vim/vimrc.plugins" | |
if filereadable(s:vimrc_plugins) | |
execute "source ".s:vimrc_plugins | |
endif |