Skip to content

Instantly share code, notes, and snippets.

@olavocneto
olavocneto / asdf-php.md
Last active November 25, 2022 12:36
asdf-php
asdf plugin remove php

asdf plugin add php https://github.com/olavocneto/asdf-php.git

asdf install php latest

asdf global php 8.1.13

pecl install xdebug
#!/usr/bin/env bash
# https://sharats.me/posts/shell-script-best-practices/
set -o errexit
set -o nounset
set -o pipefail
if [[ "${TRACE-0}" == "1" ]]; then
set -o xtrace
fi
; Xdebug 2
; Ubuntu
[xdebug]
zend_extension=/usr/local/lib/php/extensions/no-debug-non-zts-20190902/xdebug.so
xdebug.remote_enable=1
xdebug.remote_autostart=1
xdebug.remote_port=9000
xdebug.remote_connect_back=true
; Windows WSL
@olavocneto
olavocneto / awesome-dfe-proto.md
Last active January 25, 2020 15:04
awesome-dfe-proto.md

awesome-dfe

Awesome

Uma lista de projetos e conteúdos sobre Documentos Fiscais Eletrônicos.

Conteúdo

# Compiling PHP from source

# https://github.com/docker-library/php/blob/3dc9a6988d478fae0f0b8b871d10e611b50e3d0c/7.4/buster/cli/Dockerfile
# https://php.watch/articles/compile-php-ubuntu

sudo apt-get install make clang build-essential autoconf libtool bison re2c

# SQL Server for unixODBC development headers
sudo apt-get install unixodbc-dev

Objetivo?

Atualizar dashboard. Quando houver modificação em duas tabelas, foo e bar, então fazer front end requisitar novamente api.

Possível solução: index.html: Abro um socket.

  var conn = new WebSocket('ws://localhost:8080/push-dashboard');
 conn.onopen = function(e) {
@olavocneto
olavocneto / mongo.sh
Last active August 29, 2015 14:06
mongo help
# Connect meteor server mongo database
mongo 127.0.0.1:3001/meteor
# Connect local mongo database
mongo 127.0.0.1:27017/meteor
mongodump -h 127.0.0.1:3001 -d meteor -o dump/meteor/
mongorestore -u client -h production-db-b1.meteor.io:27017 -d db_meteor_com -p 'xyz' dump/meteor/
@olavocneto
olavocneto / sencha_cmd.txt
Last active August 29, 2015 14:06
Install Sencha CMD
Da série: Como eu instalei ...
Dependências
* sudo apt-get install unzip
* Install Java: https://www.digitalocean.com/community/tutorials/how-to-install-java-on-ubuntu-with-apt-get
wget http://cdn.sencha.com/cmd/5.0.1.231/SenchaCmd-5.0.1.231-linux-x64.run.zip
unzip SenchaCmd-5.0.1.231-linux-x64.run.zip