Skip to content

Instantly share code, notes, and snippets.

View yudai's full-sized avatar

Iwasaki Yudai yudai

View GitHub Profile
Error 450001: Compile Package Failure (exit code: 2)
/var/vcap/bosh/lib/ruby/gems/1.9.1/gems/bosh_agent-1.5.0.pre.1644/lib/bosh_agent/message/compile_package.rb:206:in `block in compile'
/var/vcap/bosh/lib/ruby/gems/1.9.1/gems/bosh_agent-1.5.0.pre.1644/lib/bosh_agent/message/compile_package.rb:190:in `chdir'
/var/vcap/bosh/lib/ruby/gems/1.9.1/gems/bosh_agent-1.5.0.pre.1644/lib/bosh_agent/message/compile_package.rb:190:in `compile'
/var/vcap/bosh/lib/ruby/gems/1.9.1/gems/bosh_agent-1.5.0.pre.1644/lib/bosh_agent/message/compile_package.rb:64:in `start'
/var/vcap/bosh/lib/ruby/gems/1.9.1/gems/bosh_agent-1.5.0.pre.1644/lib/bosh_agent/message/compile_package.rb:31:in `process'
/var/vcap/bosh/lib/ruby/gems/1.9.1/gems/bosh_agent-1.5.0.pre.1644/lib/bosh_agent/handler.rb:265:in `process'
/var/vcap/bosh/lib/ruby/gems/1.9.1/gems/bosh_agent-1.5.0.pre.1644/lib/bosh_agent/handler.rb:250:in `process_long_running'
/var/vcap/bosh/lib/ruby/gems/1.9.1/gems/bosh_agent-1.5.0.pre.1644/lib/bosh_agent/handler.rb:177:in `block in pro
@yudai
yudai / gist:8857785
Created February 7, 2014 05:32
which do you like?
#1
obj.method0(
arg1,
arg2)
.method1
.method2
#2
obj.method0(
arg1,
---
name: firstbosh
logging:
level: DEBUG
network:
type: dynamic
vip: <FLOATING_IP> # CHANGE
cloud_properties:
network_name: <SUBNETWORK_NAME> # CHANGE
@yudai
yudai / gist:c613913b1123647655b1
Last active August 29, 2015 14:16
Find .gvm_local
function activate_gvm_pkgset() {
if [ -n "$__in_active_gvm_pkgset" ]; then
return
fi
__in_active_gvm_pkgset=true
nearest_local=((../)#.gvm_local/..(#qN)(:a))
if [ -d "$nearest_local" ] && \
[ "$nearest_local" != "$__gvm_local_path" ]; then
current=$(pwd)
cd $nearest_local
@yudai
yudai / gist:8ac50af71dccd3fd390c
Created March 20, 2015 23:05
To fix go-remove-unused-imports
(defun my-go-unused-imports-lines ()
;; FIXME Technically, -o /dev/null fails in quite some cases (on
;; Windows, when compiling from within GOPATH). Practically,
;; however, it has the same end result: There won't be a
;; compiled binary/archive, and we'll get our import errors when
;; there are any.
(reverse (remove nil
(mapcar
(lambda (line)
(when (string-match "^\\(.+\\):\\([[:digit:]]+\\): imported and not used: \".+\".*$" line)
func (r *Runner) Start(handler func([T]), channel chan [T]) {
go func() {
for {
select {
case i := <-runner.Interrupt:
return
case msg := <-channel
handler(msg)
}
}
@yudai
yudai / ngn.path
Created May 5, 2012 15:54
patch for wide_mkduid.pl to generate NGN-compatible DUIDs
--- wide_mkduid.pl.orig 2007-12-04 05:18:51.000000000 +0900
+++ wide_mkduid.pl 2012-05-06 00:56:25.207991279 +0900
@@ -79,8 +79,9 @@
# form the first two words of the DUID data: DUID type and link type.
# link-type is assumed to be ethernet(6)!
+# but for NGN, link-type is always 1!
-$duid_data = chr(0) . chr($duidtype) . chr(0) . chr(6);
+$duid_data = chr(0) . chr($duidtype) . chr(0) . chr(1);
@yudai
yudai / gist:4591856
Created January 22, 2013 03:37
Extract highlights from kindle
$(".highlight").each(function(){console.log($(this).text().replace(/["';,.]/g, ""))})
class PropertyChain
def initialize(value)
@value = value
end
def method_missing(action, *args)
if @value.key?(action)
PropertyChain.new(@value[action])
else
nil
end
@yudai
yudai / vcap_me.sh
Created February 13, 2013 11:38
Set up script for self-hosting vcap.me domain
#!/bin/sh
cat <EOF >> /etc/bind/named.conf.local
zone "vcap.me" IN {
type master; file "vcap.me.zone"; allow-update { none; };
};
EOF
cat <EOF > /etc/bind/db/vcap.me.zone
$TTL 86400@ IN SOA localhost root (
1 ; serial (d. adams)