Skip to content

Instantly share code, notes, and snippets.

defaultPackage.x86_64-linux = let
nixosConfiguration = inputs.nixpkgs.lib.nixosSystem {
modules = [
(
{ config, lib, pkgs, ... }: {
imports = [
"${inputs.nixpkgs}/nixos/modules/profiles/installation-device.nix"
"${inputs.nixpkgs}/nixos/modules/profiles/base.nix"
"${inputs.nixpkgs}/nixos/modules/installer/sd-card/sd-image.nix"
];
@josqu4red
josqu4red / usage.jsonnet
Created November 21, 2019 09:11
Augmented kube.libsonnet's Service
local service_ = k.Service(cfg.name) {
metadata+: cfg.metadata_,
target_pod: deployment_.spec.template,
target_ports: ['http', 'admin'],
}
044f376ced2b013da727272b90ec6ce5ac6310b6165b22504a8c1e8041471885195e77fc383501a29f31046221017d97cfe32a3abaf7c96115b07f4ed8d8b05dc7 pocky
2016-08-19T11:00:03Z [INFO] Starting Agent: Amazon ECS Agent - v1.12.0 (895f3c1)
2016-08-19T11:00:03Z [INFO] Loading configuration
2016-08-19T11:00:03Z [DEBUG] Environment variable empty: ECS_CONTAINER_STOP_TIMEOUT
2016-08-19T11:00:03Z [DEBUG] Loaded config: Cluster: stock-ecs-stage, Region: eu-west-1, DataDir: /data, Checkpoint: true, AuthType: , UpdatesEnabled: false, DisableMetrics: false, ReservedMem: 0, TaskCleanupWaitDuration: 10m0s, DockerStopTimeout: 30s
2016-08-19T11:00:03Z [INFO] Checkpointing is enabled. Attempting to load state
2016-08-19T11:00:03Z [INFO] Loading state! module="statemanager"
2016-08-19T11:00:03Z [DEBUG] Loaded state! module="statemanager" state="&{Data:map[TaskEngine:0xc82013a7d0 ContainerInstanceArn:0xc82013a7e0 Cluster:0xc82013a7f0 EC2InstanceID:0xc82013a800 ACSSeqNum:0xc82013a820] Version:4}"
2016-08-19T11:00:03Z [INFO] Restored cluster 'stock-ecs-stage'
2016-08-19T11:00:03Z [INFO] Detected Docker versions [1.17 1.18 1.19 1.20 1.21 1.22]
2016-08-19T11:00:03Z [INFO] Restored fro
#!/bin/bash
#
# The MIT License
#
# Copyright 2014 Jakub Jirutka <jakub@jirutka.cz>.
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
@josqu4red
josqu4red / Gemfile
Created January 15, 2015 14:43
Gem skel
source "https://rubygems.org"
gemspec
@josqu4red
josqu4red / data_query.rb
Created November 14, 2014 09:14
Convenient wrapper for Chef encrypted data bags
class Chef
module DSL
module DataQuery
def encrypted_data_bag_item(bag, item)
secret = Chef::EncryptedDataBagItem.load_secret(File.join(node["chef"]["config_dir"], "encrypted_databags_secrets", bag, item))
Chef::EncryptedDataBagItem.load(bag, item, secret)
end
end
end
end
@josqu4red
josqu4red / gist:d771c583e6a2caf968ab
Created October 13, 2014 06:57
LACP Bonding Linux
auto lo
iface lo inet loopback
auto bond0
iface bond0 inet manual
slaves eth0 eth1
bond_mode 802.3ad
bond_miimon 100
bond_downdelay 200
bond_updelay 200
OptionParser.new do |o|
o.on('-H', '--host hostname') { |hostname| @host = hostname }
o.on("-p", "--port port") { |port| @port = port }
o.on('-h') { puts o; exit }
o.parse!
end
raise OptionParser::MissingArgument if @host.nil?
@josqu4red
josqu4red / setup_ilo.rb
Created August 8, 2014 16:13
Sane setup for ILO baseboard
require "ilorb"
search(:node, "bootstrap_ilo:*").sort_by{|n| n.name}.each do |n|
print "#{n.name} "
ilo_attrs = n["bootstrap"]["ilo"]
begin
ilo = ILORb.new(hostname: ilo_attrs["ip"], login: ilo_attrs["username"], password: ilo_attrs["password"])
ilo.server_name(:value => n["hostname"])