Skip to content

Instantly share code, notes, and snippets.

View tiomoreno's full-sized avatar
🎯
Focusing

Tio Moreno tiomoreno

🎯
Focusing
View GitHub Profile
#!/bin/bash
sudo service mongodb stop
sudo rm /var/lib/mongodb/mongod.lock
sudo chown -R mongodb:mongodb /var/lib/mongodb/
sudo service mongodb start
@tiomoreno
tiomoreno / nodejs-ubuntu-install.sh
Last active December 22, 2015 01:48
Instalação do NodeJS mais atual no ubuntu
#!/bin/bash
sudo apt-get update
sudo apt-get install python-software-properties python g++ make -y
sudo add-apt-repository ppa:chris-lea/node.js
sudo apt-get update
sudo apt-get install nodejs -y
@tiomoreno
tiomoreno / DevInJfRules.txt
Created August 19, 2013 18:51
Regras da lista de discussão da comunidade.
Para tópicos
Antes de abrir um novo tópico verifique se já não existe um outro tópico aberto com o mesmo assunto/dúvida. Verifique antes também possíveis soluções para as suas dúvidas no Google.
Caso não exista, ao postar um novo tópico seja claro e objetivo, tanto no assunto quanto no tópico. Exemplifique o problema ou a dúvida que estive tendo.
Exemplo de tópico bom: “Problemas na instalação do PHP”. Exemplos de tópicos ruins para tratar da mesma dúvida: “Me ajudem por favor”; “Urgente!”; “Leiam isso”; “Dúvida”.
Não peça ajuda via IM (Gtalk, ICQ, MSN Messenger etc). Não envie mensagens privadas por e-mail para pedir ajuda a dúvidas suas.
Vagrant.configure("2") do |config|
# Use Ubuntu 12.04 64-bit for now.
config.vm.box = "precise-server-cloudimg-amd64-vagrant-disk1"
config.vm.box_url = "http://cloud-images.ubuntu.com/vagrant/precise/current/precise-server-cloudimg-amd64-vagrant-disk1.box"
# Provision the VM
config.vm.provision :shell, :path => "vagrant_data/install.sh"
# Configure network
config.vm.network :private_network, ip: "192.168.50.4"
def init_nmp():
install_nginx()
install_php()
install_phpfpm()
def install_nginx():
sudo("add-apt-repository ppa:nginx/stable")
sudo("apt-get update")
sudo("apt-get -y -q install nginx-full nginx-common")
server {
listen 80;
server_name localhost;
root /home/website/web;
rewrite ^/app\.php/?(.*)$ /$1 permanent;
try_files $uri @rewriteapp;
location @rewriteapp {
#!/bin/sh
#
# a simple way to parse shell script arguments
#
# please edit and use to your hearts content
#
ENVIRONMENT="dev"
#!/usr/bin/env python
# Python script to make Skype co-operate with GNOME3 notifications.
#
#
# Copyright (c) 2011, John Stowers
#
# Adapted from skype-notify.py
# Copyright (c) 2009, Lightbreeze
#
#
[unix_http_server]
file=/tmp/supervisor.sock ; path to your socket file
[supervisord]
logfile=/var/log/supervisord/supervisord.log ; supervisord log file
logfile_maxbytes=50MB ; maximum size of logfile before rotation
logfile_backups=10 ; number of backed up logfiles
loglevel=error ; info, debug, warn, trace
pidfile=/var/run/supervisord.pid ; pidfile location
nodaemon=false ; run supervisord as a daemon
# Copyright (c) 2011 Phil Plante <unhappyrobot AT gmail DOT com>
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in