Remove all un-tracked files under mercurial
I just had an issue where Visual studio junked up a fresh hg clone with some project upgrade information among other things. This my quick remedy.
rm $(hg status -A | grep ? | cut -c3-)
I just had an issue where Visual studio junked up a fresh hg clone with some project upgrade information among other things. This my quick remedy.
rm $(hg status -A | grep ? | cut -c3-)
This is a set of instructions for installing Balsamiq on Fedora 17 using alien and the .deb package provided on the Balsamiq website . Hopefully there will be an rpm package download in the future. This method can be applied to other deb packages as well.
Start by downloading the Balsamiq .deb from http://www.balsamiq.com/download#dlin
Next you’ll need git installed, if you don’t have it already. ‘yum install git’ does the trick.
Next download the alien source code from http://joeyh.name/code/alien/ and install it
cd /home/[username]/[location]/
git clone git://git.kitenet.net/alien
cd alien
perl Makefile.PL; make; make install
Finally run alien and pass it the path to the deb file. Run the alien script without the i flag if you just want to generate the rpm and not install.
cd alien
su
alien -ri --scripts /home/[username]/[Downloads]
/MockupsForDesktop[Arch].deb
Finally add a symbolic link to balsamiq and run.
ln -s /opt/Balsamiq\ Mockups/bin/Balsamiq\ Mockups /usr/bin/balsamiq
balsamiq
Over the past year I’ve become a foosball fanatic. We have a great foosball table where I work and The other day after a game I sat down at my desk and with some free time left decided to check out what was new on the exhibition page at processing.org [http://processing.org/exhibition/]. I came across the “Max Planck Reasearch Networks” video and immediately though to my self ‘that multi-touch screen looks like it would be the perfect size for a foosball table!’ And so began the idea for my latest side project…
I’ll be updating this post with my findings as I go.
<?xml version="1.0" encoding="UTF-8"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" > <xsl:template match="//a"> <xsl:value-of select="@href" /> </xsl:template> </xsl:stylesheet>
This command comes in handy if you want to prepend one file to another.
sed -i -e ‘1r fileToAppearOnTop.txt’ -e ‘1{h; D;}’ -e ‘2{p}’ fileNameToPrependTo.txt
Here’s my latest project on github. This lets you Beautify excel formulas, as well as converting them to c# or JavaScript. https://github.com/joshatjben/excelFormulaUtilitiesJS.
Trim HTML - this will remove any leading or trailing <br />, or white spaces.
^(?:\s| |<\s*br\s*\/*\s*>)*|(?:\s| |<\s*br\s*\/*\s*>)*$
JavaScript function
function trimHTML(inStr){
return inStr.replace(/^(?:\s| |<\s*br\s*\/*\s*>)*|(?:\s| |<\s*br\s*\/*\s*>)*$/, "");
}
This is useful when trying to get windows onto a usb drive. (Change d to your USB drive)
convert d: /fs:ntfs
This will make sure that the the year is 2000 or greater, check to see that the month is between 01 and 12, and finally make sure the date is between 01 and 31.
^[2][0-9]{3}-(?:[1](?=[0-2])|0(?=[1-9]))[0-9]-(?:[3](?=[01])|0(?=[1-9])|[12])[0-9]$