Skip to content

Instantly share code, notes, and snippets.

View Zweer's full-sized avatar

Niccolò Olivieri Achille Zweer

View GitHub Profile
@Zweer
Zweer / default.conf
Created December 28, 2012 13:38
Default configuration addons for the apache2 webserver
ServerAdmin admin@localhost
DocumentRoot /var/www
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
<Directory /var/www/>
Options Indexes FollowSymLinks MultiViews
AllowOverride None
@Zweer
Zweer / .screenrc
Created December 28, 2012 11:00
Screen configuration file
hardstatus on
hardstatus alwayslastline
hardstatus string "%w%=%l - %d/%m/%Y %c:%s"
@Zweer
Zweer / new_ubuntu_server.sh
Created September 18, 2012 14:50
Installation & Configuration of a new Ubuntu server
######################################################################################################
# Import into /etc/skel/ the default files for every user. It can be usefull to add in .bash_aliases #
######################################################################################################
list-rc(){
ls -l /etc/rc?.d/*$1
}
alias df='df -h'
alias du='du -h'
# Create a group named "admin" or change the name in the visudo to "adm".
#!/bin/bash
# Automatically destroies a website:
# - home dir (and everything inside it)
# - apache config file
# - the corresponding user
VHOST_CONF=/etc/apache2/sites-enabled
ROOT_UID=0
NOTROOT=87
WWW_ROOT=/var/www
#!/bin/bash
# Creates automatically everything for a new website:
# - home dir of the website
# - apache config file
# - corresponding user
ROOT_UID=0
NOTROOT=87
WWW_ROOT=/var/www
WWW_USER=webserveruser
@Zweer
Zweer / gist:1594595
Created January 11, 2012 13:12
Git initialization + commands
##########################################################################################################################################
############################################################# Initialization #############################################################
##########################################################################################################################################
# Personal vars
git config --global user.name "USER NAME"
git config --global user.email "USER EMAIL"
# Make PROJECT dir
mkdir PROJECT_NAME