Skip to content

Instantly share code, notes, and snippets.

Avatar

Panagiotis Moustafellos pmoust

View GitHub Profile
@leonardofed
leonardofed / README.md
Last active May 18, 2022
A curated list of AWS resources to prepare for the AWS Certifications
View README.md


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 Nov 30, 2021
Nginx config: receive a request with a gzipped body, inflate it, and pass it to a proxied server
View inflate_body.lua
-- 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 Apr 29, 2022
Reindexing Elasticsearch with Logstash 2.0
View logstash.conf
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 Apr 6, 2022
Unit files to deploy an ElasticSearch cluster on CoreOS via Fleet
View README.md
@pmoust
pmoust / container-memory.sh
Created May 28, 2014
List memory usage per Docker container
View container-memory.sh
#!/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))
View yiic_bash_completion.bash
# 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()