Skip to content

Instantly share code, notes, and snippets.

#!/usr/bin/env python
# -*- coding: utf-8 -*-
# Author: Xie Yanbo <[email protected]>
# Date: 2012-03-21
# see also:
# Unicode Standard Annex #11
# East Asian Width
# http://unicode.org/reports/tr11/
@xyb
xyb / moosefs.rb
Last active July 13, 2016 11:02
Install moosefs on mac osx using homebrew
require "formula"
class Moosefs < Formula
desc "a fault tolerant network distributed file system for petabyte range storage"
homepage "http://moosefs.org/"
url "http://ppa.moosefs.com/src/moosefs-3.0.79-1.tar.gz"
sha256 "f2ddce542c1b2e918060e23e953e220c4a23be982e2bdf214a783f8bac2fb87e"
depends_on "pkg-config" => :build
depends_on "autoconf" => :build
@xyb
xyb / twister.rb
Created July 7, 2016 03:21
Install twister the p2p microblogging software on mac osx using homebrew
require 'formula'
class Twister < Formula
desc "twister is an experimental peer-to-peer microblogging software."
homepage "http://www.twister.net.co/"
url "https://github.com/miguelfreitas/twister-core/archive/v0.9.34.tar.gz"
sha256 "b250508c7d1c72d1d0dcb2377f65199d1af27e3da9a0f4b4277d818304b101bf"
depends_on "autoconf" => :build
depends_on "automake" => :build
@xyb
xyb / Perspective: How to pitch your company.md
Last active December 15, 2015 04:10
Perspective: How to pitch your company

SCOTTSDALE, Ariz.--While in the line for the coffee urn at PC Forum, I overheard a young CEO talking about his company.

Apparently, after it became known that Kleiner Perkins Caufield & Byers was interested in investing in the outfit, another venture capital firm, the chief executive said, chartered a private jet to come visit the company to get in on the funding round. "A private jet," he repeated.

The 1990s are back, or at least a shade of them, if you judge by the chatter at the conference here. (PC Forum is owned by CNET Networks, publisher of News.com.)

Two years ago, two young guys with an idea could have more easily raised funds by standing on a bucket and pretending to be robots. Now, investors will fly across the country to discuss doling out cash on the strength of a hunch.

Cat

@xyb
xyb / THE PMARCA GUIDE TO STARTUPS.md
Last active July 7, 2025 08:31
Marc Andreessen 的创业指导
@xyb
xyb / micropythonreference.textile
Last active February 11, 2023 11:04
Micro Python Library Reference
#!/usr/bin/env python
"""Simple HTTP Server With Upload.
This module builds on BaseHTTPServer by implementing the standard GET
and HEAD requests in a fairly straightforward manner.
"""
@xyb
xyb / httpstub.py
Created September 11, 2014 06:08
a stub http server loading data from current dir
#!/usr/bin/env python
from BaseHTTPServer import BaseHTTPRequestHandler, HTTPServer
import os
PORT_NUMBER = 8080
class HttpStubDirHandler(BaseHTTPRequestHandler):
@xyb
xyb / .vimrc
Created August 11, 2014 08:37
python .vimrc, generated from http://vim-bootstrap.appspot.com/
"*****************************************************************************
"" NeoBundle core
"*****************************************************************************
if has('vim_starting')
set nocompatible " Be iMproved
" Required:
set runtimepath+=~/.vim/bundle/neobundle.vim/
endif
#!/usr/bin/env python2
# Quick and dirty demonstration of CVE-2014-0160 by Jared Stafford ([email protected])
# The author disclaims copyright to this source code.
import sys
import struct
import socket
import time
import select