Skip to content

Instantly share code, notes, and snippets.

View mariusv's full-sized avatar

Marius Voila mariusv

View GitHub Profile
@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 / 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 / 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 / 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 / remi.yml
Last active November 13, 2015 22:29
Ansible playbook to enable EPEL + REMI on a AWS Linux AMI. This gist is created for /u/AngleMan on https://www.reddit.com/r/ansible .
---
- hosts: all
sudo: yes
tasks:
- name: Enable EPEL
command: yum-config-manager --enable epel
- name: Install remi repo.
@mariusv
mariusv / stats
Created May 9, 2012 09:39
Linux script to collect system statistics and send to your email
#!/bin/bash
SERVER="mydomain.com"
EMAIL_TO="your_email@gmail.com"
EMAIL_FROM="stat@mydomain.com"
# logged in users and what are they running
WHO=`w`
@mariusv
mariusv / root
Created January 15, 2011 11:04
#!/bin/sh DEV1=ppp0 IP1=100.0.1.1 GW1=100.0.1.254 TABLE2=connection2 DEV2=ppp1 IP2=100.0.2.1 GW2=100.0.2.254 ip route flush table $TABLE1 ip route flush table $TABLE2 ip route show table main | grep -Ev '(^default|ppp)' | while read ROUTE ; do
#!/bin/sh
DEV1=ppp0
IP1=100.0.1.1
GW1=100.0.1.254
TABLE2=connection2
DEV2=ppp1
IP2=100.0.2.1
GW2=100.0.2.254
ip route flush table $TABLE1
ip route flush table $TABLE2
server {
listen 80;
server_name example.com;
root /var/www/example.com/public;
#rails_env development;
passenger_enabled on;
charset utf-8;
}
server {
listen 80;
server_name example.com;
root /var/www/example.com/public;
#rails_env development;
passenger_enabled on;
charset utf-8;
}