Skip to content

Instantly share code, notes, and snippets.

@takumikinjo
takumikinjo / .gitignore
Last active August 29, 2015 14:01
Vagrantfile for Docker on Ubuntu 14.04 in OkinawaDevOps
.vagrant
@takumikinjo
takumikinjo / Vagrantfile
Last active August 29, 2015 14:02
Vagrantfile for my base Box
# -*- mode: ruby -*-
# vi: set ft=ruby :
# Vagrantfile API/syntax version. Don't touch unless you know what you're doing!
VAGRANTFILE_API_VERSION = "2"
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
# All Vagrant configuration is done here. The most common configuration
# options are documented and commented below. For a complete reference,
# please see the online documentation at vagrantup.com.
@takumikinjo
takumikinjo / ubuntu-base
Last active August 29, 2015 14:03
My favorite packages.
# test
linux-headers-generic
build-essential
bzr
curl
cvs
dnsutils
git
lv
manpages
@takumikinjo
takumikinjo / Dockerfile
Last active August 29, 2015 14:03
Dockerfile using baseimage-docker for my trial.
FROM phusion/baseimage:0.9.11
ENV HOME /root
RUN /etc/my_init.d/00_regen_ssh_host_keys.sh
RUN echo /root > /etc/container_environment/HOME
Add id_rsa.pub /tmp/id_rsa.pub
RUN cat /tmp/id_rsa.pub >> /root/.ssh/authorized_keys && rm -f /tmp/id_rsa.pub
RUN apt-get update
RUN apt-get install -y autoconf bison build-essential curl git-core libncurses5-dev libreadline6-dev libsqlite3-dev libssl-dev libxml2-dev libxslt1-dev libyaml-dev sqlite3 zlib1g-dev
@takumikinjo
takumikinjo / Vagrantfile
Last active August 29, 2015 14:04
Vagrantfile for Ruby installing.
# -*- mode: ruby -*-
# vi: set ft=ruby :
# Vagrantfile API/syntax version. Don't touch unless you know what you're doing!
VAGRANTFILE_API_VERSION = "2"
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
# All Vagrant configuration is done here. The most common configuration
# options are documented and commented below. For a complete reference,
# please see the online documentation at vagrantup.com.
@takumikinjo
takumikinjo / b.py
Last active August 29, 2015 14:04
Example of Bpy with a plane object
data = bpy.data.objects['Plane'].data
data.vertices.add(1)
data.vertices[4].co.x=3
data.edges.add(2)
data.edges[4].vertices[0]=3
data.edges[4].vertices[1]=4
data.edges[5].vertices[0]=1
data.edges[5].vertices[1]=4
@takumikinjo
takumikinjo / Vagrantfile
Created September 6, 2014 05:02
My trial of Ansible.
# -*- mode: ruby -*-
# vi: set ft=ruby :
# Vagrantfile API/syntax version. Don't touch unless you know what you're doing!
VAGRANTFILE_API_VERSION = "2"
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
# All Vagrant configuration is done here. The most common configuration
# options are documented and commented below. For a complete reference,
# please see the online documentation at vagrantup.com.
@takumikinjo
takumikinjo / extra-letter-case.el
Created December 30, 2014 05:30
Extra letter case
;;; extra-letter-case.el --- Extra letter case
;; Copyright (C) 2014 Takumi Kinjo
;; Author: Takumi Kinjo <takumi.kinjo@gmail.com>
;; Keywords: convenience, wp
;; This file is not part of GNU Emacs.
;; This program is free software; you can redistribute it and/or modify
# -*- coding: utf-8 -*-
#!/usr/bin/env ruby
# GET english examples from SpaceAlc
require 'uri'
require 'open-uri'
require 'rubygems'
require 'nokogiri'
def e2j(eng)
eng.downcase.gsub("east", "東").gsub("north", "北").gsub("south", "南").gsub("west", "西").gsub("e", "東").gsub("n", "北").gsub("s", "南").gsub("w", "西")
end