Skip to content

Instantly share code, notes, and snippets.

View yrchen's full-sized avatar

Xaver Y.R. Chen yrchen

View GitHub Profile
@yrchen
yrchen / gnutls-cli -p 443 github.com
Created November 22, 2011 08:32
gnutls-cli -p 443 github.com (MAGI.ATCity.org)
➜ ~ gnutls-cli -p 443 github.com
Resolving 'github.com'...
Connecting to '207.97.227.239:443'...
- Certificate type: X.509
- Got a certificate list of 2 certificates.
- Certificate[0] info:
- subject `2.5.4.15=#0c1450726976617465204f7267616e697a6174696f6e,1.3.6.1.4.1.311.60.2.1.3=#13025553,1.3.6.1.4.1.311.60.2.1.2=#130a43616c69666f726e6961,serialNumber=C3268102,C=US,ST=California,L=San Francisco,O=GitHub\, Inc.,CN=github.com', issuer `C=US,O=DigiCert Inc,OU=www.digicert.com,CN=DigiCert High Assurance EV CA-1', RSA key 2048 bits, signed using RSA-SHA1, activated `2011-05-27 00:00:00 UTC', expires `2013-07-29 12:00:00 UTC', SHA-1 fingerprint `ce6799252cac78127d94b5622c31c516a6347353'
- Certificate[1] info:
- subject `C=US,O=DigiCert Inc,OU=www.digicert.com,CN=DigiCert High Assurance EV CA-1', issuer `C=US,O=DigiCert Inc,OU=www.digicert.com,CN=DigiCert High Assurance EV Root CA', RSA key 2048 bits, signed using RSA-SHA1, activated `2006-11-10 00:00:00 UTC', expi
@yrchen
yrchen / gist:1308571
Created October 24, 2011 08:13
今天要吃什麼 @ NCU
再來一次
萊爾富 (後門)
先椿坊 (後門)
拉亞早餐 (後門)
福泉 (後門)
巧味香早餐 (後門)
宜而美前面的小攤子 (後門)
7-11 (後門)
隨緣 (後門)
麥味登早餐 (後門)
@yrchen
yrchen / GradeBook.h
Created October 6, 2011 13:41
2011F-CE1001 AS#3 3-1
#include <string>
using namespace std;
Class GradeBook
{
public:
GradeBook(string); // constructor
void setCourseName(string); // set course name
string getCourseName(); // get the course name
Please install RDoc 2.4.2+ to generate documentation.
rake aborted!
undefined method `requirement' for #<Rails::GemDependency:0xb702f99c>
/usr/share/redmine/config/../vendor/rails/railties/lib/rails/gem_dependency.rb:81:in `add_load_paths'
/usr/share/redmine/config/../vendor/rails/railties/lib/initializer.rb:301:in `add_gem_load_paths'
/usr/share/redmine/config/../vendor/rails/railties/lib/initializer.rb:301:in `each'
/usr/share/redmine/config/../vendor/rails/railties/lib/initializer.rb:301:in `add_gem_load_paths'
/usr/share/redmine/config/../vendor/rails/railties/lib/initializer.rb:132:in `process'
/usr/share/redmine/config/../vendor/rails/railties/lib/initializer.rb:113:in `send'
/usr/share/redmine/config/../vendor/rails/railties/lib/initializer.rb:113:in `run'
brew install mysql
brew install imagemagick
gem install rails
gem install rails -v=2.3.8
gem install mysql2
gem install mysql
gem install passenger
gem install nokogiri
gem install capistrano
<?php
// $Id$
/**
* Valid permissions for this module
* @return array An array of valid permissions for the coscup_sponsorship module
*/
function coscup_sponsorship_perm()
{
return array('access sponsorship content');
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html lang="en" dir="ltr"><head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Sponsorship Form | COSCUP Sponsors Information Hub (Test Site)</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link rel="shortcut icon" href="/sponsor/misc/favicon.ico" type="image/x-icon" />
#!/bin/sh
#
# This hook does two things:
#
# 1. update the "info" files that allow the list of references to be
# queries over dumb transports such as http
#
# 2. if this repository looks like it is a non-bare repository, and
# the checked-out branch is pushed to, then update the working copy.
# This makes "push" function somewhat similarly to darcs and bzr.
@yrchen
yrchen / gist:916357
Created April 12, 2011 20:41
Remote Machine
$ cd git
$ mkdir somesite.git
$ cd somesite.git/
$ git init --bare
Initialized empty Git repository in /home/caius/git/somesite.git/
$ git --bare update-server-info
$ git config core.worktree /home/caius/vhosts/somesite.com/htdocs
$ git config core.bare false
$ git config receive.denycurrentbranch ignore
$ cat > hooks/post-receive
export PATH="~/bin:/opt/local/bin:/opt/local/sbin:/usr/local/bin:/usr/local/sbin/:$PATH"
export EDITOR=nano
export LANG=en_US.UTF-8
UNAME=`uname`
if [[ $UNAME == "Darwin" ]]
then
export LSCOLORS="gxfxcxdxbxegedabagacad"
alias ls='ls -Gv'
elif [[ $UNAME == "Linux" ]]