Skip to content

Instantly share code, notes, and snippets.

View btorch's full-sized avatar

Marcelo Martins btorch

  • Fortaleza
View GitHub Profile
@btorch
btorch / ParadoxPythonExample.py
Created June 6, 2019 18:55 — forked from anthonyeden/ParadoxPythonExample.py
Paradox Database: Connect & Query in Python
# A sample script to create a temporary copy of a Paradox database, connect to it, and query it.
# Requires PyPyODBC: https://pypi.python.org/pypi/pypyodbc
# Written by Anthony Eden - http://mediarealm.com.au/
import os
import shutil
import pypyodbc
@btorch
btorch / ks-1404minimalvm.cfg
Created December 9, 2015 15:57 — forked from vrillusions/_README.mkd
Kickstart for Ubuntu 14.04
#
#Generic Kickstart template for Ubuntu
#Platform: x86 and x86-64
#
# Customized for Server 14.04 minimal vm install
#
# Usage:
# - Look through config for any changes you want to do. You may want to change
# the initial admin user. Currently username is ubuntu and password is
# ChangeMe. Also may want to change the list of installed packages. Tried to
@btorch
btorch / setup_kiosk.sh
Created December 9, 2015 15:50 — forked from anonymous/setup_kiosk.sh
create a kiosk user
#!/bin/bash
# This script
# - creates a user (named below)
# - sets up a union (aufs) filesystem on top of the users immutable home
# - creates a cleanup script (/usr/local/bin/cleanup.sh) that empties the aufs
# layer on login/logout/boot
# - replaces the lightdm config
# - replaces rc.local to run the script
#
@btorch
btorch / Dockerfile
Last active August 29, 2015 14:07 — forked from astraw/Dockerfile
# Build this docker image with:
#
# sudo docker build .
#
# Take note of the <image_id>, which will be the output above in the
# form "Successfully built <image_id>". Now, run the IPython web
# notebook with:
#
# sudo docker run -p 8889:8889 <image_id>
#
pgrep -cf swift-object-server &>/dev/null && exit 1
for controller in `omreport storage controller | grep '^ID' | awk '{print $NF}' | grep -v '^0'`
do
for unit in {0..44}
do
/opt/dell/srvadmin/bin/omreport storage pdisk controller=${controller} vdisk=${unit} | grep -q "TOSHIBA DT01ACA300" && grep "c${controller}u${unit} " /etc/fstab | grep -vq inode64
if [ $? -eq 0 ]
then
echo "Starting to re-align c${controller}u${unit}"
sudo umount /srv/node/c${controller}u${unit}
@btorch
btorch / pydmesg
Created December 2, 2013 18:55 — forked from saghul/pydmesg
#!/usr/bin/env python
# coding=utf8
# Copyright (C) 2010 Saúl ibarra Corretgé <[email protected]>
#
"""
pydmesg: dmesg with human-readable timestamps
"""