Skip to content

Instantly share code, notes, and snippets.

Avatar

Airton Zanon airtonzanon

View GitHub Profile
@ivanrosolen
ivanrosolen / mac_install.md
Last active Aug 12, 2021
Mac install script
View mac_install.md

Homebrew

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"

basic (catalina)

brew install -f git jq jo telnet wget nmap

dev big-sur

brew install -f adr-tools php composer imagemagick ffmpeg exiftool

View how-to-facilitate-a-retrospective.md

How to facilitate a retrospective

The role of Facilitator is fundamental for almost every meeting. The Facilitator ensures that the whole group is empowered to make decisions and that every individual has their voice heard.

During a retrospective, the Facilitator role is crucial. In a retrospective, it is ideal that everyone has at least some degree of participation, and it is the Facilitator that helps the participants with that.

View fizzbuzz.sql
WITH RECURSIVE fizz_buzz (sequence, modulo_3, modulo_5) AS (
SELECT 1, CAST('' AS CHAR(4)), CAST('' AS CHAR(5))
UNION ALL
SELECT sequence + 1,
IF(MOD(sequence + 1, 3) = 0, 'Fizz', ''),
IF(MOD(sequence + 1, 5) = 0, 'Buzz', '')
FROM fizz_buzz
WHERE sequence < 100
)
@jakebrinkmann
jakebrinkmann / connect_psycopg2_to_pandas.py
Created Jul 3, 2017
Read SQL query from psycopg2 into pandas dataframe
View connect_psycopg2_to_pandas.py
import pandas as pd
import pandas.io.sql as sqlio
import psycopg2
conn = psycopg2.connect("host='{}' port={} dbname='{}' user={} password={}".format(host, port, dbname, username, pwd))
sql = "select count(*) from table;"
dat = sqlio.read_sql_query(sql, conn)
conn = None
@ivanrosolen
ivanrosolen / lets_encrypt_nginx.txt
Last active Jan 4, 2017
Let's Encrypt + Nginx
View lets_encrypt_nginx.txt
apt-get update
apt-get install nginx
wget https://dl.eff.org/certbot-auto
chmod a+x certbot-auto
./certbot-auto
@michelluca
michelluca / Dockerfile
Last active Mar 23, 2021
Configuring PHPStorm to work with xDebug and Docker, by listening.
View Dockerfile
FROM php:7-fpm
RUN apt-get update && \
apt-get install -y \
zlib1g-dev \
libfreetype6-dev \
libjpeg62-turbo-dev \
libmcrypt-dev \
libpng12-dev
@mickaelandrieu
mickaelandrieu / upgrade_to_symfony3-lts.md
Last active Sep 21, 2021
Migration guide to Symfony 3 LTS
View upgrade_to_symfony3-lts.md

Let's migrate a Symfony 2.8 LTS application to Symfony 3 LTS

Handle deprecations

First of all, ensure you don't have any deprecated!

The Symfony documentation explains it well, but let's sum up:

  • install the phpunit bridge ($ composer require --dev symfony/phpunit-bridge)
  • also check all your pages using web profiler and be ensure there is no deprecation error handled
  • found errors and need help about how to fix it ? I did a sort of guide.
@stasm
stasm / .env
Last active May 5, 2021
Pontoon in Docker
View .env
SECRET_KEY=hiphopopotamus
DJANGO_DEV=True
DJANGO_DEBUG=True
DATABASE_URL=postgres://pontoon:pontoon@localhost/pontoon
SESSION_COOKIE_SECURE=False
SITE_URL=http://localhost:8000
FXA_CLIENT_ID=2651b9211a44b7b2
FXA_SECRET_KEY=a3cafccbafe39db54f2723f8a6f804c337e362950f197b5b33050d784129d570
FXA_OAUTH_ENDPOINT=https://oauth-stable.dev.lcip.org/v1
FXA_PROFILE_ENDPOINT=https://stable.dev.lcip.org/profile/v1