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/env hy | |
(import argparse boto logging requests) | |
(def *usage* | |
"exhibitor2dns: Dynamic DNS for Exhibitor-run Zookeeper ensembles.") | |
(defn parse_args [] | |
(setv parser | |
(apply (. argparse ArgumentParser) [] |
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
$ pkgs/development/web/iojs/update-iojs | |
Getting latest stable version from https://iojs.org/dist/ | |
-> 1.5.1 | |
Getting latest nightly version from https://iojs.org/download/nightly/ | |
-> 1.5.2-nightly201503173c8ae2d934 | |
Finding hash for https://iojs.org/dist/v1.5.1/iojs-v1.5.1.tar.gz | |
-> 0zdxdb9n0yk6dp6j6x3bka7vrnf7kz8jjcpl6fw5fr9f742s9s26 | |
Finding hash for https://iojs.org/download/nightly/v1.5.2-nightly201503173c8ae2d934/iojs-v1.5.2-nightly201503173c8ae2d934.tar.gz | |
-> 10blf1hr80fknrzyrbj7qy2xn7wilnyn6y2r7ijrw2gns4ia3d0h | |
$ echo $? |
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
# Most of a working example elasticsearch instance | |
include('common/nix.aurora') | |
include('common/util.aurora') | |
proc_elasticsearch = Process( | |
name = 'elasticsearch', | |
daemon = True, | |
cmdline = unindent( | |
r""" |
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
let | |
lib = import <nixpkgs/lib>; | |
docker_registry = https://docker-registry.example.com; | |
master_zk_url = zk://zookeeper.example:2181/mesos; | |
attributes = { | |
os = "nixos"; | |
host = null; # hostname | |
rack = "1"; # us-east-1a etc |
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
{ config, lib, pkgs, ... }: | |
services.mesos.master = { | |
enable = true; | |
zk = "zk://zookeeper.example.com:2181/mesos"; | |
extraCmdLineOptions = [ | |
"--cluster=name_your_cluster" | |
]; | |
quorum = 2 # floor((number of mesos masters)/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
##### DPI STUFF | |
# Fonts: 192dpi | |
Xft/DPI 196608 | |
### Use either this: | |
#Gdk/UnscaledDPI 196608 | |
#Gdk/WindowScalingFactor 1 | |
### *or* 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
include('lib/nix.aurora') | |
include('lib/structs.aurora') | |
include('hydra.secrets') | |
class Logo(Struct): | |
url = Required(String) | |
filetype = Default(String, 'png') | |
GRAVATAR = Logo( | |
url = "https://secure.gravatar.com/avatar/13ddbf022b98acb2e32dbe8d72b81b22.jpg", |
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
"""WSGI middleware for basic Prometheus monitoring instrumentation.""" | |
import prometheus_client | |
import werkzeug.wrappers | |
Counter = prometheus_client.Counter | |
Histogram = prometheus_client.Histogram | |
INF = float('inf') | |
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
{ pythonPackages }: | |
let | |
buildPythonScript = { src, ... }@args: | |
let | |
name = args.name or (removeSuffix ".py" (baseNameOf src)); | |
setup.py = builtins.toFile "setup.py" '' | |
import setuptools | |
setuptools.setup( | |
name = "${name}", |
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/env python | |
"""Generate authorized_keys for Github users/teams/organizations.""" | |
from __future__ import print_function | |
import github | |
from pyglib import app | |
from pyglib import gflags | |
from pyglib import log | |
gflags.DEFINE_string( |