0 Comments

There are a lot of guides on how to install Pi-hole on a pi. I just used the win32DiskImager to put Rasbian on it and I did put an ssh.txt file on the SD card to enable SSH. I just had to plug it in the pi and wait for it to show up on the DHCP list of my router so that I knew the IP to ssh to.

I have an archer c7 router which has “DNS rebind protection” so I could not change the DNS to the local IP address.

In order to fix it I had to go to the Archer web interface and follow these steps:

Add in dhcp –> dhcp settings, set the primary DNS to the local ip

in the dhcp –> address reservation “add new “ paste the mac address which you can find in dhcp –> dhcp clients list.

and the local ip which the pi has. This makes sure that the next reboot, the pi/dns server will have the same lan IP.


By the way, I had an issue with the ‘ftl’ part in the installation of pi-hole

I fixed it with : `sudo nano /etc/resolv.conf`

add a line with: `nameserver 8.8.8.8`

That is the google dns and that makes sure that there is a know dns so that the installation can lookup ip’s and continue.

Save the .conf file and run `sudo bash /etc/.pihole/pihole –r`


That will repair the installation and the FTL part will succeed now that there is an dns entry to the google dns in the resolv.conf


Good luck!

ps. please let me know if you know a way to block youtube ads. No browser plugin, but a pi-hole solution please.

Post on LinkedIn
0 Comments

I have finished migrating from an “old” virtual private server (VPS) running Windows Server 2008 to a server running 2012 r2 which includes IIS 8.5

At this time the 1.9.1 is the latest https://github.com/Lone-Coder/letsencrypt-win-simple/releases

After extracting the zip you need to move the content to a permanent folder from where you can keep running the Automated Certificate Management Environment (ACME) which can renew the certificates

 

image

If you run it as admin, it will ask you for your e-mail. It will stay private, it’s just to notify if a renewal failed.

Will you agree on https://letsencrypt.org/documents/LE-SA-v1.1.1-August-1-2016.pdf

next is a list, not of the websites but the bindings. Mine was rather big (100 entries) and contained multiple pages. After the bindings there are more options:

image

 

After selecting a “website” number you can specify the user which will be used to run the renewal process.

The last step is to make an entry in your calendar to verify that the renewal succeeded.

I have also installed Certify to view the certificates http://certify.webprofusion.com/ 

I used version Alpha V0.9.85

All that was left was to test the website with https and if it succeeds, make an IIS redirect to route all traffic to the https version:

image

image

Good luck and enjoy the free SSL certificates!

Post on LinkedIn
0 Comments

A while ago I was working on an PHP project and decided to give the new WebMatrix a try because it has PHP support. The installation with the web platform tool is painless. When I opened the PHP project, WebMatrix noticed that I did not had PHP installed and it was installed automatically. awesome! When I downloaded, installed and configured MYSQL on my Windows 8 machine it was all good to go. Only the existing code did not work. It took me a while to realize that my MYSQL connection was working fine. After a while I figured out that the session variable was not filled.

A small phpinfo file with the famous

<?php phpinfo(); ?> 

Told me that the error_log was located at C:\WINDOWS\temp\php53_errors.log and that file told me

[21-May-2013 17:39:40 Asia/Kuwait] PHP Warning:  Unknown: Failed to write session data (files). Please verify that the current setting of session.save_path is correct (C:\WINDOWS\temp) in Unknown on line 0

So I tried to open the path manually and it required Administrator rights.

To fix this I had to change session.save_path to an other directory.

So you have to open the php.ini file. Mine was located in the folder C:\Program Files (x86)\IIS Express\PHP\v5.3\

and search for a line which isn’t commented out and has the session.save_path=C:\windows\temp and replace it with a writeable path.

 

Happy programming with WebMatrix 3!

 

kick it on DotNetKicks.com Shout it

Post on LinkedIn
0 Comments

This post is about my 2 cents about upgrading from Windows 7 pro x64 to Windows 8 pro. I have been a Windows user since 3.11 and have never upgraded a Windows installation. I have been clean installing all versions.

Hardware background

My Dell notebook is from 2009. It had Vista installed by default and was ready for Windows 7. In fact, it came with a free upgrade from Dell.

I have blogged about my win8 test drive earlier. It still had the windows start button in that build and had no metro/live tiles. It is almost a year ago.

