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
# I got the above error on Mavericks after upgrading Python. | |
# This is what I did to fix it. | |
# I was using virtualenv, so I first deactivated the current virtual environment | |
# and removed it completely | |
deactivate | |
rm -rf venv | |
# Then I upgraded pip to 1.5.1 | |
brew upgrade pip |
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
input { | |
file { | |
# Path to your logs | |
path => "/logs/*" | |
start_position => "beginning" | |
} | |
} | |
filter { | |
grok { |
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
# Server | |
redis_version:2.8.9 | |
redis_git_sha1:00000000 | |
redis_git_dirty:0 | |
redis_build_id:53bb8484a594dab0 | |
redis_mode:standalone | |
os:FreeBSD 9.2-RELEASE-p6 amd64 | |
arch_bits:64 | |
multiplexing_api:kqueue | |
gcc_version:4.2.1 |
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
info commandstats | |
$1158 | |
# Commandstats | |
cmdstat_get:calls=344336405,usec=1084573265,usec_per_call=3.15 | |
cmdstat_set:calls=86516,usec=590904,usec_per_call=6.83 | |
cmdstat_setex:calls=28000873,usec=262906699,usec_per_call=9.39 | |
cmdstat_del:calls=4138776,usec=12168359,usec_per_call=2.94 | |
cmdstat_exists:calls=967,usec=2135,usec_per_call=2.21 | |
cmdstat_sadd:calls=5214906740,usec=4204169654,usec_per_call=0.81 | |
cmdstat_srem:calls=4135644,usec=20366147,usec_per_call=4.92 |
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
# Use multirust to manage multiple Rust builds: | |
# 1. Install multirust | |
curl -sf https://raw.githubusercontent.com/brson/multirust/master/blastoff.sh | sh | |
# 2. Show installed Rust builds | |
multirust list-toolchains | |
# 3. Install new build (stable, beta, nightly) | |
multirust update nightly |
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
{ | |
"repositories": [ | |
{ | |
"type": "vcs", | |
"url": "https://github.com/you/package.git" | |
} | |
], | |
"require": { | |
"you/package": "dev-bugfix/your-dev-branch as 1.5.x-dev" | |
} |
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
import threading | |
import time | |
import unittest | |
import urllib2 | |
from BaseHTTPServer import BaseHTTPRequestHandler, HTTPServer | |
class MyHandler(BaseHTTPRequestHandler): | |
def do_GET(self): | |
self.send_response(200) |
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
fn main() { | |
println!("Hello, world!"); | |
} | |
fn make_guess(g: Game, c: char) -> Game { | |
let mut new_game = g; | |
new_game.guesses.push(c); | |
if !new_game.word.contains(c) { | |
new_game.tries_left -= 1; | |
} |
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
[package] | |
name = "ease-test" | |
version = "0.1.0" | |
[dependencies] | |
ease = "*" | |
serde_json = "0.8.1" | |
serde_macros = "*" | |
serde = "*" |
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
#[macro_use] extern crate nickel; | |
use std::collections::BTreeMap; | |
use nickel::status::StatusCode; | |
use nickel::{Nickel, JsonBody, HttpRouter, MediaType}; | |
#[derive(Clone)] | |
struct Person { | |
first_name: String, | |
last_name: String, |