param([string]$path)
Get-ChildItem $path -Recurse -Include *.cs | Where-Object {
(Get-Content $_.FullName) -match '\$Id'
} | ForEach-Object {
svn propset svn:keywords "HeadURL Id Author LastChangedBy LastChangedRevision LastChangeDate Revision Rev" $_.FullName
}
Thursday, March 17, 2016
Setting SVN Keywords property recursively using PowerShell
Here is a PowerShell script that allows you to set SVN keywords proeprty for .cs files. I confess this isn't written by me, and I got it from a forum which I can't remember where. Nonetheless, I would like to share it in case it is useful to others too.
Sunday, January 31, 2016
Linux Mint and KVM
I had tried KVM before but stopped at the point of creating virtual machines as I found the management tool is either too manual (command prompt based) or too confusing (GUI with a confusing layout/workflow). However, this was the experience then.
Yesterday, I came across this article (http://community.linuxmint.com/tutorial/view/1555), and it seems things have moved forward quite a bit since my last attempt. I thought why not give KVM another try.
Once you have setup your virtual hardware using using the virt-manager, the rest is straight forward.
Yesterday, I came across this article (http://community.linuxmint.com/tutorial/view/1555), and it seems things have moved forward quite a bit since my last attempt. I thought why not give KVM another try.
The installation is easy with commands below:
Virtualization with virt-manager:
# apt-get install qemu-system
# apt-get install qemu-utils
# apt-get install libvirt-bin
# apt-get install virt-manager
Installing SPICE for KVM remote and local access to VMs
# apt-get install python-spice-client-gtk
# apt-get install virt-viewer
Any users that want to manage VMs will need to be added to the "libvirtd" group.After the installation, restart the machine. You can either run the virt-manager from the command line or from the "Start menu". The interface is much improved (as I recalled) and much more logical.
Once you have setup your virtual hardware using using the virt-manager, the rest is straight forward.
Sunday, August 30, 2015
JDK and NetBeans
Normal I would attempt to avoid install/add software manually and use aptitude to get the job done instead.
Although there is an option to install Java and JDK with aptitude, the version is a bit old, i.e. version 7 instead 8. I have no option but do it manually.
Here are the steps which I tool to install JDK8 on my machine.
1) Download your JDK8 from Oracle. Since I am using Debian, I picked and used the gzip version.
2) Decompress the gzip file, e.g.
tar zxvf jdk-8u60-linux-i586.tar.gz
3) Move the uncompressed package to your desired location. In my case, I put it where other OpenJDK are located, e.g.
sudo mv jdk1.8.0u60 /usr/lib/jvm
4) Create a subversion mutual symbolic link to the /usr/lib/jvm/jdk1.8.0u60, e.g.
ln -s /usr/lib/jvm/jdk1.8.0u60 /usr/lib/jvm/oracle-jdk8
5) Use update-alternative to add java, javaws, javadoc, javac to the system.
update-alternatives --install "/usr/bin/java" "java" "/usr/lib/jvm/oracle-jdk8/bin/java" 1
Repeat the above for javac, javadoc and javaws
6) You may need to use update-alternatives --config to update the default java executable path, e.g.
update-alternatives --config java
7) Test you setup by running
java -version
(see: http://askubuntu.com/questions/56104/how-can-i-install-sun-oracles-proprietary-java-jdk-6-7-8-or-jre)
8) If you have NetBeans setup before the installation, you need to update its java_homepath value by modifying its netbeans.conf file.
I kept the configuration personalized to my account, hence I used the localized version which is at:
~/.netbeans//etc/netbeans.conf
The contents in my netbeans.conf is
netbeans_jdkhome=/usr/lib/jvm/oracle-jdk8
note: You may not see the etc directory. If you can't see it, you need to create the etc directory and .netbeans.conf file yourself.
(further information can be found at: Netbeans - ArchWiki)
Update 2016-01-28: Alternatively, Java can be installed with APT by following the instructions at:
https://launchpad.net/~webupd8team/+archive/ubuntu/java
and
https://launchpad.net/~webupd8team/+archive/ubuntu/java
Although there is an option to install Java and JDK with aptitude, the version is a bit old, i.e. version 7 instead 8. I have no option but do it manually.
Here are the steps which I tool to install JDK8 on my machine.
1) Download your JDK8 from Oracle. Since I am using Debian, I picked and used the gzip version.
2) Decompress the gzip file, e.g.
tar zxvf jdk-8u60-linux-i586.tar.gz
3) Move the uncompressed package to your desired location. In my case, I put it where other OpenJDK are located, e.g.
sudo mv jdk1.8.0u60 /usr/lib/jvm
4) Create a subversion mutual symbolic link to the /usr/lib/jvm/jdk1.8.0u60, e.g.
ln -s /usr/lib/jvm/jdk1.8.0u60 /usr/lib/jvm/oracle-jdk8
5) Use update-alternative to add java, javaws, javadoc, javac to the system.
update-alternatives --install "/usr/bin/java" "java" "/usr/lib/jvm/oracle-jdk8/bin/java" 1
Repeat the above for javac, javadoc and javaws
6) You may need to use update-alternatives --config to update the default java executable path, e.g.
update-alternatives --config java
7) Test you setup by running
java -version
(see: http://askubuntu.com/questions/56104/how-can-i-install-sun-oracles-proprietary-java-jdk-6-7-8-or-jre)
8) If you have NetBeans setup before the installation, you need to update its java_homepath value by modifying its netbeans.conf file.
I kept the configuration personalized to my account, hence I used the localized version which is at:
~/.netbeans/
The contents in my netbeans.conf is
netbeans_jdkhome=/usr/lib/jvm/oracle-jdk8
note: You may not see the etc directory. If you can't see it, you need to create the etc directory and .netbeans.conf file yourself.
(further information can be found at: Netbeans - ArchWiki)
Update 2016-01-28: Alternatively, Java can be installed with APT by following the instructions at:
https://launchpad.net/~webupd8team/+archive/ubuntu/java
and
https://launchpad.net/~webupd8team/+archive/ubuntu/java
Labels:
aptitude,
debian,
jdk installation,
linux,
Netbeans,
netbeans.conf,
package,
PPA,
update-alternatives
Tuesday, August 11, 2015
USB3.0 Gigabit Ethernet Adapter
I just want to share my experience with 2 USB3 to Gigabit Ethernet solutions. I have tried solutions from ASIX (AX88179) and Realtek (RTL8153). Both work very well and offer nice speed bump from the 10/100Mbps adapter that comes with my laptop. I get approximately 60-70MB/s (read) for my laptop with USB3, and near 40MB/s (read) for my old Dell desktop with USB2.
If you have a laptop that only comes with 10/100Mbps NIC, or have a old SFF desktop that again comes with 10/100Mbps onboard NIC, you may want to give these USB3 to Gigabit Ethernet adapters a try. The two adapters I have certainly give the otherwise slow transfer speed a nice boost!
| RTL8153 USB3 to Gigabit Adapter on USB2 connection |
If you have a laptop that only comes with 10/100Mbps NIC, or have a old SFF desktop that again comes with 10/100Mbps onboard NIC, you may want to give these USB3 to Gigabit Ethernet adapters a try. The two adapters I have certainly give the otherwise slow transfer speed a nice boost!
Friday, August 7, 2015
I have an old Broadcom NetXtreme Gigabit Ethernet NIC, and it worked well with Windows 8.1 but not with Windows 10 (at least not with the version I had).
Anyway, today I managed to find a set of drivers which work. The driver I found is from Lenovo for its THINKSTATION S10 (TYPE 6423, 6483), ver. 10.86.0.0. Its URL is:
http://support.lenovo.com/us/en/downloads/ds000638
Anyway, today I managed to find a set of drivers which work. The driver I found is from Lenovo for its THINKSTATION S10 (TYPE 6423, 6483), ver. 10.86.0.0. Its URL is:
http://support.lenovo.com/us/en/downloads/ds000638
If you are having one of these Braodcom NIC below, you may want to give it try.
5700, 5701, 5702, 5703, 5704, 5705, 5751, 5753, 5754, 5755, 5756, 5782, 5786, 5787, 5788, 5789, 5901, 5906
By the way, the hardware ID for my card is:
PCI\VEN_14E4&DEV_16A6
5700, 5701, 5702, 5703, 5704, 5705, 5751, 5753, 5754, 5755, 5756, 5782, 5786, 5787, 5788, 5789, 5901, 5906
By the way, the hardware ID for my card is:
PCI\VEN_14E4&DEV_16A6
Labels:
14E4,
16A6,
Broadcom NetXtreme Gigabit Ethernet,
driver,
Window 8.1,
Windows 10
Wednesday, August 5, 2015
Change Window 8/10 Network Location using PowerShell
One thing that I am really annoyed by Windows 8 and then now Windows 10 is Set/Change network location. Microsoft manages to make something so easy in Windows 7 to something that is so convoluted in new versions.
If you are comfortable with using commands, you may want to use PowerShell to change the Network Location instead.
1) You need to start PowerShell with elevated user account with command as below.
PSH>Start-Process WindowsPowerShell.exe -verb RunAsAlternatively, you can type powershell in Search, and run it as an administrator by using the "Run As" option from the context menu (right click)
2) Use the Get-NetconnectionProfile to find out the InterfaceIndex of the connected NIC, e.g.
PSH> Get-NetConnectionProfile3) Use the Set-NetConnectionProfile to change to the desired network location.
......
Name : Unidentified network
InterfaceAlias : vEthernet (Local-10)
InterfaceIndex : 18
NetworkCategory : Public
IPv4Connectivity : LocalNetwork
IPv6Connectivity : LocalNetwork
PSH> Set-NetConnectionProfile -InterfaceIndex 18 -NetworkCategory PrivateThat's it. This saves you from switching account, and then jump through hoops to get the network location changed.
(ref: http://blogs.msmvps.com/russel/2013/12/29/set-network-location-to-private-in-windows-8-1server-2012-r2/)
Labels:
Network Location,
PowerShell,
Private,
Public,
Windows 10,
Windows 8.1
Friday, July 31, 2015
Microsoft Edge and Google
One of the selling feature of Windows 10 is its brand new browser Edge. Most review said it is fast, so I give it a spin myself. After a brief moment with it, I almost wrote it off as I couldn't seem to change its default search result provider from Bing to Google. With the old IE, the method was obvious. You click on the option for showing you a list of providers and pick from it; With Edge, you click "Add New", nothing happens. As it turns out, the "Add New" option only comes to live if you are on the search engine page as seen below.
I may be wrong, but this works for me.
Labels:
Bing,
Change provider,
Change Search Engine,
Edge,
Google,
search,
Search Engine
Subscribe to:
Posts (Atom)
