Skip to content

Instantly share code, notes, and snippets.

View murilopontes's full-sized avatar
:octocat:

Murilo Pontes murilopontes

:octocat:
  • Lisboa
  • 04:18 (UTC)
View GitHub Profile
wordpress_example:
image: wordpress
links:
- wordpress_db:mysql
ports:
- 8081:80
environment:
WORDPRESS_DB_PASSWORD: examplepass
wordpress_db:
echo deb http://emdebian.org/tools/debian/ jessie main > /etc/apt/sources.list.d/crosstools.list
apt-get install -y curl
curl http://emdebian.org/tools/debian/emdebian-toolchain-archive.key | sudo apt-key add -
sudo dpkg --add-architecture arm64
sudo dpkg --add-architecture armel
sudo dpkg --add-architecture armhf
sudo dpkg --add-architecture mips
sudo dpkg --add-architecture mipsel
sudo dpkg --add-architecture powerpc
sudo dpkg --add-architecture ppc64el
#!/bin/bash
echo '
Section "Device"
Identifier "Intel Graphics"
Driver "intel"
Option "AccelMethod" "uxa"
EndSection
' > /usr/share/X11/xorg.conf.d/20-intel.conf
#!/bin/bash
cd /home
chmod 711 *
for x in *; do
echo "fix /home/$x"
groupadd $x &> /dev/null
chown -R $x:$x $x &> /dev/null
chown -R $x:www-data $x/public_html &> /dev/null
chmod -R u+rwX $x &> /dev/null
server 10.8.0.0 255.255.0.0
port 1195
proto tcp
dev tun
topology subnet
max-clients 2000
comp-lzo
push "comp-lzo"
#!/bin/bash
#apt-get update
apt-get install -y openvpn easy-rsa
make-cadir /opt/openvpn-ca
cd /opt/openvpn-ca
source vars
./clean-all
./build-ca --batch
./build-key-server --batch server
#!/bin/bash
#add repo
echo deb http://apt.postgresql.org/pub/repos/apt/ trusty-pgdg main > /etc/apt/sources.list.d/pgdg.list
#add key for repo
wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add -
#get new list of packages
sudo apt-get update
#install
apt-get install postgresql-9.4
#! /bin/bash
# CREATE openssl.cnf if it doesn't exist
function banner()
{
echo
echo "*****************************************************************";
echo "$@"
echo "*****************************************************************";
ulimit -s 256
ulimit -i 1000000
ulimit -n 1000000
ulimit -a
echo 1000000 > /proc/sys/kernel/threads-max
cat /proc/sys/kernel/threads-max
echo 1000000 > /proc/sys/vm/max_map_count
cat /proc/sys/vm/max_map_count
echo 1000000 > /proc/sys/kernel/pid_max
cat /proc/sys/kernel/pid_max
#!/usr/bin/python
import threading
import time
import socket
import os
import sys
import resource
import subprocess