Skip to content

Instantly share code, notes, and snippets.

Yi-Ting Cheng xdite

Block or report user

Report or block xdite

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
xdite / gist:6419
Created Aug 20, 2008
Google AutoLogin
View gist:6419
require 'net/http'
require 'net/https'
require 'cgi'
require 'uri'
require 'rubygems'
require 'hpricot'
module Net
class HTTPS < HTTP
def initialize(address, port = nil)
View DailyVisit
SELECT count(id) as hits,
LEFT(created_at,10) as created_on,
event_id FROM `visits` WHERE (left(created_at,10) = '2008-08-20' and type = 'EventVisit') AND ( (`visits`.`type` = 'EventVisit' ) ) GROUP BY created_on, event_id ORDER BY created_on DESC, event_id ASC
View gist:6561
# 先在你的 PHP WebApplication 的根目錄建一個目錄, 叫 config , 裡面放置此 rb
# 官方文件
# Capistrano PHP
# Capistrano 會用到許多 rake 技巧
# rake 教學請看
# rake 教學中文版請看
# ---
# 前置動作
# cd /blah/project
View gist:6577
作者 dbn (DBN) 看板 Blog
標題 [情報] 痞客邦改網址不影響 PageRank?
時間 Thu Aug 21 23:08:24 2008
View gist:8385
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "">
<html xmlns="" xml:lang="en" lang="en">
<head profile="">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<link rel="selenium.base" href="" />
<title>New Test</title>
<table cellpadding="1" cellspacing="1" border="1">
View gist:10417
namespace :deploy do
desc "Create database.yml and asset packages for production"
task :after_update_code, :roles => [:web] do
db_config = "#{shared_path}/config/database.yml.production"
run <<-EOF
cp #{db_config} #{release_path}/config/database.yml
run <<-EOF
View gist:15253
? test/unit/email_test.rb
? test/functional/channel_posts_controller_test.rb
? test/functional/user_channels_controller_test.rb
? test/fixtures/emails.yml
? app/models/user_notifier.rb
? app/models/email.rb
M app/models/user.rb
M app/controllers/users_controller.rb
? app/views/user_notifier
? app/views/users/forgot.html.erb
View blogs_controller.rb
class BlogsController < ApplicationController
def index
@posts = Post.find(:all)
def show
@post = Post.find(params[:id])
You can’t perform that action at this time.