Skip to content

Instantly share code, notes, and snippets.

View andreas-bergstrom's full-sized avatar

Andreas Bergström andreas-bergstrom

View GitHub Profile
@andreas-bergstrom
andreas-bergstrom / docker-compose.yml
Last active February 13, 2020 09:00
Docker-compose for Elasticsearch and Kibana
version: '3.7'
services:
elasticsearch:
image: docker.elastic.co/elasticsearch/elasticsearch:7.6.0
environment:
- cluster.name=docker-cluster
- bootstrap.memory_lock=true
- "ES_JAVA_OPTS=-Xms512m -Xmx512m"
- discovery.type=single-node
ulimits:
@andreas-bergstrom
andreas-bergstrom / random_names.py
Last active March 23, 2019 10:48
Generate random non-realistic names in Python
import string
import random
vowels = 'aeiou'
consonants = 'bcdfghijklmnpqrstvwxz'
def get_letter(last_letter=None):
# Check if last letter generated was a consonant
if last_letter:
@andreas-bergstrom
andreas-bergstrom / list_all_cronjobs.sh
Created October 4, 2012 13:46
List cronjobs for all users
// With sudo or as root-user
for user in $(cut -f1 -d: /etc/passwd); do echo $user; crontab -u $user -l; done