Skip to content

Instantly share code, notes, and snippets.

View jeffersonsouza's full-sized avatar

Jefferson Souza jeffersonsouza

View GitHub Profile
upstream default {
server server1;
server server2;
}
server {
listen 80;
server_name localhost;
location / {
#!/usr/bin/env bash
echo 'Iniciando Setup'
################################################################################
# SETUP DO PROXY
################################################################################
# Usuário de proxy
while true; do
echo "Qual o seu usuário de proxy? "
@jeffersonsouza
jeffersonsouza / Enhanced NGINX logstash parser
Created July 5, 2017 21:09 — forked from csamsel/Enhanced NGINX logstash parser
Enhanced NGINX logstash parser to include upstream response time and request length fields
Enhanced NGINX logstash parser:
NGINX log format:
log_format enhanced '$remote_addr - $remote_user [$time_local] "$request" $status $body_bytes_sent $request_length "$http_referer" "$http_user_agent" $request_time $upstream_response_time';
access_log /var/log/nginx/access.log enhanced;
error_log /var/log/nginx/error.log;
logstash pattern (/opt/logstash/pattern/nginx):
# Find a text inside files in recursive mode, returning the line number of occurence
grep -rnw '/path/to/somewhere/' -e 'pattern'
# Kill php-fpm proccess in alpine
kill -USR2 1
@jeffersonsouza
jeffersonsouza / xdebug_alpine.md
Created May 3, 2017 18:21 — forked from crittermike/xdebug_alpine.md
Xdebug + PHPStorm for PHP 7 on Alpine Linux

First, install the Xdebug package from the testing repository.

$ apk add php7-xdebug --repository http://dl-3.alpinelinux.org/alpine/edge/testing/

Now edit the /etc/php7/php.ini file and add the following to the end of it:

zend_extension=/usr/lib/php7/modules/xdebug.so
@jeffersonsouza
jeffersonsouza / gist:ef90cfc555387dcef06d632804561031
Created April 19, 2017 19:23
Get a list of instaled plugins in Jenkins CI
# run in script console inside Jenkins
Jenkins.instance.pluginManager.plugins.each{
plugin ->
println ("${plugin.getShortName()}:${plugin.getVersion()}")
}
version: '2'
services:
nginx:
image: nginx
restart: always
hostname: loadbalancer
ports:
- "80:80"
- "443:443"
{
"name": "todo-app",
"version": "0.0.0",
"license": "MIT",
"scripts": {
"start": "ng serve"
},
"dependencies": {
"express": "~4.14"
}

Hangout On Air - Continuous Integration com Jenkins e Docker

Utilizo um serviço de hosting que parece usar containers para criar "hosts" virtuais para cada um dos clientes. Tenho tido sérios problemas de desempenho nesse cenário. Gostaria de saber se o palestrante pode falar um pouco a respeito: se o uso do Docker para esse tipo de cenário é adequado ou não, se pode ser um erro no modo como a implementação foi feita, etc.

Luís Fernando Talora - SP

R:

Como aplicar na area de TI (administração de banco de dados)

@jeffersonsouza
jeffersonsouza / API.md
Created October 20, 2016 14:00 — forked from iros/API.md
Documenting your REST API

Title

<Additional information about your API call. Try to use verbs that match both request type (fetching vs modifying) and plurality (one vs multiple).>

  • URL

    <The URL Structure (path only, no root url)>

  • Method: