Skip to content

Instantly share code, notes, and snippets.

View bkuberek's full-sized avatar
⚛️

Bastian Kuberek bkuberek

⚛️
View GitHub Profile
openapi: 3.0.0
info:
version: 2.7.0
title: Lexikon Service
description: foo
servers:
- url: /v2
description: The current Lexikon Service instance
@bkuberek
bkuberek / .gitignore
Last active August 29, 2015 14:05
This is a proof of concept in generating winning lottery numbers.
.DS_Store
*~
._*
*.pyc
.idea/
api-key*
apikey*
@bkuberek
bkuberek / Vagrantfile
Created July 19, 2014 19:04
This is a sample Vagrantfile I use for bootstrapping new projects. You need to replace `PROJECT_NAME` with the project name.
# -*- coding: utf-8 -*-
# -*- mode: ruby -*-
# vi: set ft=ruby :
#
# Shared Folders
# --------------
# => http://docs.vagrantup.com/v2/synced-folders/index.html
#
# Customize Machine Settings
# --------------------------
#!/usr/bin/python -u
import os
import re
import json
LOG_PATH = '/var/log/datawarehouse/application.log'
logfile = open(LOG_PATH, 'r')
jsonfile = open('dwerrors.json', 'w')
@bkuberek
bkuberek / Errors in application.log
Last active August 29, 2015 13:56
Errors in Data Warehouse application .log
bkuberek@aimee:~$ grep 'HiveCommandError' /var/log/datawarehouse/application.log | egrep -o '2014-[[:digit:]]+-[[:digit:]]+' | awk -F_ '{A[$1" :: "$2]++}END{for (i in A) print i,A[i]}' | sort
2014-01-02 :: 1
2014-01-06 :: 1
2014-01-07 :: 1
2014-01-08 :: 2
2014-01-09 :: 2
2014-01-10 :: 1
2014-01-13 :: 1
2014-01-14 :: 3
2014-01-15 :: 5
ּ_בּ
בּ_בּ
טּ_טּ
כּ‗כּ
לּ_לּ
מּ_מּ
סּ_סּ
תּ_תּ
٩(×̯×)۶
٩(̾●̮̮̃̾•̃̾)۶
apt-get -y autoremove
# Zero out the free space to save space in the final image:
dd if=/dev/zero of=/EMPTY bs=1M
rm -f /EMPTY
# Removing leftover leases and persistent rules
echo "cleaning up dhcp leases"
rm /var/lib/dhcp/*
rm /var/lib/dhcp3/*