This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package cc.omora; | |
import android.app.Activity; | |
import android.os.Bundle; | |
import android.widget.TextView; | |
public class HelloAndroid extends Activity { | |
/** Called when the activity is first created. */ | |
@Override | |
public void onCreate(Bundle savedInstanceState) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'tmpdir' | |
require 'rubygems' | |
require 'chef/shef/ext' | |
require 'chef/providers' | |
require 'chef/resources' | |
require 'sinatra/base' | |
class Patty < Shef::StandAloneSession | |
def reset! | |
loading do |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'digest/md5' | |
action :sync do | |
old_checksum = ::File.exists?(new_resource.name) ? ::Digest::MD5.file(new_resource.name) : nil | |
execute "rsync file" do | |
command "rsync -a -e '#{new_resource.command}' #{new_resource.source} #{new_resource.name}" | |
end | |
ruby_block "see if rsync_file[#{new_resource.name}] was updated" do |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
base_path = File.absolute_path(File.dirname(__FILE__)) | |
file_cache_path base_path | |
cookbook_path File.join(base_path, 'cookbooks') | |
role_path File.join(base_path, 'roles') | |
data_bag_path File.join(base_path, 'data_bags') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
root@ubuntu:~# chef-solo -l fatal -c /tmp/chef-solo/solo.rb -j /tmp/chef-solo/nodes/server01.json --why-run | |
Starting Chef Client, version 10.14.0.beta.3 | |
Compiling Cookbooks... | |
Converging 19 resources | |
Recipe: runit::default | |
* execute[start-runsvdir] action nothing (up to date) | |
* execute[runit-hup-init] action nothing (skipped due to only_if) | |
* package[runit] action installRecipe: <Dynamically Defined Resource> | |
* cookbook_file[/tmp/chef-solo/preseed/runit/runit-2.0.0-1ubuntu4.seed] action create | |
- Would create a new cookbook_file /tmp/chef-solo/preseed/runit/runit-2.0.0-1ubuntu4.seed |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'erb' | |
require 'fileutils' | |
require 'rubygems' | |
require 'git' | |
require 'sinatra/base' | |
require 'json' | |
BANNER = 'Usage: ruby chef-solo-sandbox.rb /path/to/dir [cookbook1 [cookbook2 [cookbook3 ...]]]' | |
def main(argv) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# coding:utf-8 | |
require 'uri' | |
require 'mechanize' | |
INDICE = %w(あ か さ た な は ま や ら・わ) | |
URL = "http://ja.wikipedia.org/wiki/AV女優一覧_%s行" | |
mech = Mechanize.new | |
mech.user_agent_alias = "Windows IE 7" | |
kanji_list = [] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ node socket_io_namespace_authorization_test.js localhost 1234 | |
info - socket.io started | |
/null_true への接続を試行しています | |
socket 全体で connect を受信しました | |
名前空間 /null_true で connect を受信しました (理由:undefined) | |
---------------------------------------------------------------------- | |
/null_false への接続を試行しています | |
socket 全体で connect を受信しました | |
名前空間 /null_false で connect_failed を受信しました (理由:unauthorized) | |
---------------------------------------------------------------------- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Notification, | |
Our company’s courier couldn’t make the delivery of parcel. | |
Reason\It’s not right specified size and the weight of parcel. | |
LOCATION OF YOUR PARCEL:Albuquerque | |
STATUS OF YOUR ITEM: not delivered | |
SERVICE: One-day Shipping | |
:XXXXXXXXXXXX | |
INSURANCE: Yes |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Usage: ruby chef_solo_in_your_application.rb | |
require 'rubygems' | |
require 'chef' | |
Chef::Config[:solo] = true | |
Chef::Config[:file_cache_path] = '/path/to/chef-repo' | |
Chef::Config[:cookbook_path] = ['/path/to/chef-repo/cookbooks'] | |
@chef_solo = Chef::Client.new(JSON.load File.read ARGV.first) | |
@chef_solo.run |