Skip to content

Instantly share code, notes, and snippets.

@isaacs
isaacs / node-and-npm-in-30-seconds.sh
Last active November 2, 2024 12:56
Use one of these techniques to install node and npm without having to sudo. Discussed in more detail at http://joyeur.com/2010/12/10/installing-node-and-npm/ Note: npm >=0.3 is *safer* when using sudo.
echo 'export PATH=$HOME/local/bin:$PATH' >> ~/.bashrc
. ~/.bashrc
mkdir ~/local
mkdir ~/node-latest-install
cd ~/node-latest-install
curl http://nodejs.org/dist/node-latest.tar.gz | tar xz --strip-components=1
./configure --prefix=~/local
make install # ok, fine, this step probably takes more than 30 seconds...
curl https://www.npmjs.org/install.sh | sh
@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

@maccman
maccman / juggernaut.rb
Created June 26, 2012 02:49
Sinatra Server Side Event streaming.
# Usage: redis-cli publish message hello
require 'sinatra'
require 'redis'
conns = []
get '/' do
erb :index
end
@maccman
maccman / juggernaut_channels.rb
Created June 26, 2012 04:56
Sinatra Server Side Event streaming with private channels.
# Usage: redis-cli publish message.achannel hello
require 'sinatra'
require 'redis'
conns = Hash.new {|h, k| h[k] = [] }
Thread.abort_on_exception = true
get '/' do
@piscisaureus
piscisaureus / pr.md
Created August 13, 2012 16:12
Checkout github pull requests locally

Locate the section for your github remote in the .git/config file. It looks like this:

[remote "origin"]
	fetch = +refs/heads/*:refs/remotes/origin/*
	url = [email protected]:joyent/node.git

Now add the line fetch = +refs/pull/*/head:refs/remotes/origin/pr/* to this section. Obviously, change the github url to match your project's URL. It ends up looking like this:

@minikomi
minikomi / editor.html
Last active November 11, 2021 10:16
my editor
data:text/html,
<style type="text/css">
#e {
position:absolute;
top:0;
right:0;
bottom:0;
left:0;
font-size:16px;
}
@otbzi
otbzi / gist:5576718
Created May 14, 2013 15:12
青海湖游记初稿

五一青海湖藏族小伙炼成大作战

最近总是有着一股牢笼感,因此非常想出去走走。清明前,茫茫然不知道何去何从,曾经冲动的定下了去内蒙古的火车票,但是一番纠结外加怂货上身,也就这么放弃了。四月中旬的时候,跟朋友聊天,思前想后,觉得青海湖是在当前时间以及客观条件下性价比最高的选择了。热门景点完全没有兴趣,青海湖难度又不大,到达距离以及行程时间都合适,同时相比之下更加接近自然。自然而然的成为了我们这么仓促时间内最最合适的选择。

规划的时候,一开始只是跟另外一个朋友两人一起。结果临行前三天,一个好基友收到我的消息立马决定参加,另外一个好兄弟也突然辞职了,瞬间决定加入团队。一行人,我、SXY、ZK、YLQ。

也就这样,走上了从汉族小伙到藏族小伙这条不归路……

本文就当作是攻略吧,最近这个心情,实在是写不出游记的感觉。

@dypsilon
dypsilon / frontendDevlopmentBookmarks.md
Last active November 10, 2024 03:45
A badass list of frontend development resources I collected over time.
{
"status": "success",
"search_nag": {},
"code": 0,
"bookmark": "b28xMDB8MDQ0NWZiOTBjNzNiODlkOTQ1ZTk3ZjY0ZTBhYjU0YjM0ZDYyNDg3NjU3ZWQ3OGJmZjI4ZTliZGRmODBlMzJlNQ==",
"debug_data": {
"query_data": {}
},
"message": "ok",
"data": [
@aviflax
aviflax / 1 - Resources for Learning Stream Data Processing.md
Last active October 29, 2024 19:54
Resources for Learning Stream Data Processing

Introduction

This gist started with a collection of resources I was maintaining on stream data processing — also known as distributed logs, data pipelines, event sourcing, CQRS, and other names.

Over time the set of resources grew quite large and I received some interest in a more guided, opinionated path for learning about stream data processing. So I added the reading list.

Please send me feedback!