Skip to content

Instantly share code, notes, and snippets.

View pmoust's full-sized avatar

Panagiotis Moustafellos pmoust

View GitHub Profile
@leonardofed
leonardofed / README.md
Last active April 19, 2024 09:00
A curated list of AWS resources to prepare for the AWS Certifications


A curated list of AWS resources to prepare for the AWS Certifications

A curated list of awesome AWS resources you need to prepare for the all 5 AWS Certifications. This gist will include: open source repos, blogs & blogposts, ebooks, PDF, whitepapers, video courses, free lecture, slides, sample test and many other resources.


@davidcaste
davidcaste / inflate_body.lua
Last active January 9, 2024 10:17
Nginx config: receive a request with a gzipped body, inflate it, and pass it to a proxied server
-- Debian packages nginx-extras, lua-zlib required
ngx.ctx.max_chunk_size = tonumber(ngx.var.max_chunk_size)
ngx.ctx.max_body_size = tonumber(ngx.var.max_body_size)
function create_error_response (code, description)
local message = string.format('{"status":400,"statusReason":"Bad Request","code":%d,"exception":"","description":"%s","message":"HTTP 400 Bad Request"}', code, description)
ngx.status = ngx.HTTP_BAD_REQUEST
ngx.header.content_type = "application/json"
ngx.say(message)
@markwalkom
markwalkom / logstash.conf
Last active April 29, 2022 10:23
Reindexing Elasticsearch with Logstash 2.0
input {
elasticsearch {
hosts => [ "HOSTNAME_HERE" ]
port => "9200"
index => "INDEXNAME_HERE"
size => 1000
scroll => "5m"
docinfo => true
scan => true
}
@digital-wonderland
digital-wonderland / README.md
Last active April 6, 2022 17:22
Unit files to deploy an ElasticSearch cluster on CoreOS via Fleet
@pmoust
pmoust / container-memory.sh
Created May 28, 2014 09:10
List memory usage per Docker container
#!/bin/sh
# Lists memory usage per Docker container
#
# FORMAT:
#
# IMAGE:TAG MEMORY_USAGE CONTAINER ID
for i in `find /sys/fs/cgroup/memory/docker/* -type d`; do
CONTAINER_ID=`echo $i | awk -F'/' '{print $7}'`
MEMORY_USAGE=$((`cat $i/memory.usage_in_bytes`/1024/1024))
@cebe
cebe / yiic_bash_completion.bash
Created August 11, 2011 23:19
yiic bash completion
# basic bash completion for yiic command
#
# simply add the following to your ~/.bash_profile
#
# . ~/path/to/this/file/yiic_bash_completion.bash
#
# note: the . is relevant and you probably have to adjust the path ;-)
#
_yiic()