Skip to content

Instantly share code, notes, and snippets.

View thehydroimpulse's full-sized avatar

Daniel Fagnan thehydroimpulse

View GitHub Profile
extern crate sync;
use sync::Arc;
fn main() {
let numbers = ~[1,2,3];
let numbers = Arc::new(numbers);
for num in range(0, 3) {
let (tx, rx) = channel();
tx.send(numbers.clone());
use uuid::Uuid;
/// Broadcast represents a single bi-directional communication with two
/// nodes within the cluster. The communication does **not** need to be
/// bi-directional. Responses are completely optional.
///
/// Each broadcast is tagged with a unique ID so that we may track
/// which node has received a given broadcast.
pub struct Broadcast<'a, T, R> {
/// A unique id (uuidv4) representing the broadcast. This will allow us to keep
// actionbutton/index.js
var template = require('./template.html');
var View = require('view');
var NextView = require('next-view');
var SpinnerAnimation = require('spinner-animation');
var resource = require('resource');
var animation = require('animation');
var ActionButton = View.create()
.use(View.compiler(template))
<div class="ui dropdown">
<button class="ui button" type="button" data-title="title">
{{selected ? selected : default}}
</button>
<ul class="ui dropdown-list">
<li data-each="item in list" data-click="select(@id)">{{item.name}}</li>
</ul>
</div>
// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
// file at the top-level directory of this distribution and at
// http://rust-lang.org/COPYRIGHT.
//
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
// option. This file may not be copied, modified, or distributed
// except according to those terms.
dyld: Symbol not found: __ZN2io3mem16Writer$MemWriter5write21h751c9d6a06778c88Guac9v0.10.preE
Referenced from: /usr/local/bin/../lib/libgreen-80d9e76a-0.10-pre.dylib
Expected in: /usr/local/bin/../lib/libstd-966edb7e-0.10-pre.dylib
in /usr/local/bin/../lib/libgreen-80d9e76a-0.10-pre.dylib

A lot of these are outright stolen from Edward O'Campo-Gooding's list of questions. I really like his list.

I'm having some trouble paring this down to a manageable list of questions -- I realistically want to know all of these things before starting to work at a company, but it's a lot to ask all at once. My current game plan is to pick 6 before an interview and ask those.

I'd love comments and suggestions about any of these.

I've found questions like "do you have smart people? Can I learn a lot at your company?" to be basically totally useless -- everybody will say "yeah, definitely!" and it's hard to learn anything from them. So I'm trying to make all of these questions pretty concrete -- if a team doesn't have an issue tracker, they don't have an issue tracker.

I'm also mostly not asking about principles, but the way things are -- not "do you think code review is important?", but "Does all code get reviewed?".

rc = pcre_exec(
re, /* the compiled pattern */
NULL, /* no extra data - we didn't study the pattern */
subject, /* the subject string */
strlen(subject), /* the length of the subject */
0, /* start at offset 0 in the subject */
0, /* default options */
ovector, /* output vector for substring information */
OVECCOUNT); /* number of elements in the output vector */
@thehydroimpulse
thehydroimpulse / web.cpp
Last active September 11, 2016 21:14
Example C++11 web server backed by libuv, http-parser, and jsonxx.
#include <functional>
#include <string>
#include <http/http.h>
class ExampleController {
public:
static void example(http::Request* request, http::Response response) {
response.send<http::html>("<html><h1>ExampleController</h1></html>");
}
#!/bin/bash
# We need to do a few things here.
# 1) Build the repo
set -e;
APP="$2"; IMAGE="app/$APP"; NAME=$1
META="$HOME/meta"
APPMETA="$META/$NAME"