My dell xps16 has a limit of 4gb and has an Samsung 830 SSD 128gb as laptop upgrade kit (which is really recommended).

Upgrading to windows 8

My first step was to make a backup. I had backups around because SSD can fail in a blink of an eye. As side note: my Samsung drive has never let me down. In fact, it made my Windows 7 really fast!

I ran the upgrade advisor/assistant and uninstalled Ultramon, Visual Studio 2010 (used 2012 anyway) and Office 2010 (used the 2013 preview of Office 365).

So the upgrade was just a next, next finish thing and took about 2 hours and several reboots. After that, my system was good to go.

windows-toets_2394284

Reasons to upgrade to win8

1. speed

This is actually enough reasons already to upgrade.

  • Boot time reduction (cold boot)
  • More responsive user interface in use
  • Return from hibernate is faster
  • File move/copy dialog feels faster and has more details

2. shortcuts

The Windows key is everything! I already used the key a lot in win7, but now even more! Here are the shortcuts I used in Windows 7:

  • windows key + E for explorer
  • windows key + M to minimize all and go to desktop
  • windows key + start typing to launch an application
  • windows key + F to search a file
  • windows key + shift + arrow to move window to other screen
  • windows key + digit to activate pinned application nr# on taskbar
  • windows key + L to lock the account
  • windows key + R to run

and now the additional for windows 8:

  • windows key + C to control the current application (app specific settings)
  • windows key + W to search in control panel
  • windows key + X for power/super user quick menu

3. Backup

You now have file history! The files are stored like normal files so you can access them easily. You can also set Windows back to a fresh install!

4. Security

Bitlocker in already in pro and also Bitlocker portable. In Windows Vista and Windows 7 you needed the ultimate or enterprise edition to have Bitlocker.

Auto updates are installed in the background. So non-tech people have secure and up to date systems with win8.

5. Other

it has a lot of changes under the hood. With printer drivers and direct X and all those changes make windows 8 fast!

metro/live tiles

don’t be scared. I have no touch enabled device and use Visual Studio 2012 and Office 2013 all the time. I only notice the new metro stuff when I login and press the windows key. But it is so responsive and fast that it is not annoying. And you can control everything with the keyboard. Also all the metro stuff! So there is NO reason not to upgrade! I am running Windows 8 in desktop mode the whole day. There are some small applications that give you back a start button. But if you actually require those hacks, you are using the operating system not how it’s meant to be used.

So to conclude this post: Upgrade from Windows 7 to 8 today! It’s only 30 euro’s according to the upgrade assistant. So it’s a bargain!

Have fun with your new OS!
Post on LinkedIn
1 Comments

This blog will show you how to download a JSON string and parse it to POCO objects with Asp.Net C# in Visual Studio 2012 with an extension and nuget package and only 3 lines of code.

For this example I am using the Visual Studio achievements. You can install the extension in Visual Studio 2012 and/or Visual Studio 2010. It uses FxCop and is a lot of fun. So I have installed this extension and have several achievements.

The url for your personal page is:

http://channel9.msdn.com/niners/USERNAME/achievements/visualstudio

I have found the API of the achievements on  and it is using JSON. In my web project I added this NuGet package to work with JSON.

NuGet

To make life easier, I have installed Mads Kristensens Web Essentials 2012.

So I have copied the output of

http://channel9.msdn.com/niners/CapSoft/achievements/visualstudio?json=true&raw=true

and in Visual Studio 2012 I right clicked in the code behind:

image

Paste JSON As Classes!

That gives you (without coding)

public class Achievement
{
    public string Name { get; set; }
    public int CurrentNumber { get; set; }
    public DateTime DateEarned { get; set; }
}

public class Parent
{
    public string Name { get; set; }
    public string FriendlyName { get; set; }
    public Achievement[] Achievements { get; set; }
}

To use it, you can use a webclient object to download the JSON string and parse it using newtonsoft.json.

All that with just 3 lines of code!

protected void Page_Load(object sender, EventArgs e)
{
    WebClient wc = new WebClient();
    string json = wc.DownloadString("http://channel9.msdn.com/niners/CapSoft/achievements/visualstudio?json=true&raw=true");
    var a = JsonConvert.DeserializeObject<Parent>(json);
}

Good luck coding!

kick it on DotNetKicks.com Shout it

Post on LinkedIn