<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Midas van Oene</title>
    <description>Personal site of Midas van Oene — Dutch web and software developer writing notes on Linux, self-hosting, web development, DevOps, and side projects.</description>
    <link>https://midasvo.nl/</link>
    <atom:link href="https://midasvo.nl/feed.xml" rel="self" type="application/rss+xml"/>
    <pubDate>Thu, 23 Apr 2026 20:07:14 +0000</pubDate>
    <lastBuildDate>Thu, 23 Apr 2026 20:07:14 +0000</lastBuildDate>
    <generator>Jekyll v3.10.0</generator>
    
      <item>
        <title>Two player IDs in an if statement</title>
        <description>&lt;p&gt;Somewhere in &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;src/lib/scoring/engine.ts&lt;/code&gt; of my Big Five personality quiz that matches fans to NEC Nijmegen players, line 58 has an &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;if&lt;/code&gt; block with two player IDs in it, multiplying their match score by &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;0.92&lt;/code&gt;. After weeks of per-player biographic research and three deep-research reports, that’s how I stopped Bryan Linssen and Dirk Proper from winning 14% of matches each.&lt;/p&gt;

&lt;div class=&quot;language-js highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;k&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;player&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;id&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;===&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;71&lt;/span&gt; &lt;span class=&quot;cm&quot;&gt;/* Dirk Proper */&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;||&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;player&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;id&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;===&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;30&lt;/span&gt; &lt;span class=&quot;cm&quot;&gt;/* Bryan Linssen */&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
  &lt;span class=&quot;nx&quot;&gt;score&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;*=&lt;/span&gt; &lt;span class=&quot;mf&quot;&gt;0.92&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;c1&quot;&gt;// 8% penalty&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;This is &lt;a href=&quot;https://nec.quest&quot;&gt;nec.quest&lt;/a&gt;.&lt;/p&gt;

&lt;h2 id=&quot;the-setup&quot;&gt;The setup&lt;/h2&gt;

&lt;p&gt;NEC in the cup final, two weeks out. I’m a supporter, I’m a dev, the itch is real. Scope locked in an afternoon: a Big Five personality quiz that matches you to one of the 27 players in the squad. Dutch, English, Japanese. Ship before Sunday or don’t bother. Relevance drops to zero at the final whistle.&lt;/p&gt;

&lt;h2 id=&quot;the-research-was-thorough-the-category-error-was-still-there&quot;&gt;The research was thorough. The category error was still there.&lt;/h2&gt;

&lt;p&gt;I didn’t meet any of these guys. Nobody was letting me interview 27 footballers two weeks out from De Kuip. So Claude and Gemini deep research ran per-player biographic passes across Dutch newspapers, international press, Wikipedia, FotMob, WhoScored, Transfermarkt. &lt;a href=&quot;#&quot;&gt;The reports are published alongside this post&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Three examples.&lt;/p&gt;

&lt;p&gt;Thomas Ouwejan, left-back, 29. On the pitch: high work rate, 0.41 assists per 90 from overlapping runs. Off the pitch: he and his girlfriend hand-renovated the upper floor of an old butcher’s shop in Westbeemster. Stripped six layers of wallpaper himself. There’s the Conscientiousness anchor. The Workhorse.&lt;/p&gt;

&lt;p&gt;Dirk Proper, midfielder, 24. 167cm, 63kg, 81.7% pass accuracy. Active psychology student at Radboud, and the club reschedules his gym sessions around exams. Openness and Conscientiousness in one person.&lt;/p&gt;

&lt;p&gt;Tjaronn Chery, 37, captain. His father left when he was three and never came back. His brother is his professional agent. He talks openly about being the father figure in the dressing room he never had at home. The Patriarch.&lt;/p&gt;

&lt;p&gt;Research is real and deep. Here’s the thing: none of it fixes the fundamental mismatch. Big Five is a self-report instrument, built to measure how &lt;em&gt;you&lt;/em&gt; describe yourself. I’m feeding it third-party biographic inference about &lt;em&gt;them&lt;/em&gt;. No amount of newspaper reading bridges that gap. Still absurd. Just earned absurdity now.&lt;/p&gt;

&lt;h2 id=&quot;turning-biographies-into-magic-numbers&quot;&gt;Turning biographies into magic numbers&lt;/h2&gt;

&lt;p&gt;Research gives you anchors. It doesn’t give you a number between 0 and 100.&lt;/p&gt;

&lt;p&gt;Ouwejan renovating a house, how high is his Conscientiousness? 75? 85? 92? No ground truth. Bryan Linssen sabotaging opposing goalkeeper interviews by lowering the mic stand: high Extraversion, or low Agreeableness through mischief? Pick your frame, get different numbers.&lt;/p&gt;

&lt;p&gt;Reasonable mappings, I’d say. Accurate, I wouldn’t.&lt;/p&gt;

&lt;h2 id=&quot;the-scoring-engine-is-85-lines-of-literals&quot;&gt;The scoring engine is 85 lines of literals&lt;/h2&gt;

&lt;div class=&quot;language-js highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;kd&quot;&gt;const&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;weight&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;Math&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;pow&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;extremityRaw&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;/&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;50&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;*&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;3&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;c1&quot;&gt;// ...&lt;/span&gt;
&lt;span class=&quot;k&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;Math&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;pow&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;similarity&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;3&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;As math, the weight function is:&lt;/p&gt;

\[W = 1 + 3 \left( \frac{E_{raw}}{50} \right)^2\]

&lt;p&gt;And the similarity:&lt;/p&gt;

\[S = (1 - d_{norm})^3\]

&lt;p&gt;Per-trait weighted squared distance, where players sitting at the extremes of a trait (close to 0 or 100) get up to 4× weight. Normalize, invert, cube it. Combine with trigger keyword overlap at 75/25. That’s the whole engine. Every weight is a bare literal. The &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;1&lt;/code&gt;, the &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;3&lt;/code&gt;, the &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;50&lt;/code&gt;, the cubing. No config, no admin panel, no A/B.&lt;/p&gt;

&lt;p&gt;For a two-week fan project, a real weighting framework is overkill. A tuning constant is a hypothesis. Ship, measure, tune.&lt;/p&gt;

&lt;h2 id=&quot;100k-monte-carlo-runs-and-the-linssen-problem&quot;&gt;100k Monte Carlo runs and the Linssen problem&lt;/h2&gt;

&lt;p&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;scripts/analyze.ts&lt;/code&gt; sweeps 100 → 1M runs and classifies players as “never matched”, “&amp;lt;1%”, or “&amp;gt;10%”. First pass: Linssen and Proper eating 14% each. Both sit near the median on nearly every trait, so everyone is vaguely close to them.&lt;/p&gt;

&lt;p&gt;The right fix is a data-driven averageness metric: distance from the mean profile, penalize proportionally. The honest fix at midnight was &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;if (player.id === 71 || player.id === 30) score *= 0.92&lt;/code&gt;. Two names in an if.&lt;/p&gt;

&lt;p&gt;Here’s the one I’d argue against myself on. The calibration scripts reimplement the minigame scoring math instead of importing from the engine. They’ve drifted. &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;analyze.ts&lt;/code&gt; uses &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;+ (score - 0.5) * 30&lt;/code&gt;. The real code uses &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;pushVector(C, (score - 0.5) * 1.5)&lt;/code&gt;. Different model. My calibration runs are against a version of the app that stopped existing two commits in. Real bug, not a cute tradeoff. One module from day one would’ve prevented it.&lt;/p&gt;

&lt;h2 id=&quot;it-had-to-run-on-a-toaster&quot;&gt;It had to run on a toaster&lt;/h2&gt;

&lt;p&gt;SvelteKit with &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;adapter-static&lt;/code&gt;, &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;ssr = false&lt;/code&gt;, &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;prerender = true&lt;/code&gt;. nginx:alpine in Docker, Oracle OCI always-free VPS, Cloudflare in front caching everything except the Umami endpoint. 27 prerendered result pages for OG tags, hydrate client-side from there. Self-hosted Forgejo Actions pushes the image on every commit to &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;main&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;Shareable tactics URLs: formation index and player IDs joined by dots. No base64, no lz-string, no server state.&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;?t=0-1.4.3.14.11.6.23.25.30.10.18
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;33 characters of querystring. The full lineup a user shares is in the link itself, which means Cloudflare can cache it like any other URL. Zero DB rows.&lt;/p&gt;

&lt;p&gt;If your app has no real server state, don’t build a backend. My origin barely noticed the launch because the CDN served nearly everything. There’s a comment above &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;/_app/immutable/&lt;/code&gt; in my &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;nginx.conf&lt;/code&gt; telling future-me never to fall back to &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;index.html&lt;/code&gt; on a miss: &lt;em&gt;“If the file is missing the build is stale. Return 404 so Cloudflare doesn’t poison the JS URL with an HTML response.”&lt;/em&gt; Someone got burned. That someone was me.&lt;/p&gt;

&lt;h2 id=&quot;adding-japanese-for-a-single-striker&quot;&gt;Adding Japanese for a single striker&lt;/h2&gt;

&lt;p&gt;620 translation keys per locale, compiled into 625 Paraglide message modules. NL, EN, JA.&lt;/p&gt;

&lt;p&gt;I didn’t plan Japanese. It happened because of Koki Ogawa, NEC’s Japanese striker. There’s a small J-league-tracking audience that follows him, and the research had surfaced real color: the Japanese trio at the club hire a chef from Amsterdam to cook for them, Ogawa once almost bought weed ice cream for his daughter because he didn’t recognize the smell. Adding Japanese meant those players got their own language in their own quiz. Mid-size Eredivisie club, 27 players, two weeks, three languages, one Japanese striker. Doing it anyway is the joke.&lt;/p&gt;

&lt;p&gt;The tell that Japanese is second-class in my own codebase: the helper script &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;add_new_strings.cjs&lt;/code&gt; hardcodes Dutch and English only. Every new Japanese string gets added by hand afterward. I never generalized it. Shipping beat elegance.&lt;/p&gt;

