Skip to content

Instantly share code, notes, and snippets.

View andersao's full-sized avatar
:octocat:

Anderson Andrade andersao

:octocat:
  • Fortaleza, Ceará, Brazil
View GitHub Profile
@andersao
andersao / queue.sh
Created January 27, 2016 08:36
Instalar beanstalkd e supervisor
#Instalar beanstalkd
#Arquivo de configuração: /etc/sysconfig/beanstalkd
wget http://cbs.centos.org/kojifiles/packages/beanstalkd/1.9/3.el7/x86_64/beanstalkd-1.9-3.el7.x86_64.rpm
rpm -ivh beanstalkd-1.9-3.el7.x86_64.rpm
systemctl enable beanstalkd
systemctl start beanstalkd
#Instalar Supervidor
@andersao
andersao / ffmpeg-ubuntu.sh
Created January 27, 2016 08:21
Instalar o FFMPeg no Ubuntu
#!/bin/bash
##Fonte: https://trac.ffmpeg.org/wiki/CompilationGuide/Ubuntu
mkdir ~/ffmpeg_sources;
sudo apt-get update ;
sudo apt-get -y --force-yes install autoconf automake build-essential libass-dev libfreetype6-dev libsdl1.2-dev libtheora-dev libtool libva-dev libvdpau-dev libvorbis-dev libxcb1-dev libxcb-shm0-dev libxcb-xfixes0-dev pkg-config texi2html zlib1g-dev;
#Yasm
sudo apt-get -y --force-yes install yasm;
@andersao
andersao / ffmpeg-centos.sh
Created January 27, 2016 08:20
Instalar FFMpeg no Cent OS
#!/bin/bash
#https://trac.ffmpeg.org/wiki/CompilationGuide/Centos
yum -y install autoconf automake cmake freetype-devel gcc gcc-c++ git libtool make mercurial nasm pkgconfig zlib-devel;
mkdir ~/ffmpeg_sources;
#Yasm
cd ~/ffmpeg_sources;
git clone --depth 1 git://github.com/yasm/yasm.git;
cd yasm;
@andersao
andersao / .editorconfig
Last active October 29, 2015 16:07
Editor Config
# This file is for unifying the coding style for different editors and IDEs
# editorconfig.org
root = true
[*]
end_of_line = lf
charset = utf-8
indent_style = tab
insert_final_newline = true
trim_trailing_whitespace = true
@andersao
andersao / gist:7b92fa026fd4ffe74fbb
Last active September 11, 2015 13:52
Exemplo de implementação do Repositório
<?php
//------------------------------------
// StudentRepository.php
//------------------------------------
namespace App\Repositories\Students;
use Prettus\Repository\Contracts\RepositoryInterface;
/**
* Interface StudentRepository
@andersao
andersao / gist:8e43daba281d59a003de
Created February 26, 2015 20:00
ReplicaSet Mongo
mkdir -p /data/mongodb/rs0-0 /data/mongodb/rs0-1 /data/mongodb/rs0-2
sudo nohup mongod --port 27017 --dbpath /data/mongodb/rs0-0 --replSet temporeal --smallfiles --oplogSize 128 > mongo-rs-0.log &
sudo nohup mongod --port 27018 --dbpath /data/mongodb/rs0-1 --replSet temporeal --smallfiles --oplogSize 128 > mongo-rs-1.log &
sudo nohup mongod --port 27019 --dbpath /data/mongodb/rs0-2 --replSet temporeal --smallfiles --oplogSize 128 > mongo-rs-2.log &
mongo --port 27017
rs.initiate({_id: "temporeal",members: [{_id: 0,host: "localhost:27017"}]});
rs.add("localhost:27018")
@andersao
andersao / gist:78404fdd7679d428d9da
Created February 4, 2015 09:59
Instalando e Configurando o Beanstalkd no Ubuntu

#Instalando e Configurando o Beanstalkd no Ubuntu

##Instalaçao

###Instalando o Beanstalkd

sudo apt-get install beanstalkd

###Instalando o Supervisor

@andersao
andersao / example.local
Created February 4, 2015 03:29
Nginx Vhost Vagrant
server {
listen 80;
root /home/vagrant/www/example.local;
index index.php index.html index.htm;
server_name example.local;
location / {
try_files $uri $uri/ /index.php?$args;