「Linuxはとりあえず人気のあるUbuntuを使っている」という方は多いのでは
無いでしょうか。
この話はDebianとUbuntuの違いを挙げ、どちらがみなさんに適しているか考え
てみていただくことを目的としています。
This file contains hidden or 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
namespace :db do | |
require "sequel" | |
Sequel.extension :migration | |
DB = Sequel.connect(ENV['DATABASE_URL']) | |
desc "Prints current schema version" | |
task :version do | |
version = if DB.tables.include?(:schema_info) | |
DB[:schema_info].first[:version] | |
end || 0 |
This file contains hidden or 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
// Twitterモジュールをインストールする必要がある。 | |
var sys = require('sys'), | |
twitter = require('twitter'); | |
var twit = new twitter({ | |
consumer_key: '****', // CONSUMER_KEYを指定する。 | |
consumer_secret: '****', // CONSUMER_SECRETを指定する。 | |
// ACCESS_TOKEN_KEYとACCESS_TOKEN_SECRETの取得はhttps://gist.github.com/802917を参照。 | |
access_token_key: '****', // ACCESS_TOKEN_KEYを指定する。 | |
access_token_secret: '****' // ACCESS_TOKEN_SECRETを指定する。 | |
}); |
This file contains hidden or 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
var ux_nu = require('./ux_nu'); | |
//短縮(Shorten) | |
ux_nu.shorten('http://www.gehirn.co.jp/', function (err, url, obj) { | |
console.log(url); | |
}); | |
//元に戻す(Expand) | |
ux_nu.expand('http://ux.nu/Gehirn', function (err, url, obj) { | |
console.log(url); |
NewerOlder