I have been having surtax crashes with my Raspberry Pi B for a few months now and it is a very irritating intermittent issue. The unit basically locks up and even on resetting the power it won't always turn back on, but rather just sit there with no lights and no display and I end of having to cycle the power 2-5 times to get it to start again.
Anyway, I finally figured out there it appears to be an issues with the SD card. At first I thought that it was just an off brand card and the Raspberry Pi just didn't like it. But after some testing and hands on trials I figured out that it appeared to be an actual problem with the electrical connection and even though the card seamed seated properly to poor connection would cause the card to be or become unreadable. This was easy to verify by lightly pressing on the SD card and then turning on the Raspberry PI. It turned right on and worked perfectly and as soon as I let go it died again. I can't see any physical defects and the card looks to be seated and pressing firmly into the contacts but I guess it's not sufficient.
I found a simple solution, a simple light pressure chip clip/close pin on the SD-card solved the problem perfectly. I added a bit of cloth above the SD card and ensured that the clasp was pressing just above the SD Card's contact points and placed it over the end of the Raspberry PI and it works like a charm.
This is my personal blog and mainly contains technical solutions, open source code, and other projects I have worked on. Much of the technical solutions are very niche so your milage may vary.
Tuesday, September 29, 2015
Wednesday, September 16, 2015
XBian RC2 ASS Subtitles not Displaying in MKV Videos
Minor issues I found when updating to the current release of XBian on my Raspberry Pi B. Namely that subtitles would not work from MKV videos. Heres a simple fix for the issue. SSH into the xbian and run the following:
sudo apt-get install libass5
Friday, July 31, 2015
Drag and Drop in Umbraco 7
This code will let you add drag and drop logic to Umbraco v7 using the new AngularJS interface. It doesn't require and backend code updates but can't be created as a package because there is no way to update the umbTree directive as needed. There are only two files that need to be changed on the client. Note that updates to umbraco will overwrite these changes. Also note that due to lack of support in the underlying jQuery-sortable plugin for touch events this will not work on tablet devices.
First a set of changes for the umbTree and umbTreeItem directives in umbraco/Js/umbraco.directives.js.
This patch was generated on 7.2.8 so may not work on other versions automatically. You can manually apply all the listed changes on any 7.* version and they should work as expected with no changes needed.
Secondly, to allow for dragging items to collapsed nodes or nodes they don't already have children, the following needs to be added to the end of the line in umbraco/assets/css/umbraco.css.
First a set of changes for the umbTree and umbTreeItem directives in umbraco/Js/umbraco.directives.js.
This patch was generated on 7.2.8 so may not work on other versions automatically. You can manually apply all the listed changes on any 7.* version and they should work as expected with no changes needed.
Secondly, to allow for dragging items to collapsed nodes or nodes they don't already have children, the following needs to be added to the end of the line in umbraco/assets/css/umbraco.css.
Friday, May 29, 2015
For Each to loop over HttpFileCollection Files
Recently I was working with file uploads in .NET and found that theres no clean way to loop over each uploaded file. Here is a extension method for easily looping through the list and it allows filtering by field name and applying Regex to the file name.
Samples:
Source Code
Friday, May 22, 2015
Convert .htaccess deny rules to web.config
Recently I was looking for a easy way to convert a large list of spammer and hacker IP Addresses from Apache .htaccess allow/deny rules into a format I could use on our IIS Server. I found that there is really no good way to do this but after some work and a bit of coding here is a solution.
This solution will allow you to take a large list of access rules and apply them to an IIS website. Additionally this is done in a file so there is no need to manually add records.
This solution will allow you to take a large list of access rules and apply them to an IIS website. Additionally this is done in a file so there is no need to manually add records.
Collect your List of Rules
I used the following as a general blacklist of malicious and spammer client's to block. There are other sources or you may have your own list. Compile all the lists into one file and don't worry about duplicates, the script later on will resolve those.
Convert the Rules to Web.config Equivalents
I have created a simple javascript tool to convert the above lists into web.config rules. To do this go here and enter all your rules into the first text box. Make sure you supply all rules at once so that they can be de-duped. If the list does end up having duplicates then IIS will not start up properly.
Ensure you have the Features Installed
Next log onto your server and make sure that you have the Web Server > Security > IP and Domain Restrictions role installed. You may need to add it as it's not selected by default.
Apply your new Rules
Finally open up the web.config files for each of your main sites and add the generated text to the system.webServer/security/ipSecurity section. Save and reload the website to ensure it's working.
Example Web.config File
Subscribe to:
Posts (Atom)
Project Licenses
These works by Jeremy Pyne are licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License
