自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

hahaliu005的专栏

Make everything possible

  • 博客(87)
  • 收藏
  • 关注

原创 Install NFS(network file system)

Reference from linkInstall NFS server in both host and client server:sudo apt-get updatesudo apt-get install nfs-kernel-serverInstall nfs common in the client server:sudo apt-get updatesudo apt-g

2015-12-12 15:32:01 578

原创 Install gearman

Install gearman deamon serverapt-get install gearman-job-server libgearman-devInstall php dependencesudo apt-get install php-pearsudo apt-get install php5-devsudo pecl install gearmanInclude the

2015-12-11 00:12:57 558

转载 Install ffmpeg

The Tutorial reference from this link, but there had something different.Update apt-get rep : sudo apt-get update sudo apt-get -y --force-yes install autoconf automake build-essential libass-d

2015-12-10 23:52:22 568

原创 关于对erlang中由于没有return导致嵌套太深的解决办法

关于对erlang中由于没有return导致嵌套太深的解决办法在一些语言中,比如erlang,是没有return语句的,这也就意味着像一些需要立即返回的语句,erlang却无法做到,比如说以下的c语言:void test(){ if(! check_one()){ return; } if(! check_two()){ return;

2015-09-15 10:17:30 1479

原创 erlang send mail

Can use gen_smtp to send mail ,git clone https://github.com/Vagabond/gen_smtp.git

2014-10-15 14:43:12 886

原创 ruby send mail

require 'mail'Mail.defaults do  delivery_method :smtp, { :address              => "smtp.163.com",                           :port                 => 25,                           :user_name  

2014-10-15 14:42:22 711

原创 can not connect to linux server with ssh without password

Sometimes, although you set th

2014-09-14 23:31:27 613

原创 Use zsh term within vim mode

System:mac Terminal : iterm2

2014-08-26 21:37:56 797

原创 an bug when edit ruby file

I opened an vim window begin to edit ruby file happily, th

2014-08-25 18:29:07 644

转载 A practical introduction to MochiWeb

A practical introduction to MochiWebPublished on 11 July 2011, updated on 11 July 2011, 34 CommentsIntroductionGetting startedDocumentationBasic request handlingRendering tem

2014-07-04 17:03:37 735

转载 利用 kerl 來管理你系統上的 Erlang 版本

原文链接: 最近又回到了 Erlang 的懷抱了,不過之前因爲有自己弄了版本管理的方法,所以當初沒有試試看這一套,換了新的 MacBook Pro Retina 之後第一次開始寫 Erlang,剛好拿這套 Kerl 來用一下,試用一下發現真的很不錯呢!於是心血來潮寫一篇介紹來給中文的 Erlang developers 看一下。Kerl 是幹什麼用的?因爲 Er

2014-06-11 18:15:27 2270

原创 ruby中的异常与变量的初始化

ruby 中异常的处理语法是这样的:

2014-05-26 14:06:05 626

原创 nginx config php in mac system

brew is a application management component in the mac system , use it to install nginx and php is very convenience .install nginx$ brew install nginxinstall php$ brew tap homebrew/dupes$ brew

2013-12-24 14:36:13 912

原创 Use expect command to interact with mysql in linux system

The "expect" command is not install in some linux system default , in the ubuntu system , you can simplly tap "sudo apt-get install expect" to install this tool.And then , if you want to use to in t

2013-12-02 10:43:59 938

原创 Fork bomb

Do not exec blow command unless you want your computer bang bang .:(){ :|:& };:

2013-11-29 17:45:49 546

原创 Install the powerful vim plugin in ubuntu system

This vim plugin include many other good plugin , you only need to simply tap the comand below:wget https://raw.github.com/ma6174/vim/master/setup.sh -O ma6174_vim_setup.sh && bash ma6174_vim_setup.s

2013-11-29 15:56:08 554

原创 Rails captcha in ubuntu system

Use rails scale to init the captcha.I use a gem called simple_captcha , before you use this gem , first you must install the imagemagick , for the save , tap the command below:sudo apt-get install

2013-11-29 14:38:16 888

原创 ubuntu config the time and time zone

sudo dpkg-reconfigure tzdata#for restart below can take effectsudo cp /usr/share/zoneinfo/Asia/Chongqing /etc/localtime#install ntpdate to sync the timesudo apt-get install ntpdatesudo ntpdate cn

2013-11-28 17:12:21 651

原创 rails gem change the source

gem source -l#http://rubygems.org/gem source -r http://rubygems.org/gem source -a http://ruby.taobao.org/

2013-11-27 23:04:51 843

原创 gem install mysql2 failed in ubuntu

sudo apt-get install mysql-serversudo apt-get install mysql-clientsudo apt-get install libmysql-ruby libmysqlclient-dev

2013-11-27 23:01:18 640

原创 Add user with sudo

If you want to add an new user with sudo , you can use:sudo adduser usernamethis will add an user add edit the sudo file:sudo visudoctrl+o   is writectrl+c   is cancelctrl+x   is exit

2013-11-27 09:17:41 1227

原创 warning: setlocale: LC_CTYPE: cannot change locale (zh_CN.UTF-8)

I exprienced this problem when I use dir "tab" key in the ubuntu 10.04 system , and to solve it is simply add a line in the /etc/default/local :LC_ALL="en_GB.UTF-8"

2013-11-27 08:53:28 4067

原创 mac system , share folder with ubuntu virtual system in the vmware fusion

When I use ubuntu 12.4 server or desktop installed in the mac vmware fusion . It always can not share folder in the ubuntu virtual machine , no matter I reinstall vmware tools one by one . When I in

2013-11-26 23:59:50 1350

原创 The commpression command in the linux (gzip , tar)

There was a test when you commpression one file repeatly:➜ ~ ls -al test-rw-r--r--@ 1 liugang staff 3180 11 26 18:04 test➜ ~ gzip test➜ ~ ls -al test.gz-rw-r--r--@ 1 liugang staff 842

2013-11-26 18:43:35 530

原创 Use pssh to manage muti hosts

When there are many server need to manage , maybe you need to use pssh to manage your servers.First install pssh.Then create a hosts.txt which include all the server you need to manage . just like

2013-11-26 10:38:02 602

原创 ubuntu command-not-found

When you meet this error:Sorry, command-not-found has crashed!  bla bla ......You may try this:export LANGUAGE=en_US.UTF-8export LANG=en_US.UTF-8export LC_ALL=en_US.UTF-8locale-gen en_U

2013-11-25 13:30:22 2290 1

原创 The distinguish of module , class when nested in ruby

For Module can't be instance , so can't call it directily , include it to class , new the class and call module.module M1 module M2 class C3 def two p 'this is two' end

2013-10-13 10:06:09 580

原创 Fibonacci

#includeusing namespace std;int feb(int n){ cout<<n<<endl; if(n == 0 ){ return 0; } if(n == 1){ return 1; } return feb(n - 1) + feb(n - 2);}int f(int n){ int tp; if(n == 1 || n == 2){

2013-07-02 21:53:02 401

转载 The operate of stack

typedef char SElemType;#include "header.c"#include "SqStack.c"SElemType Precede(SElemType t1 , SElemType t2){ SElemType f; switch(t2){ case '+': case '-':if(t1 == '(' || t1 == '#'){ f = '<

2013-01-19 22:39:20 324

原创 The using of stack

#include "header.c"typedef char SElemType;#include "LinkStack.c"//conversion decimal to octalvoid conversion(){ LinkStack S; int N,e; InitStack(&S); printf("Enter a decimal : "); scanf("%d",

2013-01-19 21:34:09 284

转载 Link Stack

LinkStack.ctypedef SElemType ElemType;#include "SLinkList.c"typedef LinkList LinkStack;#define InitStack InitList#define DestroyStack DestroyList#define ClearStack ClearList#define StackEmp

2013-01-14 01:33:54 497

转载 Another Single Link List

SLinkList.cstruct LNode{ ElemType data; struct LNode *next;};typedef struct LNode *LinkList;Status InitList(LinkList *L){ *L = (LinkList)malloc(sizeof(struct LNode)); if(!*L){ exit(OVERFL

2013-01-14 00:27:18 325

转载 Single link list

LinkList.ctypedef struct LNode{ ElemType data; struct LNode *next;}*Link , *Position , LNode;typedef struct { Link head , tail; int len;}LinkList;Status MakeNode(Link *p , ElemType e){ *

2013-01-13 16:22:11 475

转载 The express of stack squenced

SqStack.c#define STACK_INIT_SIZE 100#define STACKINCREMENT 10typedef struct{ SElemType *base; SElemType *top; int stacksize;}SqStack;Status InitStack(SqStack *S){ (*S).base = (SElemType *

2013-01-13 15:20:16 268

转载 Polynomial use LinkList

Polynomial.c#include "LinkList.c"typedef LinkList polynomial;#define DestroyPolyn DestroyList#define PolynLength ListLengthStatus OrderInsertMerge(LinkList *L , ElemType e , int(*compare)(ter

2013-01-12 23:48:47 475

转载 Doubly linked list

DuLinkList.ctypedef struct DuLNode{ ElemType data; struct DuLNode *prior , *next;}DuLNode,*DuLinkList;Status InitList(DuLinkList *L){ *L = (DuLinkList)malloc(sizeof(DuLNode)); if(*L){ (*L)

2013-01-12 22:08:51 386

转载 The Link List with C

LinkList.ctypedef struct LNode{ ElemType data; struct LNode *next;}*Link , *Position , LNode;typedef struct { Link head , tail; int len;}LinkList;Status MakeNode(Link *p , ElemType e){ *p

2013-01-12 15:47:46 817

转载 data struct algo 2-1

#include "header.c"#include "sqList.c"//algo 2-1Status MergeList(SqList La , SqList Lb , SqList *Lc){ int i , j , k = 0 , La_len , Lb_len; ElemType *a,*b,ai,bj; InitList(Lc); La_len = ListLeng

2013-01-01 14:57:19 409

转载 Realize the linear list with C

header.c#include #include #include #include #include #include #include #include #define TRUE 1#define FALSE 0#define OK 1#define ERROR 0#define INFEASIBLE -1typedef int Status;type

2012-12-31 23:11:54 313

原创 VIM config

" Vim5 and later versions support syntax highlighting. Uncommenting the next" line enables syntax highlighting by default.if has("syntax") syntax onendif" Uncomment the following to have Vim jum

2012-12-13 00:32:46 533

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除