Skip to content

Instantly share code, notes, and snippets.

View v5tech's full-sized avatar
🎯
Focusing

v5tech

🎯
Focusing
  • Xi'an China
  • 03:52 (UTC +08:00)
View GitHub Profile

Install pandoc on Mac OS X 10.8

Install

Install haskell-platform

$ brew install haskell-platform

在mac上安装bzr

ruby -e "$(curl -fsSL https://raw.github.com/Homebrew/homebrew/go/install)"
  • 使用brew安装
brew install bazaar

mac上后台启动mongodb脚本

#!/usr/bin/env bash
nohup mongod --auth --dbpath data/db/ --logpath log/log.txt --rest  > log/nohup.out 2>&1  &
server {
listen 80 default; ## listen for ipv4; this line is default and implied
listen [::]:80 default ipv6only=on; ## listen for ipv6
# Make site accessible from http://localhost/
server_name localhost;
server_name_in_redirect off;
charset utf-8;
user www-data;
# As a thumb rule: One per CPU. If you are serving a large amount
# of static files, which requires blocking disk reads, you may want
# to increase this from the number of cpu_cores available on your
# system.
#
# The maximum number of connections for Nginx is calculated by:
# max_clients = worker_processes * worker_connections
worker_processes 1;
@v5tech
v5tech / git.md
Last active August 29, 2015 13:59
解决git bash 中ls中文显示???问题

在.bash_profile文件中添加以下内容

alias ll='ls -l --show-control-chars --color=tty'
alias ls='ls --show-control-chars --color=tty'
This gist covers a simple Hive eval UDF in Java, that mimics NVL2 functionality in Oracle.
NVL2 is used to handle nulls and conditionally substitute values.
Included:
1. Input data
2. Expected results
3. UDF code in java
4. Hive query to demo the UDF
5. Output
This gist covers a simple Pig eval UDF in Java, that mimics NVL2 functionality in Oracle.
Included:
1. Input data
2. UDF code in java
3. Pig script to demo the UDF
4. Expected result
5. Command to execute script
6. Output