Skip to content

Instantly share code, notes, and snippets.

---
# ansible-playbook -i 'localhost,' -c local ghc.yml -vv -C -K
- hosts: all
tasks:
- file: path=/opt/ghc-7.8 state=directory owner={{ ansible_user_id }}
sudo: yes
- get_url: dest=./ghc-7.8.3-x86_64-apple-darwin.tar.xz url=http://www.haskell.org/ghc/dist/7.8.3/ghc-7.8.3-x86_64-apple-darwin.tar.xz
- command: xzcat ./ghc-7.8.3-x86_64-apple-darwin.tar.xz | tar xv - creates=ghc-7.8.3/configure
- shell: ./configure —prefix=/opt/ghc-7.8 && make install chdir=./ghc-7.8.3 creates=/opt/ghc-7.8/bin/ghc
- git: dest=./cabal repo=https://github.com/haskell/cabal.git
# docker run --rm -v /root/td:/data yasushi1/td-agent -c /data/td.conf
2014-07-24 02:07:17 +0100 [info]: starting fluentd-0.10.50
2014-07-24 02:07:17 +0100 [info]: reading config file path="/data/td.conf"
2014-07-24 02:07:17 +0100 [info]: gem 'fluent-mixin-config-placeholders' version '0.2.4'
2014-07-24 02:07:17 +0100 [info]: gem 'fluent-mixin-plaintextformatter' version '0.2.6'
2014-07-24 02:07:17 +0100 [info]: gem 'fluent-plugin-flume' version '0.1.1'
2014-07-24 02:07:17 +0100 [info]: gem 'fluent-plugin-mongo' version '0.7.3'
2014-07-24 02:07:17 +0100 [info]: gem 'fluent-plugin-rewrite-tag-filter' version '1.4.1'
2014-07-24 02:07:17 +0100 [info]: gem 'fluent-plugin-s3' version '0.4.0'
2014-07-24 02:07:17 +0100 [info]: gem 'fluent-plugin-scribe' version '0.10.10'
$url = "http://download.oracle.com/otn-pub/java/jdk/7u67-b01/jre-7u67-windows-x64.exe"
$jre = Join-Path $Env:TEMP "jdk7installer.exe"
$client = New-Object Net.WebClient
$client.Headers.Add('Cookie', 'oraclelicense=accept-securebackup-cookie')
$client.DownloadFile($url, $jre)
& $jre /s
FROM ubuntu:14.04
ENV DEBIAN_FRONTEND noninteractive
ENV INITRD No
RUN apt-get -qq update && apt-get -y install software-properties-common
RUN apt-add-repository ppa:ansible/ansible
RUN apt-get -qq update && apt-get -y install ansible python-pip
RUN apt-get clean
RUN pip install 'http://github.com/diyan/pywinrm/archive/master.zip#egg=pywinrm'
FROM ubuntu:14.04
ENV DEBIAN_FRONTEND noninteractive
ENV INITRD No
RUN apt-get -qq update && apt-get -y install openjdk-7-jre-headless openssh-client wget
RUN wget http://dl.bintray.com/rundeck/rundeck-deb/rundeck-2.2.1-1-GA.deb -O /tmp/rundeck-2.2.1-1-GA.deb && dpkg -i /tmp/rundeck-2.2.1-1-GA.deb
RUN chown rundeck:rundeck /tmp/rundeck
EXPOSE 4440
/*
* Copyright (c) 2014, Yasushi Abe
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
% for i in `pidof apache2` ;do sudo grep -i ss: /proc/$i/smaps ; done | gawk '{m[$1]+=$2}END{for (i in m) print i,m[i]}'
% for i in `pidof apache2` ;do sudo egrep -i '(ss:|^Private_|^Shared_)' /proc/$i/smaps ; done | gawk '{m[$1]+=$2}END{for (i in m) print i,m[i]}'
% sudo ruby -e 'p `pidof apache2`.split(" ").map{|pid| IO.readlines("/proc/#{pid}/smaps").grep(/^Pss:/)}.flatten.map{|l|l.split(" ")[1].to_i}.inject(:+)'
---
- hosts: all
sudo: yes
vars:
yumrepo:
epel: http://ftp.tsukuba.wide.ad.jp/Linux/fedora/epel/6/i386/epel-release-6-8.noarch.rpm
elrepo: http://www.elrepo.org/elrepo-release-6-6.el6.elrepo.noarch.rpm
mysql-community: http://dev.mysql.com/get/mysql-community-release-el6-5.noarch.rpm
tasks:
- shell: rpm -q "{{item.key}}-release"
sudo rpm -i /home/vagrant/rpmbuild/RPMS/x86_64/kmod-drbd84-debug-8.4.4-1.el6.x86_64.rpm
--- rpmbuild/SPECS/drbd84-kmod.spec 2013-10-12 22:30:58.000000000 +0900
+++ rpmbuild-/SPECS/drbd84-kmod.spec 2014-09-30 23:07:03.325636169 +0900
@@ -26,7 +26,7 @@
BuildRequires: redhat-rpm-config
# Magic hidden here.
-%{expand:%(sh %{SOURCE10} rpmtemplate %{kmod_name} %{kversion} "")}
+%{expand:%(sh %{SOURCE10} rpmtemplate %{kmod_name} %{kversion} %{kvariants})}
@Yasushi
Yasushi / COMPILE.md
Last active August 29, 2015 14:07
build gvim pc installer package on OS X
http://mingw-w64.sourceforge.net/download.php#darwin

から darwin 32 用 i686 mingw バイナリをダウンロードしてパスを通しておく。

PATH=~/ming32/bin:$PATH

runtime の生成に msgfmt が必要。

brew install gettext upx makensis