View git-fetchall.sh
#!/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 |
View .gitconfig
# -*-conf-*- | |
[user] | |
# email = biggers@utsl.com | |
email = mabigger@cisco.com | |
name = Mark Biggers | |
[core] | |
autocrlf = input | |
safecrlf = false | |
pager = less -+S |
View csvs_db_insert.py
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: |
View bashrc.win.sh
# /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 |
View peewee_pets_quickstart.py
# 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, |
View gosmacs.el
;;; gosmacs.el --- rebindings to imitate Gosmacs. | |
;; Copyright (C) 1986 Free Software Foundation, Inc. | |
;; Maintainer: FSF | |
;; Keywords: emulations | |
;; This file is part of GNU Emacs. | |
;; GNU Emacs is free software; you can redistribute it and/or modify |
View torpeewee_ex01.py
# -*- 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, |
View .bashrc.macos
# 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 |
View py_rotate_log_dict_config.py
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. |
View tcpclient.py
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") |
NewerOlder