Skip to content

Instantly share code, notes, and snippets.

View girorme's full-sized avatar
😀

girorme girorme

😀
View GitHub Profile
@girorme
girorme / Dockerfile
Last active February 10, 2020 02:51
Elixir docker skeleton
# Use an official Elixir runtime as a parent image
FROM elixir:latest
RUN apt-get update && \
apt-get install -y postgresql-client
# Create app directory and copy the Elixir projects into it
RUN mkdir /app
COPY . /app
WORKDIR /app
@girorme
girorme / php-compile-with-parallel.sh
Last active January 5, 2020 01:02
php compile script with parallel
#!/bin/bash
#
# ** Need install system dependencies
rm -rf php-src/
mkdir -p /etc/php7
mkdir -p /etc/php7/cli
git clone https://github.com/php/php-src.git -b PHP-7.4.1 --depth=1
<?php
class HttpGrabThreaded {
private array $urls;
private array $runtimes;
private array $futures;
public function __construct(array $urls)
{
@girorme
girorme / pre-commit
Created October 10, 2019 17:52
super-giggle pre-commit hook
#!/usr/bin/env bash
SG="super-giggle"
$SG --diff-cached
RESULT=$?
if [ $RESULT -eq 0 ]; then
echo 'Meus parabéns, meu filho. Seu código está limpinho. Meus parabéns!!!'
else
# Permite capturar a resposta Y|N do usuário.
exec < /dev/tty
MSG=$(cat << "EOF"