Skip to content

Instantly share code, notes, and snippets.

View timqian's full-sized avatar
🏖️
In a gap year. Open to new opportunities

Tim Qian timqian

🏖️
In a gap year. Open to new opportunities
View GitHub Profile
# Video: http://rubyhoedown2008.confreaks.com/08-chris-wanstrath-keynote.html
Hi everyone, I'm Chris Wanstrath.
When Jeremy asked me to come talk, I said yes. Hell yes. Immediately. But
then I took a few moments and thought, Wait, why? Why me? What am I supposed
to say that's interesting? Something about Ruby, perhaps. Maybe the
future of it. The future of something, at least. That sounds
keynote-y.
@myrual
myrual / gist:1533941
Created December 29, 2011 12:52
joel spolsky 谈 创业公司 股份 如何分配
创业网友提问:
我有一个新的社会网络应用的构想。我并不期望这个应用可以获得巨大成功,但我想还是有些潜力的。我找过一些好友和同事交流过这个想法,他们都十分喜欢这个构想。还有些朋友甚至提出想作为合作伙伴加入一起进行开发,把想法变为一个可用的软件。
我无法用自己的钱给他们支付工资(他们也不期望那样),而且大家都打算把这项工作作为我们平时晚上或周末的业余项目。因为我认为这个想法有潜力可以变为成功的企业,我想从目前这个阶段开始,就解决企业所有权/薪酬的问题,免得将来因为没界定清楚导致真正的问题。我倾向于把公司所有权在我们三个创始人当中平分,而且基于这个分配规则来确定将来盈利后如何分配。这个选择对吗?如果对,怎么才算公平的股权分配?这是我自己提出的想法而且已花了不少时间做规划(而且我很确定我将自己负担所有开发过程中发生的费用),所以我感觉我应该理所当然持有更大的股权。这个要求是否合理?
我还同时企图想办法按付出的努力来激励我的合伙人。我不担心有人加入后什么都不干,但我的确认为我们当中有一个或多个人也许将十分努力付出,比其他人付出更多。如果情况是这样,我想这类合伙人应该获得更多的股份。在规划股权架构方面,您有何建议?
Joel Spolsky回答:
@kfox
kfox / tcpproxy.js
Created April 5, 2012 20:03
A basic TCP proxy written in node.js
var net = require("net");
process.on("uncaughtException", function(error) {
console.error(error);
});
if (process.argv.length != 5) {
console.log("usage: %s <localport> <remotehost> <remoteport>", process.argv[1]);
process.exit();
}
@andreyvit
andreyvit / tmux.md
Created June 13, 2012 03:41
tmux cheatsheet

tmux cheat sheet

(C-x means ctrl+x, M-x means alt+x)

Prefix key

The default prefix is C-b. If you (or your muscle memory) prefer C-a, you need to add this to ~/.tmux.conf:

remap prefix to Control + a

@cobyism
cobyism / gh-pages-deploy.md
Last active July 18, 2024 05:22
Deploy to `gh-pages` from a `dist` folder on the master branch. Useful for use with [yeoman](http://yeoman.io).

Deploying a subfolder to GitHub Pages

Sometimes you want to have a subdirectory on the master branch be the root directory of a repository’s gh-pages branch. This is useful for things like sites developed with Yeoman, or if you have a Jekyll site contained in the master branch alongside the rest of your code.

For the sake of this example, let’s pretend the subfolder containing your site is named dist.

Step 1

Remove the dist directory from the project’s .gitignore file (it’s ignored by default by Yeoman).

@danwit
danwit / node_acl_example.js
Created April 26, 2014 00:22
Authorization with node_acl + mongo + express
/**
* Simple node_acl example with mongoDB and expressjs
*
* Usage:
* 1. Start this as server
* 2. Play with the resoures
*
* Show all permissions (as JSON)
* http://localhost:3500/info
*
@kristopolous
kristopolous / hn_seach.js
Last active July 24, 2023 04:12
hn job query search
// Usage:
// Copy and paste all of this into a debug console window of the "Who is Hiring?" comment thread
// then use as follows:
//
// query(term | [term, term, ...], term | [term, term, ...], ...)
//
// When arguments are in an array then that means an "or" and when they are seperate that means "and"
//
// Term is of the format:
// ((-)text/RegExp) ( '-' means negation )
@mweststrate
mweststrate / mobx.js
Created June 15, 2016 19:20
Local component state with MobX
import {observable} from "mobx"
import {observer} from "mobx-react"
@observer class Select extends React.Component {
@observable selection = null; /* MobX managed instance state */
constructor(props, context) {
super(props, context)
this.selection = props.values[0]
}
@ghoranyi
ghoranyi / AWS Swarm cluster.md
Last active May 31, 2021 05:28
Create a Docker 1.12 Swarm cluster on AWS

This gist will drive you through creating a Docker 1.12 Swarm cluster (with Swarm mode) on AWS infrastructure.

Prerequisites

You need a few things already prepared in order to get started. You need at least Docker 1.12 set up. I was using the stable version of Docker for mac for preparing this guide.

$ docker --version
Docker version 1.12.0, build 8eab29e

You also need Docker machine installed.

@antirez
antirez / lmdb.tcl
Created April 28, 2017 15:40
LMDB -- First version of Redis written in Tcl
# LVDB - LLOOGG Memory DB
# Copyriht (C) 2009 Salvatore Sanfilippo <antirez@gmail.com>
# All Rights Reserved
# TODO
# - cron with cleanup of timedout clients, automatic dump
# - the dump should use array startsearch to write it line by line
# and may just use gets to read element by element and load the whole state.
# - 'help','stopserver','saveandstopserver','save','load','reset','keys' commands.
# - ttl with milliseconds resolution 'ttl a 1000'. Check ttl in dump!