Skip to content

Instantly share code, notes, and snippets.

View ricsiga's full-sized avatar

Richárd Tóth ricsiga

View GitHub Profile
@ricsiga
ricsiga / create_random_files.sh
Created February 11, 2018 19:19
create random files
#! /bin/bash
numberOfDirs=10
numberOfFiles=10
blockSize=100
for d in $(seq 1 $numberOfDirs); do
mkdir dir$(printf %03d "$d")
for n in $(seq 1 $numberOfFiles); do
dd if=/dev/urandom of=dir$(printf %03d "$d")/file$(printf %03d "$n").bin bs=$blockSize count=$((RANDOM + 1024)) 2> /dev/null
@ricsiga
ricsiga / Dockerfile
Last active April 6, 2018 12:04
Varnish 3.0 with Docker on Debian Squeeze
FROM debian:squeeze
RUN echo "deb http://archive.debian.org/debian squeeze main" > /etc/apt/sources.list
RUN echo "deb http://archive.debian.org/debian squeeze-lts main" >> /etc/apt/sources.list
RUN echo "Acquire::Check-Valid-Until false;" > /etc/apt/apt.conf
RUN apt-get update && apt-get install -y --force-yes procps vim nano tmux curl supervisor
RUN curl -s https://packagecloud.io/install/repositories/varnishcache/varnish30/script.deb.sh | bash
RUN apt-get update && apt-get install -y --force-yes varnish
@ricsiga
ricsiga / Vagrantfile
Created August 29, 2018 11:00
Vagrat file template
# Vagrantfile API/syntax version. Don't touch unless you know what you're doing!
VAGRANTFILE_API_VERSION = "2"
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
config.vm.box = "ubuntu/xenial64" #ubuntu/xenial64
config.vm.network "private_network", ip: "10.0.100.102"
config.vm.network "public_network", bridge: 'en0: Wi-Fi (AirPort)'
@ricsiga
ricsiga / log.conf
Last active December 17, 2024 10:55
add hostname to nginx access.log
log_format vhost '$host - $remote_addr - $remote_user [$time_local] "$request" '
'$status $body_bytes_sent "$http_referer" ' '"$http_user_agent" $request_time';
access_log /var/log/nginx/access.log vhost;