Skip to content

Instantly share code, notes, and snippets.

View caioregatieri's full-sized avatar

Caio Regatieri caioregatieri

View GitHub Profile
$estados = array( "AC", "AL", "AM", "AP", "BA", "CE", "DF", "ES", "GO", "MA", "MT", "MS", "MG", "PA", "PB", "PR", "PE", "PI", "RJ", "RN", "RO", "RS", "RR", "SC", "SE", "SP", "TO" );
@caioregatieri
caioregatieri / apache.conf
Created November 10, 2017 22:23 — forked from rambabusaravanan/apache.conf
SPA - Apache, Nginx Configuration for Single Page Application like React.js on a custom path
# To host on root path just use "<Location />" for http://mydomainname.in
# To host on non-root path use "<Location /myreactapp>" for http://mydomainname.in/mypath
# If non-root path, don't forgot to add "homepage": "/myreactapp" in your app's package.json
<VirtualHost *:80>
ServerName mydomainname.in
DirectoryIndex index.html
DocumentRoot /var/www/html
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
@caioregatieri
caioregatieri / angularjs-providers-explained.md
Created October 23, 2017 02:31 — forked from demisx/angularjs-providers-explained.md
AngularJS Providers: Constant/Value/Service/Factory/Decorator/Provider
Provider Singleton Instantiable Configurable
Constant Yes No No
Value Yes No No
Service Yes No No
Factory Yes Yes No
Decorator Yes No? No
Provider Yes Yes Yes

Constant

@caioregatieri
caioregatieri / iotcam.py
Created September 9, 2017 03:54 — forked from loleg/iotcam.py
Detects barcodes from a webcam stream using Python, zbar and CV2
from picamera.array import PiRGBArray
from picamera import PiCamera
import time
import sys
import cv2
import zbar
import Image
# Debug mode
DEBUG = False
var gulp = require('gulp');
var clean = require('gulp-clean');
var jshint = require('gulp-jshint');
var concat = require('gulp-concat');
var uglify = require('gulp-uglify');
var imagemin = require('gulp-imagemin');
var bases = {
app: 'app/',
@caioregatieri
caioregatieri / deploy_app_laravel_digital_ocean
Created December 2, 2015 01:00 — forked from vedovelli/deploy_app_laravel_digital_ocean
Deploy app Laravel no Digital Ocean
1. Crie uma conta no Digital Ocean;
2. Crie um droplet Ubuntu (estas instruções são baseadas em Ubuntu)
3. Escolha o pacote LEMP para ser instalado com seu Ubuntu
4. Escolha ou associa sua chave publica para acesso ao servidor
5. Acesse seu server usando SSH (ssh root@<ip informado pelo DO>)
@caioregatieri
caioregatieri / gist:335e8e9ad8247c8bdd76
Created December 2, 2015 00:30 — forked from vedovelli/gist:cd6b9a99e2ba9ebaaa98
Install Sublime Text 2 apt-get
sudo add-apt-repository ppa:webupd8team/sublime-text-2
sudo apt-get update
sudo apt-get install sublime-text
server {
listen 80;
server_name CHANGEME.app;
root /var/www/vhosts/CHANGEME.app/public;
index index.html index.htm index.php;
charset utf-8;
location / {