Skip to content

Serving static pages with a custom domain with Cloudflare and github pages

The idea is pretty cool. You can serve static web-pages for free with your own domain with Cloudflare and Github Pages. The Cloudflare is handling the DNS, page caching, and the TSL certificate. The the pages itself are hosted by github. Here’s a quick tutorial how to do it.

Cloudflare

Set the DNS to point into Github Pages (https://help.github.com/en/github/working-with-github-pages/managing-a-custom-domain-for-your-github-pages-site)

185.199.108.153
185.199.109.153
185.199.110.153
185.199.111.153

Github

I basically made simple html pages without jekyll.

First add the CNAME file into the root of your github project for your own domain:

www.finice2020.com

After the initial commit I noticed that my images are not found from the server. It turns out that you have to add an empty file named as “.nojekyll” to bypass the jekyll, so the github will know to publish everything under your domain.

See my example project at: https://github.com/Summeli/finice2020.github.io

MailGun

You can also get free email routes from mailgun. Setting the account for that is also quite simple. Just follow the mailgun tutorial, for dns etc.
One of the benefits is that you can create rules for forwarding emails like info@mydomain.com and forward those emails for everyone involved in “info”.

pfSense Traffic Shaper for prioritizing gaming traffic

This a lot easier, than I originally though it would be. Works really well on my multiWAN setup too! I did everything with the Wizard, that can be found under firewall/traffic shaper.

The Wizard

Why even post steps about a traffic shaper wizard? Well, it’s pretty easy to use, so maybe there’s no point. However I tend to forget easy things, like choosing the correct wizard (traffic_shaper_wizard_multi_all.xml), and using high enough connection speed (the first image). Everything else is really simple.

At the first step we just add the upload / download speed limits. You should use some value that is actually pretty close to the maximum value, since the penaltyBox feature in the next still will only accept persentage of the connection speed, which will be calculated from these values.

The Scheduler PRIQ means that each packed is placed on separate queue, and the prioritized packets (games) will pass through first.

 

Continue reading ‘pfSense Traffic Shaper for prioritizing gaming traffic’ »

Realtime clock data from Alge-timing system

I made all of this stuff into the Finice 2019 ice climbing competition (www.finice2019.com).  The idea is to send the clock timing events into web, so we could use them in the results-office, or we could insert the clock into the video stream during the competition. There’s always some delay in the video stream, so we need a way to add custom delay into the clock. The data is good, but we have to remember to add some delay so the clock and video will be on sync. It would look stupid if the climber get to the top, and the clock has already stopped a few seconds ago.

Here’s a short video about how all of it works:

Continue reading ‘Realtime clock data from Alge-timing system’ »

Configuring SyntaxHighlighter plugin to StripBrs

I had way too much trouble with the new version of the SyntaxHighlighter Evolved plugin. The default configuration page is missing the option to StripBrs. A quick and dirty solution was to write a plugin to configure the other plugin.

The SyntaxHighlighter configuration is easy. The plugin is running on JavaScript, so all we have to do is to

SyntaxHighlighter.config.stripBrs = true;
SyntaxHighlighter.all();

To get there I wrote a simple plugin that add the new js after WordPress js scripts. Here’s how it’s done:

function add_js_config() {
    wp_register_script( 'syntaxhighlighter_config',
                       plugins_url('syntaxhighlightstripbrs.js',__FILE__),
                       array('jquery','syntaxhighlighter'),
                       '1.0',
                       true);
    wp_enqueue_script('syntaxhighlighter_config');
}
add_action( 'wp_enqueue_scripts', 'add_js_config' );

The plugin can be found from github: https://github.com/Summeli/SyntaxHighlight-StripBrs

Updated my pfSense for LAN-parties

Update to my previous post https://www.summeli.com/?p=11214

I added a new WAN port for my pfSensebox. Now we can have a mobile 4G connection shared into LAN from all three Finnish networks (DNA, Telia, Elisa). This is pretty rad.