Skip to content

Instantly share code, notes, and snippets.


Mark Biggers biggers

View GitHub Profile
View gist:9607312


I have two branches A and B and, I want to merge branch A's single file with Branch B's corresponding file. How can I do that?

I have two branches A [master] and B with the same files but a different programming interface in some files. Now the methods of file f, which is independent of the interface differences in the two branches, were changed in branch B, but the change is important for both branches. Thus, I need to merge just file f of branch B into file f of branch

from fabric.api import *
from fabric.context_managers import cd
from fabric.operations import local as lrun, sudo
from fabric.contrib.files import sed
from fabric.utils import warn
from local_fabfile import root, prod, lh, SERVER_IP
def virtualenv(command, run_directory=''):
if run_directory == '':
biggers /
Last active Dec 22, 2015
Am example (expanded) of using Python 'clom' library, to "abstract" Virtualbox command-line. Thanks to the "Refs!" It's not a runnable script by itself; will probably make it so, soon.
#!/usr/bin/env python
from clom import clom
from pprint import pprint as pp
# Install, into a virtualenv: pip install clom
# Reference:
# Derived from:
biggers /
Last active Dec 22, 2015
Python 'sh' module example, working with Virtualbox commands & outputs
#!/usr/bin/env python
from __future__ import print_function
from pprint import pprint
# install into a virtual-env: pip install sh
# References:
# Inspired by:
# encoding: utf-8
from __future__ import with_statement
import os
import sys
import datetime
from fabric.api import cd, run, prefix, task, env, get, roles
from fabric.colors import yellow, green
from contextlib import contextmanager as _contextmanager
biggers /
Created Aug 19, 2016
x11vnc service start-up script
case "$1" in
killall ${VNC_SERVER}
biggers /
Created Jan 18, 2017
Enable wired-interfaces (incl VPN) to be managed by systemd - Ubuntu Linux 16+
# NetworkManager should manage wired interfaces!
# Linux Mint 18.x (Ubuntu 16.04)
# REF: "fixing VPN problem in Ubuntu",
aptitude install etckeeper
git log
nmcli c # NOTE: no wired-interface controlled
emacs -nw /etc/NetworkManager/NetworkManager.conf
biggers /
Last active Jan 18, 2017
Installing Ansible from 'git source' -- by tagged-release
## better, working "shell-recipe" for installing a tagged
## Ansible release, from Git source
sudo aptitude install python-yaml python-jinja2 python-paramiko
cd ~/git/Python
git clone git:// --recursive
biggers / Makefile.docker
Created Mar 22, 2016
GNU Makefile for docker-compose work
View Makefile.docker
## -*- makefile -*-
##, Mark Biggers
## GNU Makefile for docker-compose build & run of a Python or other Project
## REFs:
biggers / opennebula-suse-install.rst
Created Oct 31, 2013
OpenNebula: openSUSE first-cut Deployment -- document
View opennebula-suse-install.rst

OpenNebula: openSUSE first-cut Deployment

Author: Mark Biggers <
Description:Install & configuration of OpenNebula (ONE) 4.x on openSUSE 12.3
Ref:SDB:Cloud OpenNebula: <>
Ref:ONE Installing the Software: <>
Ref:KVM driver, KVM configuration: <>
Ref:ONE Rel 4.2 packages, for openSUSE: <>