This file contains hidden or 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
#!/usr/bin/env python | |
from PIL import Image | |
import sys | |
import time | |
import os | |
from os import path | |
import shutil | |
from optparse import OptionParser |
This file contains hidden or 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
#!/bin/bash | |
# MacOS *specific*, 'sshfs' remote-mounts | |
# - tested on MacOS catalina; latest MacOS Fuse & sshfs | |
# - 10-02-2021 Sat | |
# NOTE: | |
# sudo mkdir -p /private/ssh # and do a 'chmod, chgrp'... | |
# drwxrwsr-x 5 root admin 160 Oct 2 08:32 /private/ssh/ | |
# - install, MacOS FUSE, sshfs from https://osxfuse.github.io/ |
This file contains hidden or 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
#!/bin/sh | |
# "git fetch all branches" -- to your local-repo | |
## to RUN-ME: | |
## git branch -r | sed -r -e 's:origin/::g' -e '/^\s+HEAD/d' | egrep -v gerrit/ > /tmp/foo | |
# ... gives you a chance, to change the "temp list of Branches to fetch" | |
## cat /tmp/foo ## hand-edit, if needed |
This file contains hidden or 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 hidden or 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
# /home/mabigger/.bashrc.win -*-sh-*- | |
# ---- References | |
# https://nickjanetakis.com/blog/setting-up-docker-for-windows-and-wsl-to-work-flawlessly | |
# https://sourceforge.net/projects/vcxsrv/ | |
CEC=mabigger | |
sudo mount --bind /mnt/c /c |
This file contains hidden or 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 hidden or 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 [email protected], 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 hidden or 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 hidden or 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 sys | |
import logging | |
import logging.config | |
import random | |
import string | |
# "thank you" to folks on StackOverflow.com for various ideas, | |
# for this example. Works with Python3. |
This file contains hidden or 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
# CREATE USER 'example'@'localhost' IDENTIFIED BY 'example_password'; | |
# GRANT ALL PRIVILEGES ON *.* TO 'example'@'localhost' IDENTIFIED BY 'example_password'; | |
# CREATE DATABASE example; | |
import sys | |
import os | |
import time | |
from datetime import date, timedelta | |
from sqlalchemy.ext.declarative import declarative_base | |
from sqlalchemy import Column, Integer, String, create_engine | |
from sqlalchemy.dialects.mysql import DATETIME, DATE |
NewerOlder