Skip to content

Instantly share code, notes, and snippets.

View schakrava's full-sized avatar

Suman Chakravartula schakrava

View GitHub Profile
"""
Copyright (c) 2012-2014 RockStor, Inc. <http://rockstor.com>
This file is part of RockStor.
RockStor is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published
by the Free Software Foundation; either version 2 of the License,
or (at your option) any later version.
RockStor is distributed in the hope that it will be useful, but
#!/usr/bin/python
"""
Copyright (c) 2012-2015 RockStor, Inc. <http://rockstor.com>
This file is part of RockStor.
RockStor is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published
by the Free Software Foundation; either version 2 of the License,
or (at your option) any later version.
@schakrava
schakrava / squeezebox.json
Created January 24, 2016 02:41
Squeezebox Rock-On profile
{
"SqueezeBoxServer": {
"containers": {
"squeezebox": {
"image": "tdeckers/logitechmediaserver",
"launch_order": 1,
"ports": {
"9000": {
"description": "Webserver Port. Suggested default: 9000.",
"host_default": 9000,
@schakrava
schakrava / del-ni.py
Created November 2, 2015 23:03
del-ni
#!/usr/bin/python
import sys
sys.path[0:0] = [
'/opt/rock-dep/src/rockstor',
'/opt/rock-dep/eggs/supervisor-3.0b1-py2.7.egg',
'/opt/rock-dep/eggs/meld3-1.0.2-py2.7.egg',
'/opt/rock-dep/eggs/setuptools-18.3.2-py2.7.egg',
'/opt/rock-dep/eggs/psutil-3.2.1-py2.7-linux-x86_64.egg',
#!/usr/bin/python
import os
join = os.path.join
base = os.path.dirname(os.path.abspath(os.path.realpath(__file__)))
base = os.path.dirname(base)
import sys
sys.path[0:0] = [
#!/usr/bin/python
import os
join = os.path.join
base = os.path.dirname(os.path.abspath(os.path.realpath(__file__)))
base = os.path.dirname(base)
import sys
sys.path[0:0] = [
"""
Copyright (c) 2012-2013 RockStor, Inc. <http://rockstor.com>
This file is part of RockStor.
RockStor is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published
by the Free Software Foundation; either version 2 of the License,
or (at your option) any later version.
RockStor is distributed in the hope that it will be useful, but
#!/usr/bin/python
import os
import sys
join = os.path.join
base = '/opt/rockstor'
os.environ['DJANGO_SETTINGS_MODULE'] = 'settings'
@schakrava
schakrava / backup_script
Last active August 29, 2015 14:06
Simple script to backup home directory to Rockstor
#!/usr/bin/env python
import requests
import json
import base64
import sys
import subprocess
import datetime
@schakrava
schakrava / write_files
Created January 31, 2014 00:57
Small file and write intensive workload
#!/usr/bin/env python
import os
import sys
import subprocess
from os.path import join
import time
DD = '/usr/bin/dd'
RCLI = '/opt/rock-dep/bin/rcli'