git repository from here https://github.com/sanfx/git-maildiff
So last weekend I started digging into this finding a way how I can save my time by pushing the latest commit of my work in progress feature branch and emailing the diff to my colleague of my work with the colour diff so as to make the changes more obvious to spot. Last weekend I also discovered that there is already a command that do part of it , git send-email I thought I could use that, but unfortunately I was disappointed that it doesn't send diffs in colour, having diff in colour easily lets pick up where the changes have been made, then I found a package on pypi ansi2HTML and thought my problem is solved and to my astonishment I discovered that I cannot use git send-email in conjunction with ansi2HTML since ansi2HTML embeds styles in head tag in HTML <style > for colour formatting and gmail doesn't support <styles> tag within the message body. So I kept digging, and just yesterday I came up with a way to convert simple diff to HTML colour diff, then I used smtplib python module to send the diff through email. manually tested and all working fine.
git repository from here https://github.com/sanfx/git-maildiff
0 Comments
Even I didn't thought that it would be this simple, and for a programmer their is really no need of downloading ansi2html or pygmentaize modules to generate colour diffs. While working on a home weekend projects I do to level up my skills I came up with simple method to which you just pass normal diff data as argument and it will output HTML of colour diff keeping the tabs intact. I hope you like it !!!
Sometimes I am bouncing of directires here and there in shell, and then I end up checking this directory is in stored in 'PATH' environment variable. one simple way is just to do echo $PATH, but what is you want to look inside a huge list of path for the current path you are standing in, then a list just separated with ":" in *nix could be little annoying when a sentence can do a lot of help, so I made a simple python script that i made executable using chmod +x ~/dev/scritps/paths and made an alias paths to ~/dev/scritps/paths so now I print a better output understandable at first look much convenient then pooking into lengthy line of many paths in PATH. you can also achieve the output just by using shell script like this
'echo $PATH\n; echo "Current patth in paths: `echo $PATH | grep -c $PWD`"' So this weekend beside just having fun at Matt's party, I took out time to make a python app that do slide show of the images in the directory we are currently standing at. So If I am standing at at Pictures folder it will slideshow in full screen for all the images i.e jpg or png format. Another reason why I came up with this application is the OSx built in preview.app involves steps to start a slideshow and doing it everytime was annoying. So I made my own slide show application. The code is in evolving stage currently. Get the latest from Github.com ssh: [email protected]:sanfx/slideShow.git HTTPS: git clone https://github.com/sanfx/slideShow.git to start go to the directory you want to slideshow from terminal, and execute the above code , if the current directory contains images it will start show, Use Left key to move backwards and right key to make slideshow go forward and spacebar to pause or play the slideshow.
Few days back I came up with idea to write a simple tool if a coder forget the name of a function or method. Right now I am not very old, 8 months back I got back into the profile of programming after joining MPC. Even back when I didnt worked with MPC I used to write long codes and made tools for maya, eyeon fusion. However, Here at MPC i got myself hooked to writing tools for Nuke and nuke 2d pipeline. Out of the experience of this few 8 months, I have tried my best to write a good code. This tool is kind of a warmup in the weekend I did to exercise and practice some neat python code. At the moment I havent written tests but I have made a GUI as well as terminal version of this tool. Here is a screenshot below. This tool allows you to enter the module or package name and the first few letters that comes to your mind you think that might be what you are looking for.
You can also add a module/package to sys.path if it is not in default list of sys.path. Right now I havent written test for it, I had some more functionality pending that I want to add like adding custom paths to history so user does not have to browse each and everytime, also auto complition of the modules installed in python lib. Here is a link to code on github: https://github.com/sanfx/searchMethod git clone https://github.com/sanfx/searchMethod.git make sure both those projects are saved to location that is in sys.path by default. and edit a path in python/searchMethod.py that is hardcoded path to listFilter. I will fix that soonish. Usage: run the script "searchMethod" from scripts/searchMethod in terminal or by double clicking in Finder. |
Custom Search
Other Blogs & PagesGit Commands Animation & VFX SitesA MUST READ for Ani/VFX Artistsawakened by thoughts,
|