Skip to content

Instantly share code, notes, and snippets.

@jl91
jl91 / phalconphp_php7_ubuntu_16_04.sh
Created June 21, 2016 22:47 — forked from Tosyn/phalconphp_php7_ubuntu_16_04.sh
PhalconPhp with PHP7 Installation on Ubuntu 16.04
#!/bin/bash
# PhalconPhp with PHP7 installation on ubuntu:16.04
sudo apt-get update
sudo apt-get install -y php7.0-fpm \
php7.0-cli \
php7.0-curl \
php7.0-gd \
@jl91
jl91 / DoctrineRelationProvider.php
Created July 6, 2016 21:50 — forked from jdachtera/DoctrineRelationProvider.php
Automatically generate HATEOAS links for doctrine relations
<?php
namespace Acme\FooBundle\Hateoas;
use Doctrine\ORM\EntityManager;
use Hateoas\Configuration\Metadata\ClassMetadataInterface;
use Hateoas\Configuration as Hateoas;
use Symfony\Component\Routing\Route;
use Symfony\Component\Routing\RouterInterface;
@jl91
jl91 / estados-cidades.json
Created October 3, 2017 18:38 — forked from letanure/estados-cidades.json
JSON estados cidades
{
"estados": [
{
"sigla": "AC",
"nome": "Acre",
"cidades": [
"Acrelândia",
"Assis Brasil",
"Brasiléia",
"Bujari",
@jl91
jl91 / cli-config.php
Created December 13, 2018 17:43 — forked from FadelChafai/cli-config.php
Zend Expressive AND Doctrine Migrations
<?php
chdir(dirname(__DIR__));
require 'vendor/autoload.php';
/**
* Self-called anonymous function that creates its own scope and keep the global namespace clean.
*/
return call_user_func(function () {
/** @var \Interop\Container\ContainerInterface \$container */
@jl91
jl91 / docker-compose.yml
Created January 7, 2019 23:43 — forked from oogali/docker-compose.yml
kong + kong dashboard docker-compose
version: '3'
services:
kong:
image: kong:0.12-alpine
environment:
KONG_DATABASE: postgres
KONG_PG_HOST: db
KONG_PROXY_ACCESS_LOG: /dev/stdout
KONG_ADMIN_ACCESS_LOG: /dev/stdout
@jl91
jl91 / docker-compose.yml
Created January 8, 2019 15:42 — forked from mikkelkrogsholm/docker-compose.yml
docker-compose for kong, konga and elastic
version: "3"
networks:
kong-net:
driver: bridge
services:
#######################################
# Postgres: The database used by Kong
@jl91
jl91 / README.md
Created March 6, 2019 22:59 — forked from empjustine/README.md
Tabela de Logradouros

PADRONIZAÇÃO DE NOMENCLATURA DE LOGRADOUROS

Cartão SUS – Tabela de Logradouros

@jl91
jl91 / showAsPrint.js
Created July 19, 2019 21:20 — forked from jscher2000/showAsPrint.js
Emulate print media in Firefox 62 (userscript work in progress)
// For Firefox's Web Console, creates the functions showAsPrint() and undoShowAsPrint()
// to roughly emulate print media and revert
function showAsPrint(){
var docSS = document.styleSheets, ss, oldMedia, newMedia, rules;
var p2s = function(media){
if (media.indexOf('all') > -1) return media; //no need to change
if (media == 'print') return 'all, wasprint'; //show on screen, too
if (media.indexOf('print') > -1 && media.indexOf('screen') > -1) return media; //no need to change
if (media == 'screen') return 'wasscreen'; //hide these rules
if (media.indexOf('screen') > -1) return media.replace('screen', 'wasscreen'); //hide these rules
@jl91
jl91 / docker-compose.kafka.yml
Created August 5, 2020 01:39 — forked from faraazahmad/docker-compose.kafka.yml
Kafka cluster docker-compose file
version: '3'
services:
zookeeper:
image: confluentinc/cp-zookeeper:latest
environment:
ZOOKEEPER_CLIENT_PORT: 2181
ZOOKEEPER_TICK_TIME: 2000
@jl91
jl91 / docker-compose.yml
Created August 7, 2020 03:11 — forked from mhowlett/docker-compose.yml
Brings up a kafka cluster using Docker for Mac. Usage: MY_IP=<your ip> docker-compose up
---
version: '2'
services:
zk1:
image: confluentinc/cp-zookeeper:3.0.1
ports:
- "22181:22181"
environment:
ZOOKEEPER_SERVER_ID: 1
ZOOKEEPER_CLIENT_PORT: 22181