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
// all buildings with weights, | |
// be sure to use your own datatypes. | |
var BUILDINGS = [ | |
[40, 'No Building'], | |
[ 6, 'Harvester Tiberium'], | |
[ 6, 'Harvester Crystal'], | |
[ 6, 'Power Plant'], | |
[ 1, 'Tiberium'], | |
[ 1, 'Crystal'], | |
[ 3, 'Silo'], |
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 | |
import sys | |
from subprocess import Popen, PIPE | |
from json import loads | |
class Task(object): | |
def __init__(self, data): | |
self.data = data |
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
{ | |
network.description = "Btrfs test"; | |
network.enableRollback = true; | |
btrfs = { pkgs, config, ... }: { | |
deployment = { | |
targetEnv = "virtualbox"; | |
virtualbox.headless = true; | |
virtualbox.memorySize = 1024; | |
}; |
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
with import <nixpkgs> {}; | |
stdenv.mkDerivation rec { | |
name = "nixops-update-hetzner-netinfo"; | |
src = ./update.py; | |
buildInputs = [ python pythonPackages.wrapPython ]; | |
pythonPath = [ pythonPackages.sqlite3 ]; | |
phases = [ "installPhase" "fixupPhase" ]; |
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
{ chromium ? null, nixpkgs ? <nixpkgs>, systems ? [ "x86_64-linux" "i686-linux" ] }: | |
let | |
opkgs = import nixpkgs { | |
system = "x86_64-linux"; | |
}; | |
mkChromiumForSystem = system: chan: let | |
pkgs = import nixpkgs { | |
inherit system; |
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
commit 34f081e38a0c6e41de03ca288c5717e95f7cf04b | |
Merge: 49c940b 7a6ada0 | |
Author: aszlig <[email protected]> | |
Date: Wed Sep 19 16:47:33 2012 +0200 | |
Merge branch 'ssh-multiplex'. | |
This now allows us to fetchgit from private GitHub repositories. | |
The procedure is somewhat complicated, as OpenSSH has a bunch of security checks | |
which prevent the nasty things we are doing here. |
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
{ stdenv, fetchgit, coreutils, openssh, writeScript }: | |
attrs: | |
let | |
cleanAttrs = removeAttrs attrs [ "privateKey" ]; | |
in stdenv.lib.overrideDerivation (fetchgit cleanAttrs) (o: { | |
inherit (attrs) privateKey; | |
GIT_SSH = writeScript "gitssh.sh" '' | |
#!${stdenv.shell} |
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 ? import <nixpkgs> {} }: | |
pkgs.stdenv.mkDerivation rec { | |
name = "unbrick-ftdi"; | |
src = pkgs.fetchurl { | |
url = "http://rtr.ca/ft232r/ft232r_prog-1.24.tar.gz"; | |
sha256 = "10shyjdgg66cxisqzq2ff17vgyniynjsxq2griz8jxqmr3lic43v"; | |
}; |
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
{ stdenv, fetchurl }: | |
stdenv.mkDerivation rec { | |
name = "suisseid-pkcs11-${version}"; | |
version = "1.0.4292"; | |
src = fetchurl { | |
url = "http://update.swisssign.com/media/stick/repository/dists/unstable" | |
+ "/non-free/binary-amd64/suisseid-pkcs11_1.0.4292-1_amd64.deb"; | |
sha256 = "05qp5k079796dfpj76pcdbl3r2m7g0wjp66i9siphzkdzci0gbr1"; |
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 escript | |
mxml([]) -> []. | |
m(Str) when is_list(Str) -> unicode:characters_to_binary(Str); | |
m(Str) when is_binary(Str) -> Str; | |
m(_) -> exit("WAT!?"). | |
mjid({jid, A, B, C, D, E, F}) -> {jid, m(A), m(B), m(C), m(D), m(E), m(F)}. |
OlderNewer