Occassionaly we need to clean up our repository when we accidently commit large files. We may delete the files and commit the project again however the repository size remails huge. This is what I did to clean up the repository.
Rewriting Git history demands changing all the affected commit ids, and so everyone who’s working on the project will need to delete their old copies of the repo, and do a fresh clone after you’ve cleaned the history. The more people it inconveniences, the more you need a good reason to do it – your superfluous file isn’t really causing a problem, but if only you are working on the project, you might as well clean up the Git history if you want to!
To make it as easy as possible, I’d recommend using the BFG Repo-Cleaner, a simpler, faster alternative to git-filter-branch specifically designed for removing files from Git history. One way in which it makes your life easier here is that it actually handles all refs by default (all tags, branches, etc) but it’s also 10 – 50x faster.
You should carefully follow the steps here: http://rtyley.github.com/bfg-repo-cleaner/#usage – but the core bit is just this: download the BFG jar (requires Java 6 or above) and run this command:
Your entire repository history will be scanned, and any file named filename.orig (that’s not in your latest commit) will be removed. This is considerably easier than using git-filter-branch to do the same thing!
Will need the follwoing resources: BFG Jar Steps of usage java -jar bfg.jar --delete-files <filename> my-repo.git
Multiple Branches getting into the commit
There was also a problem of multiple branches getting into the commit and being merged later.
For that we did a rebase. However when we do a rebase note that all the nodes (commits) from the point of the rebase gets rehashed. You have to tell all the users of your codebase to checkout the project again.
command for that is:
git rebase <commit where branching started>
Recently I set up a OpenVPN Client on OpenWRT. All the instructions are fragmented. Found a forum which had some instructions that worked.
I am mirroring the instructions so that I have a reference to them.
So I’ve been messing around and have a VPN connection running!
All wiki’s or how-to’s I found were just utter crap, so for future reference and anyone else having trouble with it, this is what I did:
– Install the OpenVPN package
– upload your key, conf and crt files to /etc/openvpn
– If needed, edit the conf file to your liking
– SSH into your OpenWRT using putty (root) and cd into /etc/openvpn
– openvpn –config mullvad.ovpn (replace with your conf file name)
– If you get the message “Initialization Sequence Completed”, openvpn is running, but you’ll notice you don’t have internet access
– Go to Network > Interfaces and make a new Interface
– Name it vpn_interface, choose protocol ‘unmanaged’ and select tun0 as the covered interface (this one’s new after you’ve started openvpn)
– Assign this interface to the wan firewall zone
– We want openvpn to start when the router boots, so go to System > Startup and at the bottom put this
# Put your custom commands here that should be executed once
# the system init finished. By default this file does nothing.
All of the guides I found had different rc.local scripts. This is the only one that works.
– reboot the router, the VPN will connect, you will have internet access, check your ip at http://whatismyipaddress.com/.
My interfaces look like this:
My firewall looks like this:
If your VPN requires a username and a password then do the following
Create a file in /etc/openvpn called pass.txt with the following contents
In your configuration file enter the following line
Recently I had issues that my ISP (ACT Broadband) would drop the connection. This meant that we had to reconnect and log on to a portal to get connected. It was quite a pain so I wrote a script to do that and had the script run every 5 min.
To get it working you first need to install wget-nossl becuase the wget that comes with openwrt does not work. To install wget run the command
I recently came across this Image on Reddit. I presume this is an Indian Lady from the Saree she is wearing. Probably a bank staff from the looks of the printer (That looks like a passbook printer).
She seems totally apathetic to the concerns of the people waiting to be served.
Just saw this video of a kid lying down between railway tracks and a train speeds over him. The scene looks very Indian however I am not able to confirm that.
This guy would probably lie low with the crackdown on the train surfing kids in Mumbai anyway this video is worth a watch.
Saw this video first on Break.com but got a youtube version from freakapedia.com
I do not know what motivates people to put a permanent mark based on a relationship that is very dynamic. Just saw this video of a person who got the tattoo of his ex-girlfriend removed (the hard way).
Watch this video only if you must. It got me squirming in my seat.