Skip to content

Instantly share code, notes, and snippets.

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
//「カレー」を作るのC言語での表現です。(ジョークアプリ)
//コンパイルして、実行してもなにもおきません。
//
//レシピはハウス食品のサイトを参考にしました。
//http://housefoods.jp/products/catalog/pkgview.php?cd=82995&ct=1
//
@zonoise
zonoise / prototype-masonry-demo.html
Created October 22, 2010 05:00
prototype-masonry-demo.html
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta content="text/html; http-equiv="content-type">
<link href="sprototype-masonry-demo.css" type="text/css" rel="stylesheet">
<script src="http://prototypejs.org/assets/2009/8/31/prototype.js"></script>
<script src="prototype.masonry-0.2.js"></script>
@zonoise
zonoise / prototype-masonry-demo.css
Created October 22, 2010 05:01
prototype-masonry-demo.css
* {
margin: 0;
}
html, body{
background-color:#559ABC;
height:100%;
}
#header{
require 'uri'
require 'net/http'
require 'rexml/document'
require 'date'
Net::HTTP.version_1_2
class AtndApi
EventsPath='/events/'
UsersPath='/events/users'
#!/usr/bin/env ruby
require 'test/unit'
require 'atnd_api'
require 'pp'
class AtndApiTest < Test::Unit::TestCase
def test_search_default
events = AtndApi.events
@zonoise
zonoise / yahoo_api.rb
Created October 29, 2010 04:39
yahoo形態素解析とキーフレーズAPIを触ってみた。
#!/usr/bin/ruby
require 'uri'
require 'net/http'
require 'rexml/document'
require 'yaml'
require 'pp'
Net::HTTP.version_1_2
class YahooApi
@zonoise
zonoise / gist:665976
Created November 7, 2010 05:42
"RAILS_ENV=cucumber rake gems:install"が失敗する。p7
user0@user0-desktop:~/dev/ruby/rails-study$ r2
Using /home/user0/.rvm/gems/ruby-1.8.7-p302
Now using gemset 'r2'
user0@user0-desktop:~/dev/ruby/rails-study$ rails _2.3.10_ cuke-handson
create
create app/controllers
create app/helpers
create app/models
create app/views/layouts
create config/environments
@zonoise
zonoise / gist:671975
Created November 11, 2010 03:56
undefined method `use_transactional_fixtures='
#twitter という名前のgem(http://twitter.rubyforge.org/)の
#サンプルアプリ(https://github.com/jnunemaker/twitter-app/)を動かそうとしているんだけど、
#rake test:units したところ、undefined method `use_transactional_fixtures='
#というエラーが出てハマっている。
#あと、database.ymlがない。
user0@user0-desktop:~/dev/ruby/tmp/twitter-app$ rake test:units
(in /home/user0/dev/ruby/tmp/twitter-app)
/usr/bin/ruby1.8 -I"lib:test" "/home/user0/.rvm/gems/ruby-1.8.7-p302@r2/gems/rake-0.8.7/lib/rake/rake_test_loader.rb" "test/unit/helpers/statuses_helper_test.rb" "test/unit/helpers/direct_messages_helper_test.rb" "test/unit/helpers/friendships_helper_test.rb" "test/unit/user_test.rb"
./test/test_helper.rb:8: undefined method `use_transactional_fixtures=' for ActiveSupport::TestCase:Class (NoMethodError)
@zonoise
zonoise / gist:1491189
Created December 17, 2011 19:51
QUnit Test for "jQuery Mobileでのアプリケーション開発にBackbone.jsを導入しよう"
//Test for Backbone.js sample app
//http://lab.dwango.jp/articles/jquery-mobile-app-development/2-add-mvc-with-backbone.html
module("Friend");
test("initialize",function(){
expect(1);
var friend = new Friend();
ok(friend,"initialize ok");
});
@zonoise
zonoise / gist:1670410
Created January 24, 2012 14:23
ubuntu-vm-builder error log
user0@ML110:~/vm$ sudo ubuntu-vm-builder kvm oneiric --domain newvm --dest newvm --arch i386 --hostname hostnameformyvm --mem 512 --user john --pass doe --ip 192.168.1.101 --mask 255.255.255.0 --net 192.168.1.0 --bcast 192.168.1.255 --gw 192.168.1.1 --dns 192.168.1.1 --mirror http://jp.archive.ubuntu.com/ubuntu --components main,universe --addpkg acpid \ --debug
2012-01-24 23:09:34,653 INFO : Calling hook: preflight_check
2012-01-24 23:09:34,657 INFO : Calling hook: set_defaults
2012-01-24 23:09:34,657 INFO : Calling hook: bootstrap
2012-01-24 23:13:46,232 INFO : Calling hook: configure_os
2012-01-24 23:14:03,168 INFO : invoke-rc.d: policy-rc.d denied execution of start.
2012-01-24 23:14:07,853 INFO :
2012-0