- Author
Mark Biggers <biggers@utsl.com>
- Description
How to rescue a Linux system (OpenSUSE 12.x)
- Ref
System Rescue CD docs: <http://www.sysresccd.org/Online-Manual-EN>
- Ref
chroot, explained: <http://en.wikipedia.org/wiki/Chroot>
- Ref
Change Root (prepare for rescue): <https://wiki.archlinux.org/index.php/Change_Root>
- Ref
OpenSUSE wiki, "Recover root password": <https://en.opensuse.org/SDB:Recover_root_password>
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import pymysql.cursors | |
import os | |
from attrdict import AttrDict | |
import sys | |
from datetime import datetime as dt | |
# Insert all /var/tmp/*/"CSV summary-reports" into MySQL - using Py DB-API | |
# NOTE: schema for the table must have been already created! | |
# | |
# INSTALL: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Refs: | |
# (primary) http://peewee.readthedocs.io/en/latest/peewee/quickstart.html | |
# https://peewee.readthedocs.io/en/2.0.2/peewee/cookbook.html | |
from datetime import date | |
import peewee | |
from peewee import ( # noqa: F401 | |
MySQLDatabase, | |
Model, | |
BooleanField, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# you can omit the first (2) entries... | |
export PATH="$HOME/bin:/usr/local/bin:/usr/local/sbin:/usr/sbin::/sbin:/usr/bin:/bin" | |
export PATH=/Applications/Emacs.app/Contents/MacOS:$PATH | |
# 'virtualenvwrapper' support | |
export WORKON_HOME=$HOME/.virtualenvs | |
export VIRTUALENVWRAPPER_SCRIPT=/usr/local/bin/virtualenvwrapper.sh | |
source /usr/local/bin/virtualenvwrapper.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: utf-8 -*- | |
# REWORKED by biggers@utsl.com, from: | |
# 16/7/7 | |
# create by: snower | |
import datetime | |
from tornado import gen | |
from tornado.ioloop import IOLoop | |
from torpeewee import ( | |
Model, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM phusion/baseimage:0.9.18 | |
MAINTAINER biggers@utsl.com | |
ENV PYTHONUNBUFFERED 1 | |
# ...put your own build instructions here... | |
RUN apt-get update --no-install-recommends && \ | |
apt-get install -y --no-install-recommends \ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import time | |
import logging | |
from tornado.options import options, define | |
from tornado import gen | |
from tornado.tcpclient import TCPClient | |
from tornado.iostream import StreamClosedError | |
from tornado.ioloop import IOLoop | |
define("host", default="127.0.0.1", help="TCP server host") | |
define("port", default=9888, help="TCP port to connect to") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# REF: https://github.com/pyenv/pyenv/blob/master/README.md | |
# ... building Python 3.6.2 on Bastion, "locally" | |
# yum install [Python3 build pre-reqs, on CentOS 6.7] | |
curl -L https://raw.githubusercontent.com/pyenv/pyenv-installer/master/bin/pyenv-installer | bash | |
tee -a $HOME/.bash_profile <<EOF | |
export PATH="\$HOME/.pyenv/bin:\$PATH" | |
eval "\$(pyenv init -)" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-*-sh-*- | |
Various bits, pieces, notes -- on using Linux Volume (Disk) Mgmt, | |
on various Linux distros | |
"A Debian Grimoire - LVM: Logical Volume Management, Version 2" | |
http://deb.riseup.net/storage/lvm2/ | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import pymysql.cursors | |
import os | |
from attrdict import AttrDict | |
import sys | |
# Test a one-row Insert, Select for Capacity DB | |
# ... using Py DB-API | |
# | |
# Install: | |
# pip3 install PyMySQL attrdict |