Powershell has a strong .NET Framework integration. Because of this, you can do some pretty cool things with it. As .NET provides an UDP-Cliet, we can use it to make a simple wake on lan script using powershell. Continue reading Wake on lan using powershell
Month: May 2015
Changing screen refresh rate with a keyboard shortcut
I have a little movie and tv-show collection and use the popular open-source mediacenter software Kodi to organize it. But as some tv-shows/movies have other image frequencies/fps than others, it necessary to change the screen refresh rate accordingly. Kodi already delivers an integrated functionality to automatically change the refresh rate as required.
Personally, I like to have some control over this, so I decided to develope a small windows application in C++ (with some C in order to work with the Win32 API) to accomplish this. Doing so a is definitely not a big task. Continue reading Changing screen refresh rate with a keyboard shortcut
Replacing contents of a text file with batch
I personally do not like always creating applications for basic tasks. This is even the case when writing an application is probably easier than doing the same with batches, but I like these challenges. In my case, I had a few videos I wanted to process with AviSynth. Rather than creating multiple copies of the AviSynth script, I wanted to create a template where all other derive from. Continue reading Replacing contents of a text file with batch
Routing your virtual machine network
Virtualizing your servers is pretty cool. But having a server in a hosted environment brings some restrictions with networking. To get around this, you can use a virtual network and configure some internal routing. Continue reading Routing your virtual machine network
Fat jar with embedded fonts
Creating fat jars using maven is pretty simple. But it won’t simply work if you’re using jasper reports and embed fonts into your PDF reports. You’ll probably end up with an exception like the following:
1 2 3 4 5 6 7 8 9 10 |
Exception in thread "main" java.lang.ExceptionInInitializerError at net.sf.jasperreports.engine.fill.JRBaseFiller.(JRBaseFiller.java:104) at net.sf.jasperreports.engine.fill.JRVerticalFiller.(JRVerticalFiller.java:72) at net.sf.jasperreports.engine.fill.JRVerticalFiller.(JRVerticalFiller.java:60) at net.sf.jasperreports.engine.fill.JRFiller.createBandReportFiller(JRFiller.java:201) at net.sf.jasperreports.engine.fill.JRFiller.createReportFiller(JRFiller.java:216) at net.sf.jasperreports.engine.fill.JRFiller.fill(JRFiller.java:116) at net.sf.jasperreports.engine.JasperFillManager.fill(JasperFillManager.java:667) at net.sf.jasperreports.engine.JasperFillManager.fillReport(JasperFillManager.java:983) at EmbeddedFontsExample.main(EmbeddedFontsExample.java:18) |
Embedding fonts in jasper reports
As it’s not guaranteed that all users have the same set of fonts, it’s a good idea to embed these fonts into the created PDF-Files, especially if it’s a more or less exotic font. The following example will quickly show the few steps required to accomplish this task. Continue reading Embedding fonts in jasper reports