Skip to content

Instantly share code, notes, and snippets.

View serweb-labs's full-sized avatar

Luciano Rodríguez serweb-labs

View GitHub Profile
/* box */
.imgbox {
/*
width:;
height:;
*/
margin: 10px;
float: left;
border: 10px solid #fff;
overflow: hidden;
@serweb-labs
serweb-labs / fiddle.css
Last active August 29, 2015 14:08 — forked from zalun/fiddle.css
$fullred: #ff0000;
body {
font-family: Helvetica, Verdana
}
p {
padding: 7px 10px;
}
#demo {
border: 1px solid $fullred;
}
@serweb-labs
serweb-labs / README.md
Last active August 29, 2015 14:10
Gitlab and Apache working in Ubuntu 14.04

#Gitlab and Apache working in Ubuntu 14.04

-uncomment or add in /var/opt/gitlab/nginx/etc/gitlab-http.conf

server {
  listen *:81;
  server_name serweb-revolution;
  server_tokens off; ## Don't show the nginx version number, a security best practice
  root /opt/gitlab/embedded/service/gitlab-rails/public;
@serweb-labs
serweb-labs / mysqlcheck
Created January 7, 2015 06:08
mysql: repair and optimize all databases
mysqlcheck -u root -p --auto-repair --optimize --all-databases
@serweb-labs
serweb-labs / README.md
Last active August 29, 2015 14:13 — forked from oodavid/README.md

Deploy your site with git

This gist assumes:

  • you have a local git repo
  • with an online remote repository (github / bitbucket etc)
  • and a cloud server (Rackspace cloud / Amazon EC2 etc)
    • your (PHP) scripts are served from /var/www/html/
    • your webpages are executed by apache
  • apache's home directory is /var/www/
@serweb-labs
serweb-labs / webHook
Last active August 29, 2015 14:13 — forked from Polanco08/webHook
<?php
// usr/bin/git debes verificar que se la ruta correcta en tu serve
// con el comando wich git, esto te regresa la ruta donde esta instalado git
//Este archivo debe de estar alojado dentro del directorio del repositorio
$out = shell_exec("/usr/bin/git pull 2>&1");
var_dump($out);
?>
iptables -A INPUT -s 192.168.0.4 --sport 25 -m state --state RELATED,ESTABLISHED -j ACCEPT
@serweb-labs
serweb-labs / vhost.conf
Created February 16, 2015 19:57
¿Apache2 403 Forbidden?
#si actualizaste apache recientemente hay unos cambios que debes hacer
<Directory "your directory here">
Order allow,deny
Allow from all
Require all granted #<--- explicit
</Directory>
<location /cgi-bin>
AddHandler cgi-script .cgi .pl
Options +ExecCGI -Indexes #<- mas y menos explicitos
@serweb-labs
serweb-labs / README.md
Last active August 29, 2015 14:15
Guía DKIM

This guide will show you how to install and configure the OpenDKIM on your centos 6.5 and Ubuntu server. Before we start, I would just like to put out from the wiki what DKIM is. Just in case anyone doesn't know.

http://en.wikipedia.org/wiki/DomainKeys_Identified_Mail Wrote:DomainKeys Identified Mail (DKIM) is an email validation system designed to detect email spoofing by providing a mechanism to allow receiving mail exchangers to check that incoming mail from a domain is authorized by that domain's administrators. A digital signature included with the message can be validated by the recipient using the signer's public key published in the DNS.

First things first, we always need to ensure our system is up to date. So lets do that first. (This guide also assumes that you are not using the root account, that you are using another account, that can get root permissions.

CentOS Code: sudo Yum update

@serweb-labs
serweb-labs / set_fqdn_ubuntu.md
Created October 17, 2015 07:56
set FQDN Ubuntu Server

Setting the Hostname & Fully Qualified Domain Name (FQDN) on Ubuntu 12.04 or CentOS 6.4

Introduction

A hostname is a label or nickname that is assigned to a computer connected to a network and that is used to identify the machine in various forms of electronic communication within an internal network. Hostnames are also important because they form part of a computer's Fully Qualified Domain Name (FQDN). Assigning a FQDN to a computer makes it reachable via the public Domain Name System (DNS), i.e. the Internet.

Hostname Requirements

Internet standards for protocols mandate that component local host names may contain, only: