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
deb-src http://us.archive.ubuntu.com/ubuntu/ lucid main restricted | |
## Major bug fix updates produced after the final release of the | |
## distribution. | |
deb http://us.archive.ubuntu.com/ubuntu/ lucid-updates main restricted | |
deb-src http://us.archive.ubuntu.com/ubuntu/ lucid-updates main restricted | |
## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu | |
## team. Also, please note that software in universe WILL NOT receive any | |
## review or updates from the Ubuntu security team. |
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
upstream thin { | |
server 127.0.0.1:3000; | |
} | |
#server { | |
# listen 80; | |
# server_name example.com; | |
# rewrite ^(.*)$ http://www.example.com$1 permanent; | |
#} |
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
#include <stdio.h> | |
#include <stdlib.h> // for exit | |
#include <sys/socket.h> // for socket | |
#include <sys/types.h> | |
#include <unistd.h> | |
#include <netinet/in.h> | |
#include <arpa/inet.h> | |
#include <string.h> | |
#include <errno.h> | |
#include <sys/wait.h> |
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
class Class | |
def where | |
"in class Class" | |
end | |
end | |
person = Class.new | |
puts "person.where: #{person.where}" # => "in class Class" | |
class << person |
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
<% items = [] %> | |
<% ["About", "FAQ", "Mission", "Blog", "Advertise"].each do |page| %> | |
<% items << %(<strong>#{link_to t(page.downcase.to_sym), '/page/#{page.downcase}', :class => :dark}</strong>) %> | |
<% end %> | |
<%=raw items.join(' | ') %> |
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
def v2ex_api(path) | |
url = URI.parse("http://v2ex.appspot.com") | |
res = Net::HTTP.start(url.host, url.port) do |http| | |
http.get(path) | |
end | |
ActiveSupport::JSON.decode res.body | |
end | |
puts v2ex_api("/api/members/show.json?username=daqing").inspect |
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
/** | |
* Basecamp stylesheet, based on "alternate" | |
* author: Peter Theill, Commanigy - http://commanigy.com | |
* | |
* @2009-11-16 - fix #3069 | |
* @2009-11-12 - styling "password" fields as well with a simple border (similar to other fields) | |
* | |
*/ | |
@import url(../../../stylesheets/application.css); |
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
#!/usr/bin/expect -f | |
array set d { | |
141 "abc" | |
142 "foobar" | |
145 "buz" | |
} | |
if { $argc != 1 } { | |
puts "usage: $argv0 HOST" | |
puts "HOST can be 195 or 201" |
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
" ========================= | |
" File: daqing.vim | |
" Description: small plugin to asistant my day-to-day development | |
" Maintainer: Kinch Zhang <kinch.zhang@gmail.com> | |
" License: The MIT License <http://www.opensource.org/licenses/mit-license.php> | |
" ========================= | |
fun! Write(str) | |
execute "normal I" . a:str . "\<Esc>" | |
endfun |