摘要:
设置ibus-pinyin在终端中运行 /usr/lib/ibus-pinyin/ibus-setup-pinyin命令可以调出ibus的完整设置对话框设置ibus-sunpinyin可以执行ibus-sunpinyin自带的python设置脚本ibus-setup-sunpinyin来全面设置它 ... 阅读全文
摘要:
Install MongoDB on Debian¶This tutorial outlines the steps to installMongoDBon Debian systems. The tutorial uses.debpackages to install. While some De... 阅读全文
摘要:
Mongois a document-oriented database.Install the required gems:gem install mongogem install bson_ext第一步,连接到mongo,可以在configure block完成。require 'sinatra'require 'mongo'require 'json/ext'include Mongoconfigure do conn=MongoClient.new('localhost',27017) set :mongo_connect 阅读全文
摘要:
原文地址:https://ididitmyway.herokuapp.com/past/2010/3/30/superdo_a_sinatra_and_datamapper_to_do_list/这个tutorial说明:怎么构建一个list app,其中要用到数据库来保存task。tutorial概括以下技术:安装 SQLite and Datamapper连接数据库数据库中的CRUD 动作REST风格的urls我在这里主要做的是根据我的实际操作和理解,把整个过程用我熟悉的中国话记录下来,以便下次我还能根据它实现或修改这个App,仅此而已。开始tutorial前,确保已经安装了Sinatra 阅读全文
摘要:
原文URL:http://www.rubycc.com/bbs/topic_detail/861.基础代码app.rbrequire 'rubygems'require 'sinatra/base' class App < Sinatra::Base get '/' do "Hello, World" endend注: ruby版本小于1.9, 必须在第一行加require 'rubygems'看清楚第二行require 'sinatra/base'这是一种基于类的router定义方式。2 阅读全文
摘要:
URL: http://slim-lang.com/Example:doctype htmlhtml head title Slim Examples meta name="keywords" content="template language" meta name="author" content=author javascript: alert('Slim supports embedded javascript!') body h1 Markup examples #content p This example 阅读全文
摘要:
1. Install sinatra gemgem install sinatra --no-ri --no-rdoc2. Basic App#!/usr/bin/rubyrequire 'sinatra'get '/' do "Just Do It"endruby低于1.9,需要在文件开头加require 'rubygems'ruby basic.rbOpen up your browser and go tohttp://localhost:4567. 3. Inline TemplateSlimis a fantasti 阅读全文
摘要:
error message: no such file ....安装gem install sqlite3-ruby -- --with-sqlite3-dir=/usr/local/lib 阅读全文
摘要:
gnome-control-center系统设置gnome-control-center region键盘布局gnome-control-center screen屏幕gnome-control-center background外观gnome-control-center language语言支持system-config-printer打印gnome-control-center power电源jockey-gtk附加驱动gnome-control-center keyboard键盘gnome-control-center media可移动介质gnome-control-center bl 阅读全文
摘要:
安装配置pip / easy_install / virtualenv在ubuntu 10.10之后的版本中,要这样安装sudo apt-get install python-pip python-dev build-essentialsudo pip install --upgrade pipsudo pip install --upgrade virtualenv 在旧版本ubuntu中,要这样安装:sudo apt-get install python-setuptools python-dev build-essentialsudo easy_install pipsudo ... 阅读全文