Skip to content

Instantly share code, notes, and snippets.

View edgarsandi's full-sized avatar
👋
Hi there

Edgar R. Sandi edgarsandi

👋
Hi there
View GitHub Profile
Edgar Rodrigues Sandi
@EdgarSandi
Oracle PL/SQL
6 aulas
05/08
07/08
12/08
14/08
19/08
-- Resposta do lab
-- tabela categorias
CREATE TABLE tb_categorias(
cd_categoria NUMBER(3) PRIMARY KEY,
nm_categoria VARCHAR2(50) NOT NULL
);
-- Tabela cursos
CREATE TABLE tb_cursos(
cd_curso NUMBER(5) PRIMARY KEY,
Edgar Rodrigues Sandi
Edgar Sandi
tw/@EdgarSandi
fb/EdgarSandi
G+/EdgarSandi
Ln/EdgarSandi
Oracle PL/SQL - 24h
Aula 1 - 17/01
@edgarsandi
edgarsandi / gist:1eee2737d49f5f3dc764
Last active August 29, 2015 14:15
uniform-variable-syntax
<?php
$a = function($param) {
return function() use ($param) {
return function() use($param) {
return ++$param;
};
};
};
echo $a(45)()() . PHP_EOL;
@edgarsandi
edgarsandi / Oracle 11G - SQL Essencial
Last active August 29, 2015 14:16
Oracle SQL Essencial
Edgar R. Sandi
@edgarsandi
[email protected]
lk/edgar.r.sandi
fb/edgar.r.sandi
Oracle Essencial
24h
6 aulas
@edgarsandi
edgarsandi / multi-namespaces.php
Last active October 27, 2015 17:32
multi-namespaces
<?php
namespace Rua;
class Mae
{
public function darBronca()
{
return 'mae dando bronca na rua' . PHP_EOL;
}
@edgarsandi
edgarsandi / ansible_conditionals_examples.yaml
Created August 10, 2016 22:17 — forked from marcusphi/ansible_conditionals_examples.yaml
Ansible 1.3 Conditional Execution -- Very complete example with comments -- I find the conditional expressions to be ridiculously hard to get right in Ansible. I don't have a good model of what's going on under the surface so I often get it wrong. What makes it even harder is that there has been at least three different variants over the course …
---
# This has been tested with ansible 1.3 with these commands:
# ansible-playbook -i hosts ansible_conditionals_examples.yaml --extra-vars="hosts=myhosts isFirstRun=false"
# ansible-playbook -i hosts ansible_conditionals_examples.yaml --extra-vars="hosts=myhosts isFirstRun=true"
# ansible-playbook -i hosts ansible_conditionals_examples.yaml --extra-vars="hosts=myhosts"
# NB: The type of the variable is crucial!
- name: Ansible Conditionals Examples
hosts: $hosts
vars_files:
@edgarsandi
edgarsandi / slack_deploy_bot_template.py
Created August 21, 2016 01:16 — forked from achauve/slack_deploy_bot_template.py
Template of Slack bot for deployment
import logging
import os
import time
import traceback
# pip install slackclient
from slackclient import SlackClient
@edgarsandi
edgarsandi / new_relic_alert.sh
Created September 5, 2016 21:59 — forked from lichti/new_relic_alert.sh
Script to enable or disable newrelic alerts
#!/bin/bash
if [ ! -x /usr/bin/curl ]; then
echo "Please install curl"
exit 1
fi
if [ ! -x /usr/bin/jq ]; then
echo "Please install jq"
exit 1

I recently got a new Macbook Pro and wanted to document how I setup my PHP environment. I like full control of how PHP is built and I usually build it from source. I do this because I often add custom extensions and modules not found in the common PHP OSX installers. If your looking for a easier method than building from source try https://php-osx.liip.ch/.

NOTE: This post assumes you are running a fresh install of MacOS Sierra 10.12.2 with System Integrity Protection disabled. If you don't know how to disable it just boot into recovery mode and open a terminal and type csrutil disable, or google search it :) This post also assumes you are using Zsh instead of Bash shell. If you are using Bash you can replace anytime you see ~/.zshrc with ~/.bashrc.

First lets get some of the prerequisites. Start by grabbing the command line tools neccessary:

xcode-select --install