Skip to content

Instantly share code, notes, and snippets.

Avatar

Marius Voila mariusv

View GitHub Profile
View DevOps
== 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.
View lamp.sh
#!/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 / check.sh
Last active Dec 14, 2015
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.
View check.sh
#!/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
@mariusv
mariusv / fix.ps1
Created Feb 6, 2013
Disable 'Large Receive Offload' on the driver properties for all interfaces using the Citrix PV Ethernet driver
View fix.ps1
$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 / fixUUID.sh
Last active Dec 11, 2015
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
View fixUUID.sh
#!/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."
View thegirlybookclub
<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 / girlybookclub
Last active Dec 10, 2015
vhost for girlybookclub.com
View girlybookclub
<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
@mariusv
mariusv / lamp.sh
Created Dec 21, 2012
Install apache/mysql/php
View lamp.sh
#!/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