Skip to content

Instantly share code, notes, and snippets.

Avatar

Anderson Andrade andersao

View GitHub Profile
@andersao
andersao / queue.sh
Created Jan 27, 2016
Instalar beanstalkd e supervisor
View queue.sh
#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 Jan 27, 2016
Instalar o FFMPeg no Ubuntu
View ffmpeg-ubuntu.sh
#!/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 Jan 27, 2016
Instalar FFMpeg no Cent OS
View ffmpeg-centos.sh
#!/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 Oct 29, 2015
Editor Config
View .editorconfig
# 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 Sep 11, 2015
Exemplo de implementação do Repositório
View gist:7b92fa026fd4ffe74fbb
<?php
//------------------------------------
// StudentRepository.php
//------------------------------------
namespace App\Repositories\Students;
use Prettus\Repository\Contracts\RepositoryInterface;
/**
* Interface StudentRepository
View gist:8e43daba281d59a003de
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 Feb 4, 2015
Instalando e Configurando o Beanstalkd no Ubuntu
View gist:78404fdd7679d428d9da

#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 Feb 4, 2015
Nginx Vhost Vagrant
View example.local
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;