&lt;h2 id=&quot;what-id-do-differently&quot;&gt;What I’d do differently&lt;/h2&gt;

&lt;p&gt;The date &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;🏆 19 april — NEC vs AZ — KNVB Bekerfinale — De Kuip&lt;/code&gt; is hardcoded into a Svelte component. It ships forever until I edit the file. Should’ve been a config value with a &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;now &amp;gt; finalDate&lt;/code&gt; guard.&lt;/p&gt;

&lt;p&gt;The calibration scripts should import from the engine, not reimplement it.&lt;/p&gt;

&lt;p&gt;The 2200ms “calculating your result” spinner is pure theater. The match is deterministic the moment the screen mounts. The setTimeout is the only reason anyone feels like something is happening. I’d keep the drama. I’d just admit it. If your result is ready in 4ms, nobody believes you tried.&lt;/p&gt;

&lt;p&gt;Zero tests. 113 commits. Fine for a two-week ship. Not fine for anything that stays alive, and this one is still live.&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://nec.quest&quot;&gt;nec.quest&lt;/a&gt;. Take the quiz.&lt;/p&gt;
</description>
        <pubDate>Thu, 23 Apr 2026 10:00:00 +0000</pubDate>
        <link>https://midasvo.nl/blog/nec-quest</link>
        <guid isPermaLink="true">https://midasvo.nl/blog/nec-quest</guid>
        
        
        <category>blog</category>
        
        <category>featured</category>
        
      </item>
    
      <item>
        <title>Git cheat sheet - most used commands</title>
        <description>&lt;h1 id=&quot;git-cheat-sheet&quot;&gt;Git Cheat sheet&lt;/h1&gt;

&lt;p&gt;** Still a work in progress :-) **&lt;/p&gt;

&lt;ul id=&quot;markdown-toc&quot;&gt;
  &lt;li&gt;&lt;a href=&quot;#git-cheat-sheet&quot; id=&quot;markdown-toc-git-cheat-sheet&quot;&gt;Git Cheat sheet&lt;/a&gt;    &lt;ul&gt;
      &lt;li&gt;&lt;a href=&quot;#customization&quot; id=&quot;markdown-toc-customization&quot;&gt;Customization&lt;/a&gt;&lt;/li&gt;
      &lt;li&gt;&lt;a href=&quot;#starter-commands&quot; id=&quot;markdown-toc-starter-commands&quot;&gt;Starter commands&lt;/a&gt;        &lt;ul&gt;
          &lt;li&gt;&lt;a href=&quot;#adding-an-existing-remote-to-an-existing-project-directory&quot; id=&quot;markdown-toc-adding-an-existing-remote-to-an-existing-project-directory&quot;&gt;Adding an existing remote to an existing project directory&lt;/a&gt;&lt;/li&gt;
        &lt;/ul&gt;
      &lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
&lt;/ul&gt;

&lt;h2 id=&quot;customization&quot;&gt;Customization&lt;/h2&gt;
&lt;div class=&quot;inputbinder&quot;&gt;
  &lt;span&gt;Git repository: &lt;/span&gt;
  &lt;input type=&quot;text&quot; id=&quot;gitrepo&quot; name=&quot;gitrepo&quot; value=&quot;repo&quot; /&gt;
&lt;/div&gt;

&lt;div class=&quot;inputbinder&quot;&gt;
  &lt;span&gt;Git username: &lt;/span&gt;
  &lt;input type=&quot;text&quot; id=&quot;gitusername&quot; name=&quot;gitusername&quot; value=&quot;username&quot; /&gt;
&lt;/div&gt;

&lt;p&gt;I did add the option to inputbind your Git password, but if you do not feel comfortable inputting passwords into this site I recommend copying the command into a text editor and adding it there. You can also use Github’s GUI to retrieve the SSH URL, how to do this is shown later.&lt;/p&gt;

&lt;div class=&quot;inputbinder&quot;&gt;
  &lt;span&gt;Git password: &lt;/span&gt;
  &lt;input type=&quot;text&quot; id=&quot;gitpassword&quot; name=&quot;gitpassword&quot; value=&quot;password&quot; /&gt;
&lt;/div&gt;

&lt;h2 id=&quot;starter-commands&quot;&gt;Starter commands&lt;/h2&gt;

&lt;h3 id=&quot;adding-an-existing-remote-to-an-existing-project-directory&quot;&gt;Adding an existing remote to an existing project directory&lt;/h3&gt;

&lt;p&gt;Initialize a git repository in the directory&lt;/p&gt;

&lt;p&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;git init&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Add the git repository as origin&lt;/p&gt;

&lt;p&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;git remote add origin #@GITREPO@#&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Set branch to master&lt;/p&gt;

&lt;p&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;git config branch.master.remote origin&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;git config branch.master.merge refs/heads/master&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Pull any files from repository (like README or LICENSE files)&lt;/p&gt;

&lt;p&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;git pull&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Create a push-helper&lt;/p&gt;

&lt;p&gt;Instead of using the inputbinder on this site to generate the Git URL you can also use the GUI to find the SSH url. Go to your repositories’ page and click on SSH.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/assets/images/git-cheatsheet/use-ssh.png&quot; alt=&quot;alt text&quot; title=&quot;Logo Title Text 1&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Copy the link to your clipboard&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/assets/images/git-cheatsheet/copy-to-clipboard.png&quot; alt=&quot;alt text&quot; title=&quot;Logo Title Text 1&quot; /&gt;&lt;/p&gt;

&lt;p&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;sudo nano push.sh&lt;/code&gt;&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;  #!/bin/bash
  echo &quot;Pushing changes...&quot;
  git push https://#@GITUSERNAME@#:#@GITPASSWORD@#@github.com/#@GITUSERNAME@#/#@GITREPO@#.git
  echo &quot;Script finished&quot;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Add the &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;push.sh&lt;/code&gt; file to your &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;.gitignore&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;echo &apos;/push.sh&apos; &amp;gt;&amp;gt; .gitignore&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Make the &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;push.sh&lt;/code&gt; file executable&lt;/p&gt;

&lt;p&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;sudo chmod +x push.sh&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Add changed files to staging&lt;/p&gt;

&lt;p&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;git add .&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Commit staged files&lt;/p&gt;

&lt;p&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;git commit -m &quot;Initial commit&quot;&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Use &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;push.sh&lt;/code&gt; to push changes&lt;/p&gt;

&lt;p&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;. push.sh&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;If you would like to use aliases for running the push command, check out my blog post about bash &lt;a href=&quot;Useful-bash&quot;&gt;here&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;However great using the Git command line is, there are plenty of other ways to work with the Git protocol. The, in my opinion, two greatest candidates are &lt;a href=&quot;&quot;&gt;GitKraken&lt;/a&gt; (cross-platform) and &lt;a href=&quot;&quot;&gt;SourceTree&lt;/a&gt; (Windows).&lt;/p&gt;

&lt;script src=&quot;https://rawgit.com/midasvo/inputbinderjs/master/inputBinder.js&quot;&gt;&lt;/script&gt;

