Skip to content

Instantly share code, notes, and snippets.

View benley's full-sized avatar
🐈

Benjamin Staffin benley

🐈
View GitHub Profile
@benley
benley / gist:e4cc4ca8f1630cd609e5
Created August 3, 2015 04:06
chromium build failure
ninja: Entering directory `out/Release'
[1/3] CC obj/sandbox/linux/suid/chrome_sandbox.process_util_linux.o
[2/3] CC obj/sandbox/linux/suid/chrome_sandbox.sandbox.o
[3/3] LINK chrome_sandbox
ninja: Entering directory `out/Release'
ninja: error: '../../native_client/toolchain/linux_x86/nacl_x86_newlib/nacl_x86_newlib.json', needed by 'gen/tc_irt/lib64/libppapi_proxy_nacl.a', missing and no known rule to make it
builder for ‘/nix/store/qmnrn1f2mja2qvjyp4sn2d6p34czink3-chromium-44.0.2403.89.drv’ failed with exit code 1
cannot build derivation ‘/nix/store/gqfyx6xg2kvac6w1jbp6if3f0yvp0zf6-chromium-beta-44.0.2403.89.drv’: 1 dependencies couldn't be built
[Default Applications]
x-scheme-handler/http=chromium.desktop;
x-scheme-handler/https=chromium.desktop;
x-scheme-handler/ftp=chromium.desktop;
x-scheme-handler/chrome=chromium.desktop;
application/x-extension-htm=chromium.desktop;
application/x-extension-html=chromium.desktop;
application/x-extension-shtml=chromium.desktop;
application/x-extension-xhtml=chromium.desktop;
application/x-extension-xht=chromium.desktop;
@benley
benley / binding_helper.aurora.py
Created August 6, 2015 21:15
aurora client binding hooks madness (unfinished proof of concept)
import subprocess
from apache.aurora.client.binding_helper import (BindingHelper,
CachingBindingHelper)
from apache.aurora.client.config import GlobalHookRegistry
from pystachio.matcher import Any, Matcher
from twitter.common import log
class NixHelper(CachingBindingHelper):
#!/bin/bash
# Build, export, and publish the Nix dependencies of an Aurora job.
# Then use the aurora commandline utility to launch it.
#
# This should really be an Aurora client hook, or at least a
# better-integrated wrapper script.
set -e
attr=${1:?USAGE: $0 <attribute>}
shift
@benley
benley / default.nix
Created August 24, 2015 03:48
npm2nix nix nix nix
{ npm2nix ? { outPath = ./.; name = "npm2nix"; }
, pkgs ? import <nixpkgs> {}
}:
let
nodePackages = import "${pkgs.path}/pkgs/top-level/node-packages.nix" {
inherit pkgs;
inherit (pkgs) stdenv nodejs fetchurl fetchgit;
neededNatives = [ pkgs.python ] ++ pkgs.lib.optional pkgs.stdenv.isLinux pkgs.utillinux;
self = nodePackages;
generated = ./package.nix;
{
"cluster": "devcluster",
"environment": "devel",
"name": "hello_world",
"role": "vagrant",
"service": true,
"task": {
"constraints": [
{
"order": [
@benley
benley / Happy-Hacking-Keyboard-Professional-2.kbd.json
Last active December 19, 2015 21:50
Happy Hacking Keyboard Professional 2
[
{
"name": "Happy Hacking Keyboard Professional 2"
},
[
{
"a": 6
},
"Esc\n\n\n\nPower",
{
import subprocess
from apache.aurora.client.binding_helper import (BindingHelper,
CachingBindingHelper)
from apache.aurora.client.config import GlobalHookRegistry
from pystachio.matcher import Any, Matcher
from twitter.common import log
class NixHelper(CachingBindingHelper):
#!/usr/bin/env bash
# Generate a Docker image from a Nix store path.
set -e
USAGE='USAGE: ./nixdock <storepath> [<entrypoint>] [<dockertag>]'
if [[ $# -lt 1 || $# -gt 3 ]]; then
echo "$USAGE" >&2; exit 1
elif [[ "$1" == "--help" ]]; then
echo "$USAGE"; exit 0
diff --git a/debian/aurora-executor.thermos.init b/debian/aurora-executor.thermos.init
index 24a59d2..3a62cb9 100755
--- a/debian/aurora-executor.thermos.init
+++ b/debian/aurora-executor.thermos.init
@@ -35,15 +35,18 @@ fi
[ -r /etc/default/thermos ] && . /etc/default/thermos
-ARGS="--root=/var/run/thermos
+ARGS="--mesos-root=${MESOS_ROOT:-/var/lib/mesos}