Skip to content

Instantly share code, notes, and snippets.

jdbc:h2:mem:testdb;MODE=MySQL;IGNORECASE=TRUE;INIT=CREATE SCHEMA IF NOT EXISTS \"public\";
gpg --no-default-keyring --keyring trustedkeys.gpg --keyserver keys.gnupg.net --recv-keys CC1FE3E2
./aptly mirror create -architectures=amd64,powerpc CumulusLinux-2.5-addons http://repo.cumulusnetworks.com/ CumulusLinux-2.5 addons
./aptly mirror create -architectures=amd64,powerpc CumulusLinux-2.5-main http://repo.cumulusnetworks.com/ CumulusLinux-2.5 main
./aptly mirror create -architectures=amd64,powerpc CumulusLinux-2.5-security-updates http://repo.cumulusnetworks.com/ CumulusLinux-2.5 security-updates
./aptly mirror create -architectures=amd64,powerpc CumulusLinux-2.5-updates http://repo.cumulusnetworks.com/ CumulusLinux-2.5 updates
./aptly mirror update CumulusLinux-2.5-addons
./aptly mirror update CumulusLinux-2.5-main
@jbweber
jbweber / dns.py
Last active September 23, 2015 04:17
#!/usr/bin/python
import socket
# >>> for x in [x for x in dir(socket) if x.startswith('EAI')]:
# ... print x, getattr(socket,x)
EAI_MAPPING = {
'EAI_ADDRFAMILY': -9,
'EAI_AGAIN': -3,
'EAI_BADFLAGS': -1,
# {{ ansible_managed }}
# ntp servers for chrony client to sync from
{% for chrony_server in chrony_servers %}
server {{ chrony_server }} iburst
{% endfor %}
# Ignore stratum in source selection.
stratumweight 0
ip link add vxlan12345 type vxlan id 12345 remote 192.168.20.191 dstport 4789
ip link set dev vxlan12345 up
ip -d link show vxlan12345
5: vxlan12345: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UNKNOWN mode DEFAULT
link/ether 26:e3:bb:20:3c:f1 brd ff:ff:ff:ff:ff:ff promiscuity 0
vxlan id 12345 remote 192.168.20.191 srcport 32768 61000 dstport 4789 ageing 300
ip link add vxlan12345 type vxlan id 12345 remote 192.168.20.189 dstport 4789 local 192.168.20.190
ip link set dev vxlan12345 up
ip a a 192.168.147.2/24 dev vxlan12345
@jbweber
jbweber / aptly.sh
Created December 4, 2014 05:24
aptly script
#!/bin/bash
#
# Copyright 2014 Hewlett-Packard Development Company, L.P.
# All Rights Reserved.
# Authored by Yazz D. Atlas <[email protected]>
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
import pprint
import rpm
import yum
package_names = []
packages = []
yb = yum.YumBase()
ts = rpm.TransactionSet()
mi = ts.dbMatch()