Skip to content

Instantly share code, notes, and snippets.

View daniviga's full-sized avatar

Daniele Viganò daniviga

View GitHub Profile
#!/bin/bash
WLAN="wlan0"
/usr/sbin/iw dev $WLAN set power_save off
echo -n "${WLAN}: "
/usr/sbin/iw dev $WLAN get power_save
exit 0 # make the command safer for boot always returning true

Hello

I'm a test

# Copyright (C) 2010-2018 GEM Foundation
#
# OpenQuake is free software: you can redistribute it and/or modify it
# under the terms of the GNU Affero General Public License as published
# by the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# OpenQuake is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
@daniviga
daniviga / check_input.py
Created August 1, 2018 13:34
check_input.py standalone command for OQ Engine 3.1
#!/opt/openquake/bin/python3
# -*- coding: utf-8 -*-
# vim: tabstop=4 shiftwidth=4 softtabstop=4
#
# Copyright (C) 2018 GEM Foundation
#
# OpenQuake is free software: you can redistribute it and/or modify it
# under the terms of the GNU Affero General Public License as published
# by the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
@daniviga
daniviga / geonode25-dev.sh
Last active February 9, 2017 09:40
Minimal GeoNode 2.5/master setup on Xenial
# Create an LXC with Xenial
lxc-create -n genode25 -t ubuntu -- -r xenial
# Inside the LXC
## Pre-requisites
sudo apt update
sudo apt install -y git python-dev python-virtualenv libpq-dev libgdal-dev openjdk-8-jdk-headless
## Create the virtualenv
#!/bin/bash
# Install EPEL
yum install -y httpd php php-mysql php-gd php-snmp vixie-cron php-pear net-snmp net-snmp-utils graphviz subversion mysql-server mysql rrdtool fping ImageMagick jwhois nmap OpenIPMI-tools
pear install Net_IPv6
pear install Net_IPv4
#!/bin/sh
#----
# bootstrap centos6
#release=$(cat /etc/fedora-release | awk '/^Fedora/ {print $3}')
#arch=$(arch)
release=6.3
arch=x86_64
ROOTFS=/rootfs/centos$release-$arch
#!/bin/sh
#----
# bootstrap fedora18
#release=$(cat /etc/fedora-release | awk '/^Fedora/ {print $3}')
#arch=$(arch)
release=18
arch=x86_64
ROOTFS=/var/lib/libvirt/lxc/fedora$release-$arch