&lt;script type=&quot;text/javascript&quot;&gt;
  new inputBinder(&quot;gitrepo&quot;, [&apos;div&apos;, &apos;p&apos;, &apos;code&apos;, &apos;span&apos;], &quot;#@GITREPO@#&quot;, &quot;dynamic-text-template-pathname-gitrepo&quot;);
  new inputBinder(&quot;gitusername&quot;, [&apos;div&apos;, &apos;p&apos;, &apos;code&apos;, &apos;span&apos;], &quot;#@GITUSERNAME@#&quot;, &quot;dynamic-text-template-pathname-gitusername&quot;);
  new inputBinder(&quot;gitpassword&quot;, [&apos;div&apos;, &apos;p&apos;, &apos;code&apos;, &apos;span&apos;], &quot;#@GITPASSWORD@#&quot;, &quot;dynamic-text-template-pathname-gitpassword&quot;);
&lt;/script&gt;

</description>
        <pubDate>Fri, 26 Jan 2018 00:00:00 +0000</pubDate>
        <link>https://midasvo.nl/blog/Git</link>
        <guid isPermaLink="true">https://midasvo.nl/blog/Git</guid>
        
        
        <category>jekyll</category>
        
        <category>github</category>
        
        <category>git</category>
        
        <category>featured</category>
        
      </item>
    
      <item>
        <title>App: HTML / CSS / JS starters boilerplates</title>
        <description>&lt;p&gt;I often start side projects and every time I have to google standard HTML5 boilerplates. I might as well put some extra time into it and expose a few of my custom boilerplates.&lt;/p&gt;

&lt;p&gt;For now I have added three types: basic, styled, and interactive (html/html+css/html+css+js). Everyone is free to use the app and request pulls.&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;
    &lt;p&gt;App website: &lt;a href=&quot;https://starters.apps.midasvo.nl&quot;&gt;starters.apps.midasvo.nl&lt;/a&gt;&lt;/p&gt;
  &lt;/li&gt;
  &lt;li&gt;
    &lt;p&gt;Github repository: &lt;a href=&quot;https://github.com/midasvo/starters&quot;&gt;midasvo/starters&lt;/a&gt;&lt;/p&gt;
  &lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Enjoy! :)&lt;/p&gt;
</description>
        <pubDate>Sat, 20 Jan 2018 01:39:50 +0000</pubDate>
        <link>https://midasvo.nl/blog/HTML-CSS-JS-starters-boilerplates</link>
        <guid isPermaLink="true">https://midasvo.nl/blog/HTML-CSS-JS-starters-boilerplates</guid>
        
        
        <category>jekyll</category>
        
        <category>blog</category>
        
        <category>featured</category>
        
      </item>
    
      <item>
        <title>Bash</title>
        <description>&lt;h1 id=&quot;useful-bash&quot;&gt;Useful Bash!&lt;/h1&gt;

&lt;ul id=&quot;markdown-toc&quot;&gt;
  &lt;li&gt;&lt;a href=&quot;#useful-bash&quot; id=&quot;markdown-toc-useful-bash&quot;&gt;Useful Bash!&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;#requirements&quot; id=&quot;markdown-toc-requirements&quot;&gt;Requirements&lt;/a&gt;    &lt;ul&gt;
      &lt;li&gt;&lt;a href=&quot;#customization&quot; id=&quot;markdown-toc-customization&quot;&gt;Customization&lt;/a&gt;&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;#basics&quot; id=&quot;markdown-toc-basics&quot;&gt;Basics&lt;/a&gt;    &lt;ul&gt;
      &lt;li&gt;&lt;a href=&quot;#how-to-move-around&quot; id=&quot;markdown-toc-how-to-move-around&quot;&gt;How to move around&lt;/a&gt;&lt;/li&gt;
      &lt;li&gt;&lt;a href=&quot;#how-to-get-your-current-directory&quot; id=&quot;markdown-toc-how-to-get-your-current-directory&quot;&gt;How to get your current directory&lt;/a&gt;&lt;/li&gt;
      &lt;li&gt;&lt;a href=&quot;#creating-a-script&quot; id=&quot;markdown-toc-creating-a-script&quot;&gt;Creating a script&lt;/a&gt;&lt;/li&gt;
      &lt;li&gt;&lt;a href=&quot;#the-script&quot; id=&quot;markdown-toc-the-script&quot;&gt;The script&lt;/a&gt;&lt;/li&gt;
      &lt;li&gt;&lt;a href=&quot;#making-the-script-executable&quot; id=&quot;markdown-toc-making-the-script-executable&quot;&gt;Making the script executable&lt;/a&gt;&lt;/li&gt;
      &lt;li&gt;&lt;a href=&quot;#running-the-script&quot; id=&quot;markdown-toc-running-the-script&quot;&gt;Running the script&lt;/a&gt;&lt;/li&gt;
      &lt;li&gt;&lt;a href=&quot;#making-aliases&quot; id=&quot;markdown-toc-making-aliases&quot;&gt;Making aliases&lt;/a&gt;&lt;/li&gt;
      &lt;li&gt;&lt;a href=&quot;#using-the-alias&quot; id=&quot;markdown-toc-using-the-alias&quot;&gt;Using the alias&lt;/a&gt;&lt;/li&gt;
      &lt;li&gt;&lt;a href=&quot;#using-command-line-parameters&quot; id=&quot;markdown-toc-using-command-line-parameters&quot;&gt;Using command-line parameters&lt;/a&gt;&lt;/li&gt;
      &lt;li&gt;&lt;a href=&quot;#making-the-alias-permanent&quot; id=&quot;markdown-toc-making-the-alias-permanent&quot;&gt;Making the alias permanent&lt;/a&gt;&lt;/li&gt;
      &lt;li&gt;&lt;a href=&quot;#a-better-way&quot; id=&quot;markdown-toc-a-better-way&quot;&gt;A better way!&lt;/a&gt;&lt;/li&gt;
      &lt;li&gt;&lt;a href=&quot;#executing-aliases-periodically&quot; id=&quot;markdown-toc-executing-aliases-periodically&quot;&gt;Executing aliases periodically&lt;/a&gt;        &lt;ul&gt;
          &lt;li&gt;&lt;a href=&quot;#cron&quot; id=&quot;markdown-toc-cron&quot;&gt;CRON&lt;/a&gt;&lt;/li&gt;
        &lt;/ul&gt;
      &lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
&lt;/ul&gt;

&lt;h1 id=&quot;requirements&quot;&gt;Requirements&lt;/h1&gt;

&lt;p&gt;The tutorials assumes:&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;Ubuntu 16.04&lt;/li&gt;
&lt;/ul&gt;

&lt;h4 id=&quot;customization&quot;&gt;Customization&lt;/h4&gt;

&lt;div class=&quot;custom-params&quot;&gt;
&lt;div&gt;
	&lt;div&gt;Pathname: &lt;/div&gt;&lt;input type=&quot;text&quot; name=&quot;pathname&quot; id=&quot;pathname&quot; value=&quot;path/toscript&quot; /&gt;
&lt;/div&gt;
&lt;div&gt;
	&lt;div&gt;Alias: &lt;/div&gt;&lt;input type=&quot;text&quot; name=&quot;alias&quot; id=&quot;alias&quot; value=&quot;myalias&quot; /&gt;
&lt;/div&gt;
&lt;div&gt;
	&lt;div&gt;Scriptname: &lt;/div&gt;&lt;input type=&quot;text&quot; name=&quot;script&quot; id=&quot;script&quot; value=&quot;myscript.sh&quot; /&gt;
&lt;/div&gt;
&lt;/div&gt;

&lt;h1 id=&quot;basics&quot;&gt;Basics&lt;/h1&gt;

&lt;p&gt;This chapter shows you the basics of how to move around a terminal, how to create a bash script, how to run a bash script, and how to alias the bash script (first temporarily, and then permanently).&lt;/p&gt;

&lt;h4 id=&quot;how-to-move-around&quot;&gt;How to move around&lt;/h4&gt;

&lt;p&gt;Use &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;cd&lt;/code&gt; to get back to your root directory&lt;/p&gt;

&lt;p&gt;Use &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;cd ..&lt;/code&gt; to traverse one directory back&lt;/p&gt;

&lt;p&gt;Use &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;cd DIRECTORYNAME&lt;/code&gt; to enter that directory&lt;/p&gt;

&lt;p&gt;Use &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;ls&lt;/code&gt; or &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;ls -l&lt;/code&gt; to display the directory content&lt;/p&gt;

&lt;p&gt;Use &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;cd DIRECTORYNAME/SUBDIRECTORYNAME&lt;/code&gt; to traverse to a specific directory from the current working directory&lt;/p&gt;

&lt;p&gt;Use &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;cd /ROOTDIRECTORYNAME/DIRECTORYNAME/SUBDIRECTORYNAME&lt;/code&gt; to traverse to a specific directory from the root directory&lt;/p&gt;

&lt;h4 id=&quot;how-to-get-your-current-directory&quot;&gt;How to get your current directory&lt;/h4&gt;

&lt;p&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;pwd&lt;/code&gt;&lt;/p&gt;

&lt;h4 id=&quot;creating-a-script&quot;&gt;Creating a script&lt;/h4&gt;
&lt;p&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;sudo nano /#@PATHNAME@#/#@SCRIPT@#&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;After running the nano command we can start editing our script.&lt;/p&gt;

&lt;h4 id=&quot;the-script&quot;&gt;The script&lt;/h4&gt;

&lt;p&gt;A simple script to start with is outputting some text, let’s start by echoing ‘Hello World!’&lt;/p&gt;

&lt;p&gt;Before we get to that we need to fulfill a requirement of any bash script, the &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;#!/bin/bash&lt;/code&gt; at the start of the script.&lt;/p&gt;

&lt;ol&gt;
  &lt;li&gt;Add &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;#!/bin/bash&lt;/code&gt; to the top of the file.&lt;/li&gt;
  &lt;li&gt;Add &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;echo &quot;Hello World!&quot;&lt;/code&gt; to the second line.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Hit CTRL+X, Y, and ENTER to save the script.&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;/assets/scripts/UsefulBash/helloworld.sh&quot;&gt;Download the script here&lt;/a&gt;&lt;/p&gt;

&lt;h4 id=&quot;making-the-script-executable&quot;&gt;Making the script executable&lt;/h4&gt;

&lt;p&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;chmod +x /#@PATHNAME@#/#@SCRIPT@#&lt;/code&gt;&lt;/p&gt;

&lt;h4 id=&quot;running-the-script&quot;&gt;Running the script&lt;/h4&gt;

&lt;p&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;. /#@PATHNAME@#/#@SCRIPT@#&lt;/code&gt;&lt;/p&gt;

&lt;h4 id=&quot;making-aliases&quot;&gt;Making aliases&lt;/h4&gt;

&lt;p&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;alias #@ALIAS@#=&apos;. /#@PATHNAME@#/#@SCRIPT@#&apos;&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;The “.” marks the script for execution.&lt;/p&gt;

&lt;p&gt;By running that in the command line we create the ‘#@ALIAS@#’ alias which will execute the #@SCRIPT@# via its’ full path.&lt;/p&gt;

&lt;h4 id=&quot;using-the-alias&quot;&gt;Using the alias&lt;/h4&gt;
&lt;p&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;#@ALIAS@#&lt;/code&gt;&lt;/p&gt;

&lt;h4 id=&quot;using-command-line-parameters&quot;&gt;Using command-line parameters&lt;/h4&gt;

&lt;p&gt;User input typed after the script call can be accessed by the dollar sign, an example:&lt;/p&gt;

&lt;p&gt;We create the following script:&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;#!/bin/bash
echo &quot;The answer to the question of $2 is $1.&quot;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Which will output “The answer to the question life is 42.” if called as follows:&lt;/p&gt;

&lt;p&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;#@ALIAS@# 42 life&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;/assets/scripts/UsefulBash/dontpanic.sh&quot;&gt;Download the script here&lt;/a&gt;&lt;/p&gt;

&lt;h4 id=&quot;making-the-alias-permanent&quot;&gt;Making the alias permanent&lt;/h4&gt;

&lt;p&gt;Once you terminate your SSH session your alias is lost. The alias can be made permanent by altering the “&lt;a href=&quot;https://www.lifewire.com/bashrc-file-4101947&quot;&gt;bashrc&lt;/a&gt;” file.&lt;/p&gt;

&lt;p&gt;The file is located at &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;~/.bashrc&lt;/code&gt;, you can edit it using any text editor.&lt;/p&gt;

&lt;p&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;sudo nano ~/.bashrc&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://gist.githubusercontent.com/midasvo/f3f49c12681d5e8d2d9a636b756d8b8b/raw/93a33aa5f1893f46773483250214f8b8b496a270/.bashrc&quot;&gt;Here is a link to a default bashrc file as example&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;As you can see in the example aliases are defined on a new line, regardless the place.&lt;/p&gt;
&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;  # some more ls aliases
  alias ll=&apos;ls -alF&apos;
  alias la=&apos;ls -A&apos;
  alias l=&apos;ls -CF&apos;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;So if we want to make our alias persistent we need to add&lt;/p&gt;

&lt;p&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;alias #@ALIAS@#=&apos;. /#@PATHNAME@#/#@SCRIPT@#&apos;&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;anywhere in the file - as long as it is on a new line.&lt;/p&gt;

&lt;p&gt;After saving the file using CTRL+X Y ENTER we need to run our bashrc file&lt;/p&gt;

&lt;p&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;. ~/.bashrc&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Which finalizes our changes without having to terminate and reconnect our session.&lt;/p&gt;

&lt;h3 id=&quot;a-better-way&quot;&gt;A better way!&lt;/h3&gt;

&lt;p&gt;So now we have seen how to add the alias to the bashrc file, however it would be better to keep these aliases in a seperate file. Firstly because it is easier to edit, and secondly because it is awesome for portability. If you have certain aliases you use a lot, push the file to version control and keep access to it even on other systems.&lt;/p&gt;

&lt;p&gt;We need to uncomment or add the following code to reference our not-yet-created bash_aliases file.&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;  if [ -f ~/.bash_aliases ]; then
  . ~/.bash_aliases
  fi
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Which simply states that if the bash_aliases file is found, run the bash_aliases file - effectively including aliases created in the bash_aliases file.&lt;/p&gt;

&lt;p&gt;Create the bash_aliases file&lt;/p&gt;

&lt;p&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;sudo nano ~/.bash_aliases&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Copy the following code block (when in clipboard, rightclick on terminal editor window) and save the file (CTRL+X, Y, ENTER).&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;  # Bash alias definitions
  alias #@ALIAS@#=&apos;. /#@PATHNAME@#/#@SCRIPT@#&apos;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;After adding an alias we need to run the bashrc file.&lt;/p&gt;

&lt;p&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;. ~/.bashrc&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;From now on aliases defined in the bash_aliases file are permanent.&lt;/p&gt;

&lt;p&gt;A good alias to add secondly is the one for rerunning the bashrc file&lt;/p&gt;

&lt;p&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;sudo nano ~/.bash_aliases&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Add the following line:&lt;/p&gt;

&lt;p&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;alias updatealiases=&apos;. ~/.bashrc&apos;&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Save the file (CTRL+X, Y, ENTER).&lt;/p&gt;

&lt;p&gt;Use &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;. ~/.bashrc&lt;/code&gt; for the last time and you are ready to add more aliases.&lt;/p&gt;

&lt;p&gt;Now, when you add a new alias you only have to run the &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;updatealiases&lt;/code&gt; command.&lt;/p&gt;

&lt;h2 id=&quot;executing-aliases-periodically&quot;&gt;Executing aliases periodically&lt;/h2&gt;

&lt;p&gt;Sometimes you want a script to run at certain times, in this case we do not even have to reference the script - but simply use the alias.&lt;/p&gt;

&lt;h3 id=&quot;cron&quot;&gt;CRON&lt;/h3&gt;

&lt;p&gt;Start editing your cron configuration by running &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;crontab -e&lt;/code&gt;.&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;  The time and date fields are:

         field          allowed values
         -----          --------------
         minute         0-59
         hour           0-23
         day of month   1-31
         month          1-12 (or names, see below)
         day of week    0-7 (0 or 7 is Sunday, or use names)
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;An example cron command would be:&lt;/p&gt;

&lt;p&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;0 1 * * * . /#@PATHNAME@#/#@SCRIPT@#&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;(remember the &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;.&lt;/code&gt; is part of the command because it says &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;execute the script at the following path&lt;/code&gt;.)&lt;/p&gt;

&lt;p&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;&amp;lt;minute&amp;gt; &amp;lt;hour&amp;gt; &amp;lt;day_of_month&amp;gt; &amp;lt;month&amp;gt; &amp;lt;day_of_week&amp;gt; &amp;lt;command&amp;gt;&lt;/code&gt;&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;  0                                   |                minute
  1                                   |                hour
  *                                   |                any
  *                                   |                any
  *                                   |                any
  /#@PATHNAME@#/#@SCRIPT@#          |                command
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;This script runs on the 0th minute, every 1 hour, on any day, any month, and any day of the week. In other words, every hour, forever.&lt;/p&gt;

&lt;script src=&quot;https://rawgit.com/midasvo/inputbinderjs/master/inputBinder.js&quot;&gt;&lt;/script&gt;

&lt;script type=&quot;text/javascript&quot;&gt;
new inputBinder(&quot;pathname&quot;, [&apos;div&apos;, &apos;p&apos;], &quot;#@PATHNAME@#&quot;, &quot;dynamic-text-template-pathname&quot;);
new inputBinder(&quot;alias&quot;, [&apos;div&apos;, &apos;p&apos;], &quot;#@ALIAS@#&quot;, &quot;dynamic-text-template-alias&quot;);
new inputBinder(&quot;script&quot;, [&apos;div&apos;, &apos;p&apos;], &quot;#@SCRIPT@#&quot;, &quot;dynamic-text-template-script&quot;);
&lt;/script&gt;

</description>
        <pubDate>Sat, 28 Oct 2017 00:45:50 +0000</pubDate>
        <link>https://midasvo.nl/blog/Useful-bash</link>
        <guid isPermaLink="true">https://midasvo.nl/blog/Useful-bash</guid>
        
        
        <category>jekyll</category>
        
        <category>bash</category>
        
        <category>featured</category>
        
      </item>
    
      <item>
        <title>Setting up Letsencrypt on Ubuntu 16.04</title>
        <description>&lt;p&gt;&lt;em&gt;Updated: 19-01-2018 - bug prevents requesting cert, added webroot method which still works&lt;/em&gt;&lt;/p&gt;

&lt;h4 id=&quot;customization&quot;&gt;Customization&lt;/h4&gt;

&lt;p&gt;You can customize the guide by altering the desired website name in the text box below, the guide will use that instead of the example.&lt;/p&gt;

&lt;p&gt;&lt;span&gt;Website: &lt;/span&gt;&lt;input type=&quot;text&quot; id=&quot;websitename&quot; name=&quot;websitename&quot; value=&quot;website.tld&quot; /&gt;&lt;/p&gt;

&lt;h2 id=&quot;intro&quot;&gt;Intro&lt;/h2&gt;

&lt;p&gt;Easily setup HTTPS on your websites by using Letsencrypt with Apache2 on Ubuntu 16.04!&lt;/p&gt;

&lt;h1 id=&quot;quick-guide&quot;&gt;Quick-guide&lt;/h1&gt;

&lt;p&gt;Add the cerbot repository&lt;/p&gt;

&lt;p&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;sudo add-apt-repository ppa:certbot/certbot&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Update&lt;/p&gt;

&lt;p&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;sudo apt-get update&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Install certbot&lt;/p&gt;

&lt;p&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;sudo apt-get install python-certbot-apache -y&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;del&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;sudo certbot --apache -d #@WEBSITE@#&lt;/code&gt;&lt;/del&gt;&lt;/p&gt;

&lt;p&gt;^above command no longer functioning (19-01-2018), will be fixed in future.&lt;/p&gt;

&lt;p&gt;However, there is another way to do this: webroot. You point certbot at your sites folder&lt;/p&gt;

&lt;p&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;/var/www/#@WEBSITE@#&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;You will have to answer a couple of questions (like do you want to force https) and it will be done!&lt;/p&gt;

&lt;p&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;certbot --authenticator webroot  --installer apache -d #@WEBSITE@#&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Setup renewal&lt;/p&gt;

&lt;p&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;sudo crontab -e&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Add the following and save:&lt;/p&gt;

&lt;p&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;0 * * * * /usr/bin/certbot renew --quiet&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;This runs the ‘certbot renew –quit’ command every 0th minute, aka every hour. You can change the time &lt;a href=&quot;https://crontab.guru/every-1-hour&quot;&gt;here&lt;/a&gt;.&lt;/p&gt;

&lt;script src=&quot;https://rawgit.com/midasvo/inputbinderjs/master/inputBinder.js&quot;&gt;&lt;/script&gt;

&lt;script&gt;
var inputBinder = new inputBinder(&quot;websitename&quot;, [&apos;code&apos;], &quot;#@WEBSITE@#&quot;, &quot;dynamic-text-template&quot;);
&lt;/script&gt;

</description>
        <pubDate>Mon, 16 Oct 2017 01:39:50 +0000</pubDate>
        <link>https://midasvo.nl/blog/Setting-up-Letsencrypt-on-Ubuntu-16.04</link>
        <guid isPermaLink="true">https://midasvo.nl/blog/Setting-up-Letsencrypt-on-Ubuntu-16.04</guid>
        
        
        <category>jekyll</category>
        
        <category>apache2</category>
        
        <category>virtual</category>
        
        <category>hosts</category>
        
        <category>vh</category>
        
        <category>ubuntu</category>
        
        <category>16</category>
        
        <category>16.04</category>
        
        <category>letsencrypt</category>
        
      </item>
    
      <item>
        <title>Apache2 Virtual Hosts with Ubuntu 16.04</title>
        <description>&lt;p&gt;&lt;em&gt;Work in progress (update/expansion) since 20-01-2018&lt;/em&gt;&lt;/p&gt;

&lt;h2 id=&quot;intro&quot;&gt;Intro&lt;/h2&gt;

&lt;p&gt;Before we can complete this:&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;&lt;a href=&quot;&quot;&gt;We need a domain name&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;&quot;&gt;We need to setup DNS&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;&quot;&gt;We need a server&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;&quot;&gt;We need to install Ubuntu 16.04&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;&quot;&gt;We need to SSH into the server&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;&quot;&gt;We need to make a user&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;We will first configure the server so we can create one Virtual Host directed at a DocumentRoot. After that you will find a small section with the commands to quickly create new Virtual Hosts knowing that the server is fully configured. However, the DocumentRoot method is not the only way to setup Virtual Hosts. Sometimes you have an application running on a specific port - think of Python and Node.js applications.&lt;/p&gt;

&lt;p&gt;You will find that when you play around a lot with these Virtual Hosts (maybe you have a ton of side-projects…) that there is a need to automate this process using scripting. I do recommend you do not skip ahead to that section but try to understand what you are doing. If you are new to Linux (server) administration make sure you get a good grasp of the commands and terminology that is used. I try to include in-depth sources, but that is still a work in progress.&lt;/p&gt;

&lt;p&gt;Do not worry about not understanding everything when you start out, you can practically copy paste through the steps and you will have a working Virtual Host.&lt;/p&gt;

&lt;p&gt;Lastly there is a reference to a different article on how to setup encryption (TLS/SSL) using LetsEncrypt.&lt;/p&gt;

&lt;h4 id=&quot;customization&quot;&gt;Customization&lt;/h4&gt;

&lt;p&gt;You can customize the guide by altering the desired website name in the text box below, the guide will use that instead of the example.&lt;/p&gt;

&lt;p&gt;&lt;span&gt;Website: &lt;/span&gt;&lt;input type=&quot;text&quot; id=&quot;websitename&quot; name=&quot;websitename&quot; value=&quot;website.tld&quot; /&gt;&lt;/p&gt;

&lt;h2 id=&quot;installation--configuration&quot;&gt;Installation &amp;amp; configuration&lt;/h2&gt;

&lt;p&gt;Update the repositories and install apache2 (some may prefer nginx, but this guide focuses on apache2 - beware there are definitive differences between the two).&lt;/p&gt;

&lt;p&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;sudo apt-get update&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;sudo apt-get install apache2 -y&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;It is common practice to place the DocumentRoot of apache2 website in the &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;/var/www/&lt;/code&gt; directory. Within that directory you create separate directories for the different Virtual Hosts you intend to create.&lt;/p&gt;

&lt;p&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;sudo mkdir -p /var/www/#@WEBSITE@#&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;We change the ownership and permissions using &lt;a href=&quot;https://linux.die.net/man/1/chown&quot;&gt;chown&lt;/a&gt; and &lt;a href=&quot;https://linux.die.net/man/1/chmod&quot;&gt;chmod&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;sudo chown -R $USER:$USER /var/www/#@WEBSITE@#&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;sudo chmod -R 755 /var/www&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Since this is our first website, we will add a simple &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;index.html&lt;/code&gt; file to our DocumentRoot.&lt;/p&gt;

&lt;p&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;sudo nano /var/www/#@WEBSITE@#/index.html&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;If you do not have &lt;a href=&quot;https://help.ubuntu.com/community/Nano&quot;&gt;nano&lt;/a&gt; you can install it using apt &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;sudo apt-get install nano&lt;/code&gt; but you can use any editor you like.&lt;/em&gt;&lt;/p&gt;

&lt;h5 id=&quot;indexhtml&quot;&gt;&lt;a href=&quot;/assets/scripts/VirtualHostsWithUbuntu1604/index.html&quot;&gt;index.html&lt;/a&gt;&lt;/h5&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&amp;lt;html&amp;gt;
  &amp;lt;body&amp;gt;
    &amp;lt;div&amp;gt;#@WEBSITE@#!&amp;lt;/div&amp;gt;
  &amp;lt;/body&amp;gt;
&amp;lt;/html&amp;gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;In order to activate apache2 sites we need to add a .conf file to the &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;sites-available&lt;/code&gt; directory. We can make a copy of the default .conf file and rename it using the following command.&lt;/p&gt;

&lt;p&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;sudo cp /etc/apache2/sites-available/000-default.conf /etc/apache2/sites-available/#@WEBSITE@#.conf&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Before we can activate the .conf file we need to amend some variables, open the file using nano.&lt;/p&gt;

&lt;p&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;sudo nano /etc/apache2/sites-available/#@WEBSITE@#.conf&lt;/code&gt;&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;    ServerAdmin admin@#@WEBSITE@#
    ServerName #@WEBSITE@#
    ServerAlias www.#@WEBSITE@#
    DocumentRoot /var/www/#@WEBSITE@#
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;The &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;ServerName&lt;/code&gt;, &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;ServerAlias&lt;/code&gt;, and &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;DocumentRoot&lt;/code&gt; variables are the most important. Apply changes and hit &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;CTRL+X&lt;/code&gt; enter &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Y&lt;/code&gt; and hit return. The file is saved and we can activate the site using &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;a2ensite&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;sudo a2ensite #@WEBSITE@#.conf&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Remove the default .conf using the &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;a2dissite&lt;/code&gt; command.&lt;/p&gt;

&lt;p&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;sudo a2dissite 000-default.conf&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Restart apache2 and the Virtual Host is running!&lt;/p&gt;

&lt;p&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;sudo systemctl restart apache2&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Browse to #@WEBSITE@# and lo and behold, we have a Virtual Host.&lt;/p&gt;

&lt;h2 id=&quot;quickly-adding-new-virtual-hosts&quot;&gt;Quickly adding new Virtual Hosts&lt;/h2&gt;

&lt;p&gt;We have now setup apache2 and added our first Virtual Host, the next one will be much easier!&lt;/p&gt;

&lt;p&gt;&lt;span&gt;Second website: &lt;/span&gt;&lt;input type=&quot;text&quot; id=&quot;websitename2&quot; name=&quot;websitename2&quot; value=&quot;website2.tld&quot; /&gt;&lt;/p&gt;

&lt;h3 id=&quot;generating-creation-scripts&quot;&gt;Generating creation scripts&lt;/h3&gt;

&lt;p&gt;If you have a bunch of Virtual Hosts to create, it would be much easier to generate the scripts. You can write these scripts yourself using bash, or you can use a small utility I have created. &lt;a href=&quot;https://apps.midasvo.nl/VHGenerator&quot;&gt;Click here to open the ‘VHGenerator’&lt;/a&gt;. I plan to create an article detailing the process, for now the &lt;a href=&quot;https://github.com/midasvo/VHGenerator&quot;&gt;Github repo&lt;/a&gt; will have to do.&lt;/p&gt;

&lt;h3 id=&quot;quick-commands&quot;&gt;Quick commands&lt;/h3&gt;

&lt;p&gt;Coming ASAP.&lt;/p&gt;
</description>
        <pubDate>Mon, 16 Oct 2017 01:39:50 +0000</pubDate>
        <link>https://midasvo.nl/blog/Apache2-Virtual-Hosts-with-Ubuntu-16.04</link>
        <guid isPermaLink="true">https://midasvo.nl/blog/Apache2-Virtual-Hosts-with-Ubuntu-16.04</guid>
        
        
        <category>jekyll</category>
        
        <category>apache2</category>
        
        <category>virtual</category>
        
        <category>hosts</category>
        
        <category>vh</category>
        
        <category>ubuntu</category>
        
        <category>16</category>
        
        <category>16.04</category>
        
      </item>
    
      <item>
        <title>AUTOCSV2SSIS</title>
        <description>&lt;h1 id=&quot;the-setting&quot;&gt;The setting&lt;/h1&gt;

&lt;p&gt;During the Minor Business Intelligence I worked for a company which has a number of testing machines with flat file logging enabled. These files are in CSV format.&lt;/p&gt;

&lt;h1 id=&quot;the-problem&quot;&gt;The problem&lt;/h1&gt;

&lt;p&gt;When the operator spots a problem on the realtime logging system an employee transfers the logfiles with a USB stick to the office environment. In the office environment (Excel) they create graphs to analyze the problem. This is a very costly procedure which our project group was tasked to remedy.&lt;/p&gt;

&lt;p&gt;We chose to use SSIS to load the data into a Data Vault and use Qlikview to create the analysis. Seems great right? However, there are still a couple of steps here that can get automated. This script tackles the problem of manually loading up the CSV files in SSIS.&lt;/p&gt;

&lt;h1 id=&quot;the-solution&quot;&gt;The solution&lt;/h1&gt;

&lt;p&gt;Because the files are dropped at undetermined times I created a script that monitors a directory for new files. The PowerShell script:&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;Registers an ObjectEvent (FileSystemWatcher)&lt;/li&gt;
  &lt;li&gt;User drops one or more CSV files into the directory&lt;/li&gt;
  &lt;li&gt;The FileSystemWatcher uses a timer to establish whether or not we have a record of all the added files. It does this by turning off the Timer at the start of the function and enabling it at the end. By this logic once the timer runs out we have a record of all the added files. Each ObjectEvent adds the name of the file to an Array.&lt;/li&gt;
  &lt;li&gt;When the Timer runs out, copy each file to the SSIS working directory and rename it to the name given in the SSIS package for the Flat File Source. This name is taken from the CSV file.&lt;/li&gt;
  &lt;li&gt;When all files are copied and renamed we call the SSIS package using DTEXEC&lt;/li&gt;
  &lt;li&gt;Check if SSIS package executed succesfully, relay this information to the user&lt;/li&gt;
  &lt;li&gt;Remove all files from the SSIS working directory&lt;/li&gt;
  &lt;li&gt;Clear the Array&lt;/li&gt;
  &lt;li&gt;Done. Waits for new files to be dropped into the monitoring folder&lt;/li&gt;
&lt;/ul&gt;

&lt;h1 id=&quot;the-code&quot;&gt;The code&lt;/h1&gt;

&lt;p&gt;The code might change before the article changes so keep up with the &lt;a href=&quot;https://github.com/midasvo/AUTOCSV2SSIS&quot;&gt;current version on Github&lt;/a&gt;. Or just download the &lt;a href=&quot;https://github.com/midasvo/AUTOCSV2SSIS/archive/master.zip&quot;&gt;zip&lt;/a&gt;.&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;$package = &quot;\path\to\Package.dtsx&quot;

$SSISWorkingDirectory = &quot;\path\to\SSISWorkingDirectory&quot;
$MonitoringDirectory = &apos;\path\to\MonitoringDirectory&apos;

$filter = &apos;*.*&apos;  # Wildcard filter                        
$fsw = New-Object IO.FileSystemWatcher $MonitoringDirectory, $filter -Property @{IncludeSubdirectories = $false;NotifyFilter = [IO.NotifyFilters]&apos;FileName, LastWrite&apos;} 

$timer = New-Object timers.timer
$timer.Interval = 5000

$global:files=@()

Write-Host &quot;Starting script&quot; -fore green

function Run-SSIS-Package {
    dtexec /f $package # Execute SSIS Package
    Write-Host $LASTEXITCODE
    if($LASTEXITCODE -eq 0) {
        Write-Host &apos;Executed SSIS package succesfully. Time for cleanup...&apos; -fore green

        Write-Host &apos;Removing files from SSIS Staging folder&apos; -fore green
        Remove-Item $SSISWorkingDirectory\*
        
        Write-Host &apos;Clearing files array&apos; -fore green
        $global:files = @()
    } else { # add error handling for the other error codes
        Write-Host &quot;Encountered an error (&apos;$LASTEXITCODE&apos;) while executing SSIS package.. &quot; -fore red
        Write-Host &apos;Removing files from SSIS Staging folder&apos;
        Remove-Item $SSISWorkingDirectory\*
        
        Write-Host &apos;Clearing files array&apos;
        $global:files = @()
    }
}

function Get-Machine-Name($logfilename) {

    Write-Host $MonitoringDirectory\$logfilename -foreground Green
    $data = Import-CSV $MonitoringDirectory\$logfilename -Delimiter &apos;;&apos;
    $machinename = $data[0].Machine # Assume a file is for one machine, so only need first element

    return $machinename
}

Register-ObjectEvent -InputObject $timer -EventName Elapsed -SourceIdentifier Timer.Output -Action {
    $timer.Enabled = $False
    foreach ($name in $global:files) {
        $machinename = Get-Machine-Name($name)
        Write-Host &apos;Machinename: &apos; $machinename #change to $extractedname for clarity
        Write-Host &apos;Copying &apos; $name &apos;to SSIS location and renaming&apos;
        Copy-Item $MonitoringDirectory\$name -Destination $SSISWorkingDirectory\$machinename&apos;.csv&apos;
    }
    Write-Host &apos;Start SSIS package now&apos; -fore green
    Run-SSIS-Package
}

Register-ObjectEvent $fsw Created -SourceIdentifier FileCreated -Action { 
    $timer.Enabled = $False

    $name = $Event.SourceEventArgs.Name # change to $filename for clarity
    $timeStamp = $Event.TimeGenerated 

    Write-Host &quot;Detected new file &apos;$name&apos; on $timeStamp&quot; -fore green 

    Write-Host &apos;File: &apos;$MonitoringDirectory\$name -foreground Green    
    
    $global:files+=$name
    $timer.Enabled = $True
} 
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

</description>
        <pubDate>Wed, 25 Nov 2015 12:39:50 +0000</pubDate>
        <link>https://midasvo.nl/blog/csv-to-ssis-with-powershell</link>
        <guid isPermaLink="true">https://midasvo.nl/blog/csv-to-ssis-with-powershell</guid>
        
        
        <category>jekyll</category>
        
        <category>tutorial</category>
        
        <category>portfolio</category>
        
      </item>
    
      <item>
        <title>A Practical Introduction to Git</title>
        <description>&lt;p&gt;&lt;strong&gt;So you have heard about Git, but you still need to start somewhere? Let’s do that together by building a simple portfolio website. We will be using the Ruby gem &lt;a href=&quot;http://jekyllrb.com/&quot;&gt;Jekyll&lt;/a&gt; which takes &lt;a href=&quot;https://help.github.com/articles/github-flavored-markdown/&quot;&gt;Markdown&lt;/a&gt; and generates the static HTML pages which can be hosted on &lt;a href=&quot;http://githubpages.com&quot;&gt;Github Pages&lt;/a&gt; for free.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;You can use whatever operating system you like but I’ll be noting the instructions down for the big 3: Ubuntu, OSX and Windows.&lt;/p&gt;

&lt;p&gt;If you and your computer are up for it and you don’t already run Linux or OSX, consider running a development machine with &lt;a href=&quot;https://www.virtualbox.org/&quot;&gt;VirtualBox&lt;/a&gt; and &lt;a href=&quot;http://www.ubuntu.com/download/desktop&quot;&gt;Ubuntu 14.04.2 LTS&lt;/a&gt; or dual-booting.&lt;/p&gt;

&lt;p&gt;If you want you can try out &lt;strong&gt;&lt;a href=&quot;https://github.com/madhur/PortableJekyll/wiki&quot;&gt;Portable Jekyll for Windows&lt;/a&gt;&lt;/strong&gt; which allegedly contains all the things you need to run it on Windows. &lt;a href=&quot;http://jekyll-windows.juthilo.com/&quot;&gt;Or check out this website for a Windows tutorial.&lt;/a&gt; After you’ve got Jekyll installed you can come back and join us for the Git part.&lt;/p&gt;

&lt;ul id=&quot;markdown-toc&quot;&gt;
  &lt;li&gt;&lt;a href=&quot;#installing-git&quot; id=&quot;markdown-toc-installing-git&quot;&gt;Installing Git&lt;/a&gt;    &lt;ul&gt;
      &lt;li&gt;&lt;a href=&quot;#ubuntu&quot; id=&quot;markdown-toc-ubuntu&quot;&gt;Ubuntu&lt;/a&gt;&lt;/li&gt;
      &lt;li&gt;&lt;a href=&quot;#osx&quot; id=&quot;markdown-toc-osx&quot;&gt;OSX&lt;/a&gt;&lt;/li&gt;
      &lt;li&gt;&lt;a href=&quot;#windows&quot; id=&quot;markdown-toc-windows&quot;&gt;Windows&lt;/a&gt;&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;#setting-up-git&quot; id=&quot;markdown-toc-setting-up-git&quot;&gt;Setting up Git&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;#installing-ruby&quot; id=&quot;markdown-toc-installing-ruby&quot;&gt;Installing Ruby&lt;/a&gt;    &lt;ul&gt;
      &lt;li&gt;&lt;a href=&quot;#ubuntu--osx&quot; id=&quot;markdown-toc-ubuntu--osx&quot;&gt;Ubuntu &amp;amp; OSX&lt;/a&gt;&lt;/li&gt;
      &lt;li&gt;&lt;a href=&quot;#windows-1&quot; id=&quot;markdown-toc-windows-1&quot;&gt;Windows&lt;/a&gt;&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;#installing-jekyll&quot; id=&quot;markdown-toc-installing-jekyll&quot;&gt;Installing Jekyll&lt;/a&gt;    &lt;ul&gt;
      &lt;li&gt;&lt;a href=&quot;#ubuntu--osx--windows&quot; id=&quot;markdown-toc-ubuntu--osx--windows&quot;&gt;Ubuntu &amp;amp; OSX &amp;amp; Windows&lt;/a&gt;&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;#whats-git-again&quot; id=&quot;markdown-toc-whats-git-again&quot;&gt;What’s Git again?&lt;/a&gt;    &lt;ul&gt;
      &lt;li&gt;&lt;a href=&quot;#video-a-quick-introduction-to-the-git-vcs&quot; id=&quot;markdown-toc-video-a-quick-introduction-to-the-git-vcs&quot;&gt;[Video] A Quick Introduction to the Git VCS&lt;/a&gt;&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;#github&quot; id=&quot;markdown-toc-github&quot;&gt;Github&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;#putting-jekyll-and-git-to-use&quot; id=&quot;markdown-toc-putting-jekyll-and-git-to-use&quot;&gt;Putting Jekyll and Git to use&lt;/a&gt;    &lt;ul&gt;
      &lt;li&gt;&lt;a href=&quot;#ubuntu-sidenote-nodejs&quot; id=&quot;markdown-toc-ubuntu-sidenote-nodejs&quot;&gt;Ubuntu sidenote (nodejs)&lt;/a&gt;&lt;/li&gt;
      &lt;li&gt;&lt;a href=&quot;#creating-the-website&quot; id=&quot;markdown-toc-creating-the-website&quot;&gt;Creating the website&lt;/a&gt;&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;#connect-github&quot; id=&quot;markdown-toc-connect-github&quot;&gt;Connect Github&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;#linking-a-domain&quot; id=&quot;markdown-toc-linking-a-domain&quot;&gt;Linking a Domain&lt;/a&gt;    &lt;ul&gt;
      &lt;li&gt;&lt;a href=&quot;#dns&quot; id=&quot;markdown-toc-dns&quot;&gt;DNS&lt;/a&gt;&lt;/li&gt;
      &lt;li&gt;&lt;a href=&quot;#cname-file&quot; id=&quot;markdown-toc-cname-file&quot;&gt;CNAME file&lt;/a&gt;&lt;/li&gt;
      &lt;li&gt;&lt;a href=&quot;#dns-propegation&quot; id=&quot;markdown-toc-dns-propegation&quot;&gt;DNS Propegation&lt;/a&gt;&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
&lt;/ul&gt;

&lt;h3 id=&quot;installing-git&quot;&gt;Installing Git&lt;/h3&gt;
&lt;p&gt;To install Git you can use the package manager or the website. For Debian derivatives that is apt, OSX uses &lt;a href=&quot;http://brew.sh/&quot;&gt;homebrew&lt;/a&gt;.&lt;/p&gt;

&lt;h4 id=&quot;ubuntu&quot;&gt;Ubuntu&lt;/h4&gt;
&lt;p&gt;Open the terminal and install git&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;sudo apt-get install git
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;h4 id=&quot;osx&quot;&gt;OSX&lt;/h4&gt;
&lt;p&gt;Open the terminal and install git&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;brew install git
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;h4 id=&quot;windows&quot;&gt;Windows&lt;/h4&gt;
&lt;p&gt;Download the installer from the &lt;a href=&quot;https://git-scm.com/download/windows&quot;&gt;git-scm website&lt;/a&gt;.&lt;/p&gt;

&lt;h3 id=&quot;setting-up-git&quot;&gt;Setting up Git&lt;/h3&gt;

&lt;p&gt;We will only need to setup Git on our machine once. Use the &lt;strong&gt;git config&lt;/strong&gt; command to set your name and email. These are the credentials that will be used to commit to github, make sure you use your primary Github email and correct name.&lt;/p&gt;

&lt;p&gt;Open either your terminal or &lt;a href=&quot;https://git-for-windows.github.io/&quot;&gt;Git Bash&lt;/a&gt; if you’re on Windows.&lt;/p&gt;

&lt;p&gt;user.name sets your name:&lt;/p&gt;

&lt;p&gt;git config –global user.name “Midas van Oene”&lt;/p&gt;

&lt;p&gt;user.email sets your email:&lt;/p&gt;

&lt;p&gt;git config –global user.email “Midas.van.Oene@gmail.com”&lt;/p&gt;

&lt;p&gt;And we’re all done here.&lt;/p&gt;

&lt;h2 id=&quot;installing-ruby&quot;&gt;Installing Ruby&lt;/h2&gt;
&lt;p&gt;Jekyll is a Ruby gem. If you don’t have Ruby yet, we will use the &lt;a href=&quot;https://rvm.io/&quot;&gt;&lt;strong&gt;R&lt;/strong&gt;uby &lt;strong&gt;V&lt;/strong&gt;ersion &lt;strong&gt;M&lt;/strong&gt;anager&lt;/a&gt; to install it.&lt;/p&gt;

&lt;h4 id=&quot;ubuntu--osx&quot;&gt;Ubuntu &amp;amp; OSX&lt;/h4&gt;

&lt;p&gt;Use the terminal to add the key&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;gpg --keyserver hkp://keys.gnupg.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;If you do not have cURL&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;sudo apt-get install curl
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Paste this in the terminal to install RVM with ruby&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;\curl -sSL https://get.rvm.io | bash -s stable 
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;The RVM installer will remind you that you need to run the &lt;em&gt;source&lt;/em&gt; command before being able to use RVM and Ruby. Replace &lt;em&gt;username&lt;/em&gt; with your own. It’s best to just copy the outputted text.&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;source /home/username/.rvm/scripts/rvm
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;After that command worked its magic, check if RVM is installed.&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;rvm --version
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;And you will get back something like:&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&quot;rvm 1.26.11 (master) by Wayne E. Seguin &amp;lt;wayneeseguin@gmail.com&amp;gt;, Michal Papis &amp;lt;mpapis@gmail.com&amp;gt; [https://rvm.io/]&quot;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Install the latest:&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;rvm install ruby --latest
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;h4 id=&quot;windows-1&quot;&gt;Windows&lt;/h4&gt;
&lt;p&gt;Windows users can install the &lt;a href=&quot;http://rubyinstaller.org/&quot;&gt;RubyInstaller&lt;/a&gt; and the &lt;a href=&quot;http://dl.bintray.com/oneclick/rubyinstaller/DevKit-tdm-32-4.5.2-20111229-1559-sfx.exe&quot;&gt;Ruby DevKit&lt;/a&gt; from &lt;a href=&quot;http://rubyinstaller.org/downloads/&quot;&gt;this page&lt;/a&gt; in order to use gems.&lt;/p&gt;

&lt;h2 id=&quot;installing-jekyll&quot;&gt;Installing Jekyll&lt;/h2&gt;
&lt;p&gt;To install Jekyll we will use a nifty Ruby feature, the RubyGems. &lt;a href=&quot;http://stackoverflow.com/questions/5233924/what-is-a-ruby-gem&quot;&gt;RubyGems is a package manager for the Ruby programming language that provides a standard format for distributing Ruby programs and libraries (in a self-contained format called a “gem”)&lt;/a&gt;. You can find more about gems &lt;a href=&quot;http://guides.rubygems.org/what-is-a-gem/&quot;&gt;here&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;I added the ‘- -no-rdoc’ flag because of an install error, if you really want it you can install it manually later. It’s not required.&lt;/p&gt;

&lt;h4 id=&quot;ubuntu--osx--windows&quot;&gt;Ubuntu &amp;amp; OSX &amp;amp; Windows&lt;/h4&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;gem install jekyll --no-rdoc
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;h2 id=&quot;whats-git-again&quot;&gt;What’s Git again?&lt;/h2&gt;

&lt;p&gt;Git is a &lt;strong&gt;V&lt;/strong&gt;ersion &lt;strong&gt;C&lt;/strong&gt;ontrol &lt;strong&gt;S&lt;/strong&gt;ystem, &lt;a href=&quot;https://git-scm.com/book/en/v2/Getting-Started-About-Version-Control&quot;&gt;version control is a system that records changes to a file or set of files over time so that you can recall specific versions later&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Git is &lt;strong&gt;not&lt;/strong&gt; Github. Git is the &lt;a href=&quot;https://git-scm.com/book/ch4-1.html&quot;&gt;protocol&lt;/a&gt; and Github is one of many sites where you can host remotely. The reason we’re going with Github and not something like &lt;a href=&quot;http://bitbucket.org&quot;&gt;Bitbucket&lt;/a&gt; is the free hosting of Jekyll pages.&lt;/p&gt;

&lt;p&gt;Here are a couple commands to give you an idea and reference. We will run through them as well when we upload the Jekyll site to our github. Oh and &lt;a href=&quot;https://www.atlassian.com/dms/wac/images/landing/git/atlassian_git_cheatsheet.pdf&quot;&gt;Here’s a handy Git cheatsheet from Atlassian&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Add&lt;/strong&gt; all the files in the current directory to the staging area.&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;git add .
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;&lt;strong&gt;Commit&lt;/strong&gt; the added files and add a message&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;git commit -m &quot;your message&quot;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;&lt;strong&gt;Push&lt;/strong&gt; the commited changes to your remote repositories’ &lt;em&gt;master&lt;/em&gt; branch&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;git push -u origin master
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;h5 id=&quot;video-a-quick-introduction-to-the-git-vcs&quot;&gt;&lt;a href=&quot;https://www.youtube.com/watch?v=OqmSzXDrJBk&quot;&gt;[Video] A Quick Introduction to the Git VCS&lt;/a&gt;&lt;/h5&gt;

&lt;h2 id=&quot;github&quot;&gt;Github&lt;/h2&gt;
&lt;p&gt;If you do not have a github account yet, go to &lt;a href=&quot;https://github.com/join&quot;&gt;github.com&lt;/a&gt; and create one.&lt;/p&gt;

&lt;p&gt;Make sure you pay attention to your &lt;strong&gt;organization name&lt;/strong&gt; as that will also be your sites name. For example, my organization name is &lt;strong&gt;MidasVO&lt;/strong&gt; thus my github URL is &lt;a href=&quot;https://github.com/midasvo&quot;&gt;https://github.com/&lt;strong&gt;MidasVO&lt;/strong&gt;&lt;/a&gt; and my eventual website name will be &lt;a href=&quot;http://midasvo.github.io&quot;&gt;&lt;strong&gt;MidasVO&lt;/strong&gt;.github.io&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Go to the top right corner and click on create a new repository: &lt;img src=&quot;/assets/images/intro_to_git/create_new_repo.png&quot; alt=&quot;Creating a new repository&quot; /&gt;&lt;/p&gt;

&lt;p&gt;The name of your repository has to be &lt;em&gt;username&lt;/em&gt;.github.io otherwise &lt;strong&gt;it will not work&lt;/strong&gt;. You can also add a .gitignore file with the name Jekyll. The files and folders marked in the .gitignore file will not be uploaded to your repository. I’ll be using my own name and repository in the examples, you will simply need to substitute my name with your own to make those commands work. I think that will be more clear than constantly saying &lt;em&gt;username&lt;/em&gt;.github.io.&lt;/p&gt;

&lt;p&gt;Here’s an example:&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/assets/images/intro_to_git/create_new_repo_owner.png&quot; alt=&quot;Creating a new repository config&quot; /&gt;&lt;/p&gt;

&lt;p&gt;The default .gitignore for Jekyll consists of&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;_site/
.sass-cache/
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Both are folders we don’t need. &lt;strong&gt;_site/&lt;/strong&gt; carries the generated content, which Github Pages will regenerate somewhere else so it’s just clutter. And &lt;strong&gt;&lt;a href=&quot;http://stackoverflow.com/questions/14934800/why-does-sass-cache-folder-get-created&quot;&gt;.sass-cache&lt;/a&gt;&lt;/strong&gt; is not useful either.&lt;/p&gt;

&lt;h2 id=&quot;putting-jekyll-and-git-to-use&quot;&gt;Putting Jekyll and Git to use&lt;/h2&gt;

&lt;p&gt;We’ve arrived at the fun part; open a terminal in the folder where your projects reside. If you want the same setup as me:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;C&lt;/strong&gt;hange &lt;strong&gt;D&lt;/strong&gt;irectory to your home folder&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;cd ~ 
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Create a Projects folder&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;sudo mkdir Projects
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;&lt;strong&gt;C&lt;/strong&gt;hange &lt;strong&gt;D&lt;/strong&gt;irectory to Projects folder&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;cd Projects
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;h4 id=&quot;ubuntu-sidenote-nodejs&quot;&gt;Ubuntu sidenote (nodejs)&lt;/h4&gt;

&lt;p&gt;In order for Jekyll to run &lt;a href=&quot;http://stackoverflow.com/questions/9202324/execjs-could-not-find-a-javascript-runtime-but-execjs-and-therubyracer-are-in&quot;&gt;you need nodejs&lt;/a&gt;. Update the package list and install&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;sudo apt-get update &amp;amp;&amp;amp; sudo apt-get install nodejs -y
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;h3 id=&quot;creating-the-website&quot;&gt;Creating the website&lt;/h3&gt;

&lt;p&gt;To create a new Jekyll website all we need to do is enter (in your &lt;em&gt;Projects&lt;/em&gt; folder)&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;jekyll new username.github.io
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;If this succeeded we can run the website locally to edit and test. Go into your website directory&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;cd username.github.io
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;And start the Jekyll server&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;jekyll s
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Open your browser and browse to &lt;a href=&quot;http://localhost:4000&quot;&gt;localhost:4000&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Welcome to Jekyll!&lt;/p&gt;

&lt;p&gt;What you are seeing now when you browse to your locahosts’ port 4000 is the default installation of Jekyll. A short explanation is in order.&lt;/p&gt;

&lt;p&gt;The following are all the files generated by Jekyll:&lt;/p&gt;

&lt;p&gt;about.md&lt;/p&gt;

&lt;p&gt;_config.yml&lt;/p&gt;

&lt;p&gt;css&lt;/p&gt;

&lt;p&gt;feed.xml&lt;/p&gt;

&lt;p&gt;_includes&lt;/p&gt;

&lt;p&gt;index.html&lt;/p&gt;

&lt;p&gt;_layouts&lt;/p&gt;

&lt;p&gt;_posts&lt;/p&gt;

&lt;p&gt;_sass&lt;/p&gt;

&lt;h2 id=&quot;connect-github&quot;&gt;Connect Github&lt;/h2&gt;

&lt;p&gt;Configure our Name and Email&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;git config --global user.name &quot;Midas van Oene&quot;
git config --global user.email &quot;midas.van.oene@gmail.com&quot;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;To be able to use our Git repository we need to clone it and work from the cloned directory&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;cd Projects

git clone https://github.com/username/username.github.io.git
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;h2 id=&quot;linking-a-domain&quot;&gt;Linking a Domain&lt;/h2&gt;

&lt;p&gt;If visit go to &lt;a href=&quot;http://midasvo.github.io&quot;&gt;midasvo.github.io&lt;/a&gt; you’ll be immediately redirected to &lt;a href=&quot;http://midasvo.nl&quot;&gt;midasvo.nl&lt;/a&gt;. This is a result of the &lt;strong&gt;CNAME&lt;/strong&gt; file and DNS records. If you have registered a Top-Level Domain Name or created a subdomain, you will need to create 2 A records and a CNAME record. You can do this in your registrars control panel.&lt;/p&gt;

&lt;h4 id=&quot;dns&quot;&gt;DNS&lt;/h4&gt;

&lt;p&gt;I’m registered at &lt;a href=&quot;http://transip.nl&quot;&gt;transip&lt;/a&gt; and my DNS records look like this:&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/assets/images/intro_to_git/dns_records_example.png&quot; alt=&quot;DNS records&quot; /&gt;&lt;/p&gt;

&lt;p&gt;The two A records are a &lt;a href=&quot;https://help.github.com/articles/tips-for-configuring-an-a-record-with-your-dns-provider/&quot;&gt;requisite&lt;/a&gt; of Github Pages in order for them to route to your page properly. The CNAME record should be &lt;strong&gt;username.github.io.&lt;/strong&gt; for everthing to work. Don’t forget naming them &lt;strong&gt;@&lt;/strong&gt; and &lt;strong&gt;www&lt;/strong&gt;. The &lt;strong&gt;TXT&lt;/strong&gt; record is for Google analytics.&lt;/p&gt;

&lt;h4 id=&quot;cname-file&quot;&gt;CNAME file&lt;/h4&gt;

&lt;p&gt;Create a new file in the root of your Jekyll application named &lt;strong&gt;CNAME&lt;/strong&gt;. The only content this file has is the domain name associated with your page. You can only have &lt;strong&gt;one&lt;/strong&gt; domain name in this file. Use the version without the &lt;strong&gt;www.&lt;/strong&gt; because we’ve already dealt with that on the registrars part.&lt;/p&gt;

&lt;p&gt;In my case my &lt;em&gt;/midasvo.github.io/CNAME&lt;/em&gt; file contains this:&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;midasvo.nl
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Add the file to your repository&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;git add .	
git commit -m &quot;Added CNAME file&quot;
git push -u origin master
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;h4 id=&quot;dns-propegation&quot;&gt;DNS Propegation&lt;/h4&gt;

&lt;p&gt;It is going to take a while before visiting your domain will show the correct page. This is because only every so many hours the world’s &lt;a href=&quot;http://www.webopedia.com/TERM/D/DNS.html&quot;&gt;DNS servers&lt;/a&gt; get updated with the new listings.&lt;/p&gt;

&lt;p&gt;Basically, when you go to http://midasvo.nl your web-browser asks your DNS server where to find midasvo.nl. The DNS server will respond with the correct IP address and your browser will be able to download the website and display it.&lt;/p&gt;

&lt;p&gt;It can take up to 24 hours to for the DNS server to propegate fully.&lt;/p&gt;
</description>
        <pubDate>Sun, 28 Jun 2015 01:39:50 +0000</pubDate>
        <link>https://midasvo.nl/blog/introduction-to-git-jekyll-with-github-pages</link>
        <guid isPermaLink="true">https://midasvo.nl/blog/introduction-to-git-jekyll-with-github-pages</guid>
        
        
        <category>jekyll</category>
        
        <category>blog</category>
        
        <category>tutorial</category>
        
      </item>
    
      <item>
        <title>HUSACCT</title>
        <description>&lt;p&gt;I worked on HUSACCT with a group during an 8 week project in the semester Object Oriented Software Engineering. HUSACCT is a Software Architecture Checking Tool, which in short, analyzes source code and compares it to the intended architecture.&lt;/p&gt;

&lt;p&gt;Since the application was already very far in development we were given the task of implementing 2 design patterns (MVC, BlackBoard) plus the possibility of adding more patterns and altering existing ones.&lt;/p&gt;

&lt;p&gt;The code was developed via Stash on a school server, I do not have the code available.&lt;/p&gt;

&lt;p&gt;o	Java, Spring Roo, Glassfish
o	Research into SOAP
o	Functional design and technical design documents
o	Version control
o	UML (class, sequence, domain)&lt;/p&gt;
</description>
        <pubDate>Sun, 28 Jun 2015 01:39:50 +0000</pubDate>
        <link>https://midasvo.nl/blog/husacct</link>
        <guid isPermaLink="true">https://midasvo.nl/blog/husacct</guid>
        
        
        <category>jekyll</category>
        
        <category>education</category>
        
      </item>
    
      <item>
        <title>Test App</title>
        <description>&lt;p&gt;Type: I worked on this project individually during the CRIA course.&lt;/p&gt;

&lt;h2 id=&quot;description&quot;&gt;Description&lt;/h2&gt;

&lt;p&gt;I created a Single Page Application with the MEAN stack with the purpose of testing RESTful API’s. I used the &lt;a href=&quot;https://github.com/meanjs/mean&quot;&gt;mean.js&lt;/a&gt; framework to kickstart my project because I the vertical structure is very intuitive. There are still plenty of things missing and I intend to remedy them when I have the time to do so.&lt;/p&gt;

&lt;p&gt;The app is based on the popular Chrome extension Postman, with the major difference being scenarios.&lt;/p&gt;

&lt;p&gt;A request is a HTTP ‘GET’ or ‘POST’ request to a URL with optional parameters. What you get back is the Status Code, headers, and the response.&lt;/p&gt;

&lt;p&gt;A test is an assertion coupled with a request. Say for instance you want to check if the URL returns the ‘OK’ Status Code the assertion will be ‘statusCode===200’.&lt;/p&gt;

&lt;p&gt;A scenario is a list of tests that have to be run consecutively, optionally with the output of the first test being the input for the next request and so on.&lt;/p&gt;

&lt;h2 id=&quot;how&quot;&gt;How&lt;/h2&gt;

&lt;p&gt;The core of the application is making requests and handling the response. For the purpose I used the &lt;a href=&quot;https://github.com/kriskowal/q&quot;&gt;q&lt;/a&gt; promise library and &lt;a href=&quot;https://github.com/request/request&quot;&gt;request&lt;/a&gt;. There are still some remnants in the code from when I tried to do requests with plain JS, but I found the request library to be much smoother to work with.&lt;/p&gt;

&lt;h4 id=&quot;creating-a-request&quot;&gt;Creating a request&lt;/h4&gt;

&lt;p&gt;&lt;img src=&quot;/assets/images/testapp/1-testapp_create_new_request.png&quot; alt=&quot;Create a request&quot; /&gt;&lt;/p&gt;

&lt;h4 id=&quot;creating-a-test&quot;&gt;Creating a test&lt;/h4&gt;

&lt;p&gt;&lt;img src=&quot;/assets/images/testapp/2-testapp_create_new_test.png&quot; alt=&quot;Create a test&quot; /&gt;&lt;/p&gt;

&lt;h4 id=&quot;creating-a-scenario&quot;&gt;Creating a scenario&lt;/h4&gt;

&lt;p&gt;&lt;img src=&quot;/assets/images/testapp/3-testapp_create_new_scenario.png&quot; alt=&quot;Create a scenario&quot; /&gt;&lt;/p&gt;

&lt;h4 id=&quot;executing-a-request&quot;&gt;Executing a request&lt;/h4&gt;

&lt;p&gt;&lt;img src=&quot;/assets/images/testapp/5-testapp_do_request.png&quot; alt=&quot;Execute a request&quot; /&gt;&lt;/p&gt;

&lt;h4 id=&quot;executing-a-test&quot;&gt;Executing a test&lt;/h4&gt;

&lt;p&gt;&lt;img src=&quot;/assets/images/testapp/6-testapp_do_test.png&quot; alt=&quot;Execute a test&quot; /&gt;&lt;/p&gt;

&lt;h4 id=&quot;exxecuting-a-scenario&quot;&gt;Exxecuting a scenario&lt;/h4&gt;

&lt;p&gt;&lt;img src=&quot;/assets/images/testapp/7-testapp_do_scenario.png&quot; alt=&quot;Execute a scenario&quot; /&gt;&lt;/p&gt;
</description>
        <pubDate>Mon, 01 Jun 2015 01:39:50 +0000</pubDate>
        <link>https://midasvo.nl/blog/testapp</link>
        <guid isPermaLink="true">https://midasvo.nl/blog/testapp</guid>
        
        
        <category>jekyll</category>
        
        <category>education</category>
        
      </item>
    
  </channel>
</rss>
