Skip to content

Instantly share code, notes, and snippets.

View alpiepho's full-sized avatar
"java, java, java..."

Al Piepho alpiepho

"java, java, java..."
View GitHub Profile
@alpiepho
alpiepho / pack_svn_diff.sh
Created June 1, 2020 15:12
Script to grab before and after trees from svn status
#!/bin/bash
BRANCH="quasar"
# get what svn thinks are new and modified files
svn status | grep -e '^?' | cut -c 9- > ../packed_svn_add.txt
svn status | grep -e '^M' | cut -c 9- > ../packed_svn_mod.txt
# copy branch directory and revert modified files
@alpiepho
alpiepho / find_regex_mismatch.py
Created October 10, 2019 12:14
Find where regex fails to match a string using pypi package re-assert
# DESCRIPTION
# This script can be run on repl.it to find out where a regex expression
# fails. This uses the python library re-assert that can be found here:
# https://pypi.org/project/re-assert/
# SETUP
# Use online python IDE at
# https://repl.it/languages/python3
@alpiepho
alpiepho / all-git-branches.py
Last active July 8, 2019 17:01
Simple python script to download all GitHub branches for a given repo.
#!/usr/bin/python
# python3 ./all-git-branches.py -u <user> -d <directory> -r <repo> -n <number of commits>
#
# Tool to inspect Github and pull local copies of all commits for
# for the given user.
#
# Why? Every ask yourself the question 'I know I did this before, but
# which repos commit was it in?'
# With all files local, you can use any serach-in-files app to look.
@alpiepho
alpiepho / all-git-commits.py
Last active April 14, 2024 01:16
Simple python script to download all GitHub commits for a given repo.
#!/usr/bin/python
# python3 ./all-git-commits.py -u <user> -d <directory> -r <repo> -n <number of commits>
#
# Tool to inspect Github and pull local copies of all commits for
# for the given user.
#
# Why? Every ask yourself the question 'I know I did this before, but
# which repos commit was it in?'
# With all files local, you can use any serach-in-files app to look.
@alpiepho
alpiepho / all-github.py
Last active October 5, 2023 09:01
Simple python script to download all GitHub repos and gists for a given user.
#!/usr/bin/python
# python3 ./all-github.py -u <user> -d <directory>
#
# Tool to inspect Github and pull local copies of all repos and gists
# for the given user.
#
# Why? Every ask yourself the question 'I know I did this before, but
# which repos was it in?'
# With all files local, you can use any serach-in-files app to look.
@alpiepho
alpiepho / using_meld_on_mac.md
Last active December 28, 2023 00:56
Using meld on Mac

More Using Meld merging tool on Mac

After switching to 'Meld for Mac' from download instead of from homebrew, I saw problem again.

The problem is related how the app is closed. If you use the Menu option, the saved state is removed cleaning. If you close using the window close (read circle), the saved state remains. Somehow, when this there, the application will not open from command line. Sometimes it will open, but you need to manually switch to the Meld application from the tool bar.

To work around I added /Applications/Meld.app/Contents/MacOS/meld.wrapper.sh:

@alpiepho
alpiepho / python-avoid_verision-conflicts.txt
Created May 24, 2019 02:54
Python: Avoid version conflicts with Virtual Environments
From [🐍PyTricks]: Avoid version conflicts with Virtual Environments
# Virtual Environments ("virtualenvs") keep
# your project dependencies separated.
# They help you avoid version conflicts
# between packages and different versions
# of the Python runtime.
# Before creating & activating a virtualenv:
# `python` and `pip` map to the system
@alpiepho
alpiepho / parseCsvToLog.py
Last active October 4, 2017 02:20
Python - tool to a template of THE ONE FILE and insert data from a CSV file
#!/usr/bin/python
# NOTE
# Need to back burner this. Proving too time consuming to re-create
# the various attributes from the CSV strings (not enough information)
# Either need helper from .Net or write this tool in .NET
@alpiepho
alpiepho / parseLogToCsv.py
Created October 1, 2017 21:58
Python - tool to parse THE ONE FILE and pull out data as a CSV file
#!/usr/bin/python
import getopt
import os
import sys
def Usage():
print("Usage: %s -i <file> -o <file>" % sys.argv[0])
print(" -i <file> Input HTM file")
print(" -o <file> Output CSV file")
@alpiepho
alpiepho / expandLogData.py
Last active September 29, 2017 20:14
Python - tool to expand THE ONE FILE columns and rows (with adjusted dates)
#!/usr/bin/python
from datetime import datetime
import getopt
import os
import sys
TD_HEADER = "<td isi-data-column-header"
TR_DATA = "<tr class=\"data\" isi-data-row"
TR_DATAMARKED = "<tr class=\"data-marked\" isi-data-row"