Skip to content

Instantly share code, notes, and snippets.

View andreferraro's full-sized avatar
🎯
Focusing

Andre Ferraro andreferraro

🎯
Focusing
  • Brazil
  • 14:49 (UTC -03:00)
View GitHub Profile
# RemoveAccents version 1.0.3 (c) 2008-2009 Solutions Informatiques Techniconseils inc.
#
# This module adds 2 methods to the string class.
# Up-to-date version and documentation available at:
#
# http://www.techniconseils.ca/en/scripts-remove-accents-ruby.php
#
# This script is available under the following license :
# Creative Commons Attribution-Share Alike 2.5.
#
@andreferraro
andreferraro / smtpteste.rb
Created January 28, 2012 02:11 — forked from geoffgarside/gist:157771
Validate Email Addresses Via SMTP
#!/usr/bin/env ruby
# Usage: $0 hostname email_addr
#
# Performs a basic SMTP delivery check, it connects to the target SMTP server, sends
# a HELO command, then a MAIL FROM followed by a RCPT TO. This should verify that
# the server is a) contactable b) permits the sender and c) accepts the recipient.
require 'socket'
require 'net/telnet'
me = Socket.gethostname
#!/bin/bash
apt-get update
apt-get upgrade -y
apt-get install vim curl wget htop -y
@andreferraro
andreferraro / interfaces
Created July 23, 2015 03:43
/etc/network/interfaces
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).
# The loopback network interface
auto lo
iface lo inet loopback
# The primary network interface
auto eth0
iface eth0 inet static
127.0.0.1 localhost
172.16.0.200 laravel.local laravel
#/bin/bash
service apparmor stop
service apparmor teardown
update-rc.d -f apparmor remove
apt-get remove apparmor apparmor-utils -y
apt-get purge apparmor -y
#[...]
# Specify one or more NTP servers.
# Use servers from the NTP Pool Project. Approved by Ubuntu Technical Board
# on 2011-02-08 (LP: #104525). See http://www.pool.ntp.org/join.html for
# more information.
server pool.ntp.br
server a.st1.ntp.br
server b.st1.ntp.br
#/bin/bash
apt-key adv --keyserver keys.gnupg.net --recv-keys 1C4CBDCDCD2EFD2A
echo deb http://repo.percona.com/apt trusty main >> /etc/apt/sources.list
echo deb-src http://repo.percona.com/apt trusty main >> /etc/apt/sources.list
apt-get update
apt-get install percona-server-server-5.6 percona-server-client-5.6 -y
sed -i "s/key_buffer/key_buffer_size/g" /etc/mysql/my.cnf
sed -i "s/\[mysqld\]/\[mysqld\]\nexplicit_defaults_for_timestamp = 1/g" /etc/mysql/my.cnf
sed -i "s/127.0.0.1/172.16.0.200/g" /etc/mysql/my.cnf
service mysql stop && sudo service mysql start
#/bin/bash
# INSTALAÇÃO HEADERS MORE
cd /home/sysadm/
mkdir -p /home/sysadm/tmp/ngx_headers
cd /home/sysadm/tmp/ngx_headers
wget https://github.com/openresty/headers-more-nginx-module/archive/master.zip
unzip master.zip
mv headers-more-nginx-module-master/ headers-more-nginx-module/
#!/usr/bin/make -f
#export DH_VERBOSE=1
CFLAGS ?= $(shell dpkg-buildflags --get CFLAGS)
LDFLAGS ?= $(shell dpkg-buildflags --get LDFLAGS)
WITH_SPDY := $(shell printf "Source: nginx\nBuild-Depends: libssl-dev (>= 1.0.1)\n" | \
dpkg-checkbuilddeps - >/dev/null 2>&1 && \
echo "--with-http_spdy_module")
%: