Skip to content

Instantly share code, notes, and snippets.

@SweBarre
SweBarre / md
Created October 8, 2023 07:45
Cinnamon Ice cream with apples
## Cinnamon Ice cream
### Ingredients:
caster sugar 110 g
cinnamon stick 1 pc
cream 500 ml
egg yolks 5
ground cinnamon 2 tbs
milk 250 ml

HTTP

HTTP

HTTP

title date draft tags
Falafel
2020-05-30 15:49:57 +0200
true

![alt text][banner]

Enhet | Ingrediens

$the_cow = <<EOC
$thoughts
$thoughts .':ccoc..,.
$thoughts '0KKKXXNXXXXXO.
$thoughts .k000KKKXXXXXXXXKO,
$thoughts ;O0KK0KKKKKKXXXXKKK0:
$thoughts odkkkxxkkkOO00KKK000KO.
$thoughts $thoughts. cKkxxddoodxkkkOOOOOOOkO0xO;
$thoughts ddKOxdoddoddxOOkkOOOOOOOOk00Kl
$thoughts :Okxooooollllooxdodoxxxxxxk0k0k
#!/usr/bin/env python3
# Domain Search Option Format generator for Unifi Security Gateway
# Usage: python3 dhcp_option_119.py example.com example.net
import sys
hexes = []
for domain in sys.argv[1:]:
for label in domain.split('.'):
hexes.append('%02x' % len(label))
@SweBarre
SweBarre / zypper_updates.sh
Last active September 9, 2020 05:02
zypper / prometheus
#!/bin/bash
#
#
# Description: Expose iprometheus metrics from zypper updates and patches
#
# Author: Jonas Forsberg <barregargamel@gmail.com>
set -u -o pipefail
tempfile=$(mktemp /tmp/checkupdate.XXXXXX)
@SweBarre
SweBarre / Dockerfile
Created April 7, 2017 07:24
Docker file for ansible, ansible oneview module testing
FROM python:3
# Install hpOveView SDK and ansible
RUN pip3 install --no-cache-dir hpOneView ansible
# install ansible oneview module
WORKDIR /root
ENV ONEVIEW_ANSIBLE_MODULE_VERSION 3.1.0
ENV ANSIBLE_LIBRARY /root/oneview-ansible-${ONEVIEW_ANSIBLE_MODULE_VERSION}/library
@SweBarre
SweBarre / Dockerfile
Created April 5, 2017 13:41
Docker file for ansible + ansible oneview module
FROM python:2.7
#install ansible
RUN apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 93C4A3FD7BB9C367 && \
echo "deb http://ppa.launchpad.net/ansible/ansible/ubuntu trusty main" > /etc/apt/sources.list.d/ansible.list && \
apt-get update && \
apt-get install --no-install-recommends -y \
ansible && \
rm -rf /var/lib/apt/lists/*
mysql < commands.sql | sed 's/\t/","/g;s/^/"/;s/$/"/;s/\n//g' > output.csv
@SweBarre
SweBarre / gist:5442217
Created April 23, 2013 09:42
Generate test data
#!/usr/bin/env python
import sys
import os
import optparse
VERBOSE = False
FILESIZE = False
def makeFolders(path, width, depth, files):
if depth: