[ jenkins ] always send notification email using Gmail TLS

Installation 

Manage Jenkins > Manage Plugins > Email Extension Plugin

Configure SMTP

Manage Jenkins > Configure System

NOTE : To use TLS

  1. unckeck SSL
  2. -Dmail.smtp.starttls.enable=”true” *** before -jar
    “%BASE%\jenkins.war” *** in `C:\Program Files (x86)\Jenkins\jenkins.xml`
-Dmail.smtp.starttls.enable="true" -jar "%BASE%\jenkins.war"
Configure a project to send email at every build
  1. Click “Add post-build action”
  2. Click “Editable Email Notification”
  3. Click “Advanced Settings…”
  4. Click “Add Trigger”
  5. Click “Always”
  6. Save.

[ubuntu] wrong fs type, bad option, bad superblock

Problem : mount error

 $ sudo mount -a

mount: wrong fs type, bad option, bad superblock on Downloads,
missing codepage or helper program, or other error
(for several filesystems (e.g. nfs, cifs) you might
need a /sbin/mount.<type> helper program)
In some cases useful info is found in syslog - try
dmesg | tail or so
# dmesg | tail

sf_read_super_aux err=-22

Solution

Need symbolic link

/sbin/mount.vboxsf -> /usr/lib/VBoxGuestAdditions/mount.vboxsf

 $ sudo ln -s /usr/lib/VBoxGuestAdditions/mount.vboxsf /sbin/mount.vboxsf

 

ref : http://qiita.com/amagitakayosi/items/07ff50afac1cd6f62c1f

[ ubuntu ] docker compose

Definition

running multi-container Docker applications in an isolated environment.

Compose has commands for managing the whole lifecycle of your application:

  • Start, stop and rebuild services
  • View the status of running services
  • Stream the log output of running services
  • Run a one-off command on a service

Hello world

docker-compose.yml

version: '2'
services:
 web:
 build: .
 ports:
 - "5000:5000"
 volumes:
 - .:/code
 - logvolume01:/var/log
 links:
 - redis
 redis:
 image: redis
volumes:
 logvolume01: {}

Then run

$&nbsp;docker-compose up

Build Images

docker build -t web .

References

Dockerfile :  https://docs.docker.com/engine/reference/builder/

IRC 

#docker-compose

Control startup order

https://docs.docker.com/compose/startup-order/

up v.s. run v.s. start

$ docker-compose up
  • use up to start or restart all the services defined in a docker-compose.yml.
  • When runs, if it finds any containers from previous runs, it copies the volumes from the old container to the new container. This process ensures that any data you’ve created in volumes isn’t lost.
$ docker-compose run
  • use for running “one-off” or “adhoc” tasks. It requires the service name you want to run and only starts containers for services that the running service depends on. Use run to run tests or perform an administrative task such as removing or adding data to a data volume container. The run command acts like docker run -ti in that it opens an interactive terminal to the container and returns an exit status matching the exit status of the process in the container.
$ docker-compose start
  • use to restart containers that were previously created, but were stopped. It never creates new containers.

can use json instead of yaml

$ docker-compose -f docker-compose.json up

Compose command line reference

https://docs.docker.com/compose/reference/

Compose file reference

https://docs.docker.com/compose/compose-file/

Features

  1. Multiple isolated environments on a single host

Compose uses a project name to isolate environments from each other. You can make use of this project name in several different contexts:

  • dev host, to create multiple copies of a single environment (e.g., you want to run a stable copy for each feature branch of a project)
  • CI server, to keep builds from interfering with each other, you can set the project name to a unique build number
  • on a shared host or dev host, to prevent different projects, which may use the same service names, from interfering with each other
    The default project name is the basename of the project directory. You can set a custom project name by using the -p command line option or the COMPOSE_PROJECT_NAME environment variable

2. Preserve volume data when containers are created

This process ensures that any data you’ve created in volumes isn’t lost.

3. Only recreate containers that have changed

4. Variables and moving a composition between environments

Compose supports variables ( https://docs.docker.com/compose/compose-file/#variable-substitution ) in the Compose file. You can use these variables to customize your composition for different environments, or different users. See Variable substitution for more details.

You can extend a Compose file using the extends field or by creating multiple Compose files. See extends ( https://docs.docker.com/compose/extends/ ) for more details.

Common Use Cases

  1. Development environments

Compose can reduce a multi-page “developer getting started guide” to a single machine readable Compose file and a few commands.

2. Automated testing environments

Compose provides a convenient way to create and destroy isolated testing environments for your test suite. By defining the full environment in a Compose file you can create and destroy these environments in just a few commands

$ docker-compose up -d
$ ./run_tests
$ docker-compose down

3. Single host deployments

You can use Compose to deploy to a remote Docker Engine. The Docker Engine may be a single instance provisioned with Docker Machine ( https://docs.docker.com/machine/overview/ ) or an entire Docker Swarm cluster ( https://docs.docker.com/swarm/overview/ ).

More detail : https://docs.docker.com/compose/production/

[Gimp] CMYK Separate+ plugin on ubuntu

Prerequisite

Download RGB and CMYK profile on adobe’s website.

http://download.adobe.com/pub/adobe/iccprofiles/win/AdobeICCProfilesWin_end-user.zip

Installation

Separate+ will be in gimp-plugin-registry that can be installed by using the following command.

$ sudo apt-get install gimp-plugin-registry

Installation verification

Separate binary file will be in /usr/lib/gimp/2.0/plug-ins.

separateplusubuntu.png

or in whatever plugin directory specified in Edit > Preferences

gimppluginsdirectory.png

After restart gimp, the separate+ menu will be at Image > Separate

Usage

Image > Separate > Separate

separate.png

Then we will got the ugly B/W image.

At that image, run

Image > Separate > Proof

proof.png

then we will got the nice CMYK image.

facebook api version

  1. api shown in app setting page is the oldest version that that app can use

facebook_api_version.png

2. app can request to multiples version, but cannot request to the version that is older than the API version shown in the app setting.

3. An upgrade testing can be set in the app setting

api_upgrade_call.png

ref : https://developers.facebook.com/docs/apps/versions

 

[ git ] list all branch that already merged

git branch --merged master

lists branches merged into master

git branch --merged

lists branches merged into HEAD (i.e. tip of current branch)

git branch --no-merged

lists branches that have not been merged

By default this applies to only the local branches. The -a flag will show both local and remote branches, and the -r flag shows only the remote branches.

http://stackoverflow.com/questions/226976/how-can-i-know-in-git-if-a-branch-has-been-already-merged-into-master