-
This is a numbered list.
-
I'm going to include a fenced code block as part of this bullet:
Code More Code
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
"""Module for pulling contacts out of Google and storing them to disk | |
(or something). | |
See the official guide for a more in-depth look at GData Python | |
http://code.google.com/apis/contacts/docs/1.0/developers_guide_python.html | |
""" | |
import atom |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <queue> | |
#include <unistd.h> | |
#include <pthread.h> | |
#include <stdlib.h> | |
// Base task for Tasks |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Latency Comparison Numbers (~2012) | |
---------------------------------- | |
L1 cache reference 0.5 ns | |
Branch mispredict 5 ns | |
L2 cache reference 7 ns 14x L1 cache | |
Mutex lock/unlock 25 ns | |
Main memory reference 100 ns 20x L2 cache, 200x L1 cache | |
Compress 1K bytes with Zippy 3,000 ns 3 us | |
Send 1K bytes over 1 Gbps network 10,000 ns 10 us | |
Read 4K randomly from SSD* 150,000 ns 150 us ~1GB/sec SSD |
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:
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/config.h b/config.h | |
index 8cb8804..b1be9e2 100644 | |
--- a/config.h | |
+++ b/config.h | |
@@ -5,8 +5,8 @@ | |
* | |
* font: see http://freedesktop.org/software/fontconfig/fontconfig-user.html | |
*/ | |
-static char font[] = "Liberation Mono:pixelsize=12:antialias=false:autohint=false"; | |
-static int borderpx = 2; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
In the node.js intro tutorial (http://nodejs.org/), they show a basic tcp | |
server, but for some reason omit a client connecting to it. I added an | |
example at the bottom. | |
Save the following server in example.js: | |
*/ | |
var net = require('net'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Sometimes you need to move your existing git repository | |
# to a new remote repository (/new remote origin). | |
# Here are a simple and quick steps that does exactly this. | |
# | |
# Let's assume we call "old repo" the repository you wish | |
# to move, and "new repo" the one you wish to move to. | |
# | |
### Step 1. Make sure you have a local copy of all "old repo" | |
### branches and tags. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
continue | |
dir=/var/www/downloads | |
file-allocation=falloc | |
max-connection-per-server=4 | |
max-concurrent-downloads=2 | |
max-overall-download-limit=0 | |
min-split-size=25M | |
rpc-allow-origin-all=true | |
rpc-secret=YouShouldChangeThis | |
input-file=/var/tmp/aria2c.session |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#ifdef __FreeBSD__ | |
#include <sys/socket.h> | |
#endif | |
#include <arpa/inet.h> | |
#include <netinet/in.h> | |
#include <cstdlib> | |
#include <cstring> | |
#include <cerrno> | |
#include <cassert> | |
#include <iostream> |
OlderNewer