Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@aluenkinglee
aluenkinglee / README.md
Created September 1, 2014 08:12 — forked from mbostock/.block

A dendrogram is a node-link diagram that places leaf nodes of the tree at the same depth. In this example, the classes (leaf nodes) are aligned on the right edge, with the packages (internal nodes) to the left. Data shows the Flare class hierarchy, courtesy Jeff Heer.

Compare to this radial layout.

@aluenkinglee
aluenkinglee / Aggregation.py
Created September 1, 2014 08:59
该文件是用来提取用户标签并形成”标签-用户“稀疏矩阵,然后使用聚合算法得到标签树状图
'''
Auth : King Lee
Time : 2014-08-20 23:48:30
this program is to find the similar weibo labels using hierarchical
cluster method on lable-user sparse matrix.
'''
from math import sqrt
from os import listdir

Multiple SSH Keys settings for different github account

create different public key

create different ssh key according the article Mac Set-Up Git

$ ssh-keygen -t rsa -C "your_email@youremail.com"
@aluenkinglee
aluenkinglee / kafka.md
Last active August 29, 2015 14:22 — forked from ashrithr/kafka.md

Introduction to Kafka

Kafka acts as a kind of write-ahead log (WAL) that records messages to a persistent store (disk) and allows subscribers to read and apply these changes to their own stores in a system appropriate time-frame.

Terminology:

  • Producers send messages to brokers
  • Consumers read messages from brokers
  • Messages are sent to a topic

Set up Django, nginx and uwsgi

Steps with explanations to set up a server using:

  • virtualenv
  • Django
  • nginx
  • uwsgi
!!! 5
//if lt IE 7
<html class="no-js lt-ie9 lt-ie8 lt-ie7">
//if IE 7
<html class="no-js lt-ie9 lt-ie8">
//if IE 8
<html class="no-js lt-ie9">
//[if gt IE 8]><!
html(class='no-js')
//<![endif]

Set up Django, nginx and uwsgi

Steps with explanations to set up a server using:

  • virtualenv
  • Django
  • nginx
  • uwsgi
@aluenkinglee
aluenkinglee / rbenv-install-and-using.md
Created April 23, 2016 14:29 — forked from sandyxu/rbenv-install-and-using.md
使用 rbenv 安装和管理Ruby版本

常用的几个 Ruby 版本管理工具有:rvmrbenv,ry,rbfu。rvm 应该是最早出现、使用最多的,因为过于强大以至于违背了某个 Linux 软件开发原则,所以出现了很多轻便的替代者,其中来自 37signals 的 rbenv 就很受欢迎。ry 和 rbfu 看上去更轻便,不过使用不广泛。之前使用过rvm, 这次尝试下rbenv。

我的环境是 Ubuntu14.04

1. 安装 rbenv

rbenv的源代码托管在github,在终端中,从 github 上将 rbenv 源码 clone 到本地,然后设置 $PATH。

git clone git://github.com/sstephenson/rbenv.git ~/.rbenv
echo 'export PATH="$HOME/.rbenv/bin:$PATH"' &gt;&gt; ~/.bashrc
@aluenkinglee
aluenkinglee / proxy_for_terminal.md
Created October 22, 2020 01:59 — forked from fearblackcat/proxy_for_terminal.md
Set proxy for terminal on mac

Shadowsocks Proxy

apt-get install python-pip
pip install shadowsocks

sudo ssserver -p 443 -k password -m aes-256-cfb --user nobody -d start
@aluenkinglee
aluenkinglee / proxy_for_terminal.md
Created October 22, 2020 01:59 — forked from fearblackcat/proxy_for_terminal.md
Set proxy for terminal on mac

Shadowsocks Proxy

apt-get install python-pip
pip install shadowsocks

sudo ssserver -p 443 -k password -m aes-256-cfb --user nobody -d start