Skip to content

Instantly share code, notes, and snippets.

View mariusv's full-sized avatar

Marius Voila mariusv

View GitHub Profile
@mariusv
mariusv / lamp.sh
Created December 21, 2012 17:18
Install apache/mysql/php
#!/bin/bash
set -e
MY_PATH="$( cd "$( dirname "$0" )" && pwd )"
echo Now w are updating the system please wait till the process will end
apt-get update && apt-get upgrade -y
@mariusv
mariusv / girlybookclub
Last active December 10, 2015 15:29
vhost for girlybookclub.com
<VirtualHost *>
ServerAdmin contact@girlybookclub.com
ServerName
ServerAlias *.girlybookclub.com www.girlybookclub.com
DirectoryIndex index.html index.htm index.php
DocumentRoot /home/tgbc/girlybookclub/
<Directory /home/tgbc/girlybookclub/>
Options Indexes FollowSymLinks MultiViews
<VirtualHost *>
ServerAdmin contact@thegirlybookclub.com
ServerName thegirlybookclub.com
ServerAlias *.thegirlybookclub.com www.thegirlybookclub.com
DirectoryIndex index.html index.htm index.php
DocumentRoot /home/tgbc/thegirlybookclub/
<Directory /home/tgbc/thegirlybookclub/>
Options Indexes FollowSymLinks MultiViews
@mariusv
mariusv / fixUUID.sh
Last active December 11, 2015 13:09
This fixes the UUID issue on Racksapce Cloud servers with Ubuntu 12.04 or any Ubuntu servers after upgrading the GRUB to GRUB2 and chose to install the maintainer version of menu.lst
#!/bin/sh
file="/mnt/boot/grub/menu.lst"
back="/mnt/boot/grub/menu.lst~"
word="UUID"
mount -o rw /dev/xvdb1 /mnt
if [ -x "$file" ]; then
echo "File $file does not exist."
@mariusv
mariusv / fix.ps1
Created February 6, 2013 11:51
Disable 'Large Receive Offload' on the driver properties for all interfaces using the Citrix PV Ethernet driver
$root = 'HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Class\{4D36E972-E325-11CE-BFC1-08002BE10318}'
$items = Get-ChildItem -Path Registry::$Root -Name
Foreach ($item in $items) {
if ($item -ne "Properties") {
$path = $root + "\" + $item
$DriverDesc = Get-ItemProperty -Path Registry::$path | Select-Object -expandproperty DriverDesc
if ($DriverDesc -eq "Citrix PV Ethernet Adapter") {
Set-ItemProperty -path Registry::$path -Name LROIPv4 -Value 0
}
@mariusv
mariusv / check.sh
Last active December 14, 2015 03:19
Check if your server was compromised with the rootkit which leaves a backdoor on the system and gains the full root access to Linux-based servers.
#!/bin/bash
lib64=/lib64/libkeyutils.so.1.9
lib64_1=/lib64/libkeyutils-1.2.so.2
if [ -f $lib64 ]; then
echo The server is compromised, $lib64 found please open a ticket so we can help you to fix it!!
exit 0
fi
#!/bin/bash
# AUTHOR="Marius Voila (marius.voila@gmail.com)";
# TESTED WITH UBUNTU 10.04, 12.04 LTS
#
# Run as root (don't use sudo) with
# ./lampp-wizard.sh ; tail -f /var/log/lampp-wizard.log
#
# Redistribution and use in source and binary forms, with or without modification,
# are permitted provided that the following conditions are met:
#
@mariusv
mariusv / DevOps
Last active August 29, 2015 14:03 — forked from anonymous/gist:161265
== Rules ==
On Infrastructure
-----------------
There is one system, not a collection of systems.
The desired state of the system should be a known quantity.
The "known quantity" must be machine parseable.
The actual state of the system must self-correct to the desired state.
The only authoritative source for the actual state of the system is the system.
The entire system must be deployable using source media and text files.