Skip to content

Instantly share code, notes, and snippets.

View noodles-v6's full-sized avatar

noodles noodles-v6

View GitHub Profile
@noodles-v6
noodles-v6 / base64.sh
Created March 29, 2012 04:54 — forked from dex4er/base64.sh
Perl oneliners
# Encoding file
perl -MMIME::Base64 -0777 -ne 'print encode_base64($_)' < file
# Decoding file
perl -MMIME::Base64 -ne 'print decode_base64($_)' < file.b64

今天是 22 岁的最后一天。几个月前,我从沃顿商学院毕业,用文凭上“最高荣誉毕业”的标签安抚了已经年过半百的老妈,然后转头辞去了毕业后的第一份工作,跟一家很受尊敬的公司、还有 150 万的年薪道了别,回到了上海,加入了“刚毕业就失业”俱乐部,开始了一天三顿盒饭的新生活,中间许多精彩剧情暂时略过。  我肯定不是第一个做过这样事的人,也肯定不会是最后一个。所以在说自己的一些有趣故事前,我想借用大家(包括 30 岁甚至 40 岁以上的朋友)的一点时间和一点平和的心态,和大家分享过去一年以来一直没说的一些话。所以前两部说的是对于一些一直困扰着我们的关键词的理解和体会。他们是:欲望、外界、标签、天才、时间、经历、人生目标、后悔、和现实。

  这可能会是一篇科普文,也可能会是一篇长篇小说,但我不想这篇文章变成一篇励志文,大家都审美疲劳了。所以我想忽略阳春白雪,尽管信息量很大,但是至少说一些实实在在的经验和故事,说一些效果立竿见影的观点,再说说活捉林志玲什么的,总之让大家多看一点就多获得一点实际的价值。

第一部:那些最容易被理解错误的事

关于欲望

@noodles-v6
noodles-v6 / .tmux.conf
Created September 11, 2012 07:57 — forked from iwinux/.tmux.conf
tmux.conf
# reference https://bitbucket.org/xuxiaodong/dotman/src/cb7f1e6fb338/.tmux.conf
set -g default-terminal "screen-256color"
set -g display-time 3000
set -g history-limit 65535
set -g base-index 1
set -g pane-base-index 1
set -s escape-time 0
# key bindings
@noodles-v6
noodles-v6 / gist:3736981
Created September 17, 2012 12:18
ORA-12162: TNS:net service name is incorrectly specified
SQL*Plus: Release 10.2.0.3.0 - Production on Fri May 30 10:20:33 2008
Copyright (c) 1982, 2006, Oracle. All Rights Reserved.
SQL> conn /as sysdba
ERROR:
ORA-12162: TNS:net service name is incorrectly specified
以上问题基本上有三种原因造成
@noodles-v6
noodles-v6 / gist:3737985
Created September 17, 2012 15:25
install cx_oracle
in progress (#1046): re-focus this page on deployment of python on linux, esp. suse; perhaps move to PythonDeployment?. for developer set-up, see WritingQualityCode
virtualenv is a tool to create isolated Python environments:
The basic problem being addressed is one of dependencies and versions, and indirectly permissions. Imagine you have an application that needs version 1 of LibFoo , but another application requires version 2. How can you use both these applications? Or what if you want to install an application and leave it be ? If an application works, any change in its libraries or the versions of those libraries can break the application. ... In all these cases, virtualenv can help you.
Machine Set-Up
If your development machine runs ubuntu (or debian) linux, install with apt-get:
@noodles-v6
noodles-v6 / apache2 commands
Created September 18, 2012 06:12
apache2/mod_python/mysql/django install on suse 11
/etc/init.d/apache2 restart
/etc/init.d/mysql start
/etc/init.d/apache2 restart
/etc/init.d/mysql restart
开机自启动
========
@noodles-v6
noodles-v6 / 1
Created September 28, 2012 16:08
Perl中文匹配
!/usr/bin/perl
use strict;
use warnings;
use utf8;
use open ":encoding(utf8)",":std";
open my $infh, "<:encoding(utf8)", "zh.dat" or die $!;
while (<$infh>) {
@noodles-v6
noodles-v6 / Doxyfile
Created October 7, 2012 02:17
produce idl comment document
# Doxyfile 1.6.1
# This file describes the settings to be used by the documentation system
# doxygen (www.doxygen.org) for a project
#
# All text after a hash (#) is considered a comment and will be ignored
# The format is:
# TAG = value [value, ...]
# For lists items can also be appended using:
# TAG += value [value, ...]
@noodles-v6
noodles-v6 / gist:4024149
Created November 6, 2012 11:31
判断字符串是否数字类型
bool is_number(const std::string& s)
{
std::string::const_iterator it = s.begin();
while (it != s.end() && std::isdigit(*it)) ++it;
return !s.empty() && it == s.end();
}
@noodles-v6
noodles-v6 / gist:4483071
Created January 8, 2013 11:27
在linux下安装doxygen
可能的依赖
gun)
m4
Bison