Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
FROM ruby:3.4

# Set the working directory
WORKDIR /site

# Copy the site files
COPY blog /site

# Install site dependencies
RUN bundle install

# Build the site
RUN bundle exec jekyll build

# Copy the built site to a separate directory
RUN mkdir /output && cp -r _site/* /output/

# Expose Jekyll default port
EXPOSE 4000

# Serve the site
CMD ["bundle", "exec", "jekyll", "serve", "--host", "0.0.0.0", "--watch", "--drafts"]
74 changes: 0 additions & 74 deletions Gemfile.lock

This file was deleted.

8 changes: 0 additions & 8 deletions _posts/2025-2-2-blah.markdown

This file was deleted.

File renamed without changes.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
I" {"title" => "🌲 johncsimon.github.io 🐦", "author" => "Abhinav Saxena", "url" => "http://0.0.0.0:4000", "description" => "got some downtime so how's about we starts ourselves a blog ...", "favicon" => "./logo.png", "remote_theme" => "abhinavs/moonwalk", "theme_config" => {"appearance" => "dark", "back_home_text" => "home..", "date_format" => "%Y-%m-%d", "show_description" => true, "show_navbar" => true, "show_footer" => true, "show_projects" => true, "show_old_projects" => true, "show_misc_list" => false}, "sass" => {"style" => :compressed}, "source" => "/site", "destination" => "/site/_site", "collections_dir" => "", "cache_dir" => ".jekyll-cache", "plugins_dir" => "_plugins", "layouts_dir" => "_layouts", "data_dir" => "_data", "includes_dir" => "_includes", "collections" => {"posts" => {"output" => true, "permalink" => "/:categories/:year/:month/:day/:title:output_ext"}}, "safe" => false, "include" => [".htaccess"], "exclude" => [".sass-cache", ".jekyll-cache", "gemfiles", "Gemfile", "Gemfile.lock", "node_modules", "vendor/bundle/", "vendor/cache/", "vendor/gems/", "vendor/ruby/"], "keep_files" => [".git", ".svn"], "encoding" => "utf-8", "markdown_ext" => "markdown,mkdown,mkdn,mkd,md", "strict_front_matter" => false, "show_drafts" => true, "limit_posts" => 0, "future" => false, "unpublished" => false, "whitelist" => [], "plugins" => ["jekyll-feed"], "markdown" => "kramdown", "highlighter" => "rouge", "lsi" => false, "excerpt_separator" => "\n\n", "incremental" => false, "detach" => false, "port" => "4000", "host" => "0.0.0.0", "baseurl" => nil, "show_dir_listing" => false, "permalink" => "date", "paginate_path" => "/page:num", "timezone" => nil, "quiet" => false, "verbose" => false, "defaults" => [], "liquid" => {"error_mode" => "warn", "strict_filters" => false, "strict_variables" => false}, "kramdown" => {"auto_ids" => true, "toc_levels" => [1, 2, 3, 4, 5, 6], "entity_output" => "as_char", "smart_quotes" => "lsquo,rsquo,ldquo,rdquo", "input" => "GFM", "hard_wrap" => false, "guess_lang" => true, "footnote_nr" => 1, "show_warnings" => false, "syntax_highlighter" => "rouge", "syntax_highlighter_opts" => {default_lang: "plaintext", guess_lang: true}, "coderay" => {}}, "github_username" => "johncsimon", "theme" => "moonwalk", "watch" => true, "livereload_port" => 35729, "serving" => true}:ET
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
I"K<p>I’m currently reading a contemporary history of Steve Jobs’s time with the creation and unraveling of NeXT Computer - <a href="https://www.goodreads.com/book/show/226316.Steve_Jobs_the_NeXT_Big_Thing">Steve Jobs and the NeXT Big Thing</a>.
<img src="jobscover.png" alt="Steve Jobs and the NeXT Big Thing" width="250" /></p>
:ET
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
I"N<p>got some downtime so how’s about we starts ourselves a blog …</p>
:ET
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
I"�<p>I’m a software dev with Go, Javascript and C#. I’m writing this blog to better at writing and to document my explorations.</p>
:ET
Original file line number Diff line number Diff line change
@@ -0,0 +1,222 @@
I"b.<p>I like to play around with lots of different programming languages, but install too many and they pollute your working environment, so it’s better to have them installed as a user instead of root.
Here’s a way to get several of them installed into your unix user directory.
If things go wrong, or you get bored you can easily <code class="language-plaintext highlighter-rouge">rm -rf</code> the installation.</p>

<h1 id="initial-install">Initial Install</h1>
<p>Let’s get ourselves a minimal debian environment. I’m using docker here, but you can use a native install, or a VM, or Windows Services for Linux with the ubuntu install.</p>
<div class="language-shell highlighter-rouge"><div class="highlight"><pre class="highlight"><code>john@BigBox:~/git/JohnCSimon.github.io<span class="nv">$ </span> <span class="nb">sudo </span>docker run <span class="nt">-ti</span> debian /bin/bash
Unable to find image <span class="s1">'debian:latest'</span> locally
latest: Pulling from library/debian
cd8eada9c7bb: Pull <span class="nb">complete
</span>Digest: sha256:58a80e0b6aa4d960ee2a5452b0230c406c47ed30a66555ba753c8e1710a434f5
Status: Downloaded newer image <span class="k">for </span>debian:latest
root@6d933dddbbcd:/#
</code></pre></div></div>
<p>Just to satisfy my OCD let’s get the latest updates.</p>

<p><code class="language-plaintext highlighter-rouge">apt update &amp;&amp; apt upgrade -y</code></p>

<p><code class="language-plaintext highlighter-rouge">apt install gnupg2 curl procps -y</code>
Installs gpg2, curl and ps</p>

<h1 id="ruby">ruby</h1>
<p><code class="language-plaintext highlighter-rouge">gpg2 --keyserver hkp://pool.sks-keyservers.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3 7D2BAF1CF37B13E2069D6956105BD0E739499BDB</code></p>

<p><code class="language-plaintext highlighter-rouge">\curl -sSL https://get.rvm.io | bash -s stable</code></p>

<p>To start using RVM you need to run <code class="language-plaintext highlighter-rouge">source /etc/profile.d/rvm.sh</code> or re-login to re-load <code class="language-plaintext highlighter-rouge">~/.profile</code></p>

<p>From here you can run - <code class="language-plaintext highlighter-rouge">rvm list known</code> and you’ll see a list of ruby flavors and individual versions.</p>

<div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="c"># MRI Rubies</span>
<span class="o">[</span>ruby-]1.8.6[-p420]
<span class="o">[</span>ruby-]1.8.7[-head] <span class="c"># security released on head</span>
<span class="o">[</span>ruby-]1.9.1[-p431]
<span class="o">[</span>ruby-]1.9.2[-p330]
<span class="o">[</span>ruby-]1.9.3[-p551]
<span class="o">[</span>ruby-]2.0.0[-p648]
<span class="o">[</span>ruby-]2.1[.10]
<span class="o">[</span>ruby-]2.2[.10]
<span class="o">[</span>ruby-]2.3[.8]
<span class="o">[</span>ruby-]2.4[.5]
<span class="o">[</span>ruby-]2.5[.3]
<span class="o">[</span>ruby-]2.6[.0]
</code></pre></div></div>

<p>MRI Ruby is the reference version of Ruby so let’s install the latest version.</p>

<p><code class="language-plaintext highlighter-rouge">rvm install ruby-2.6.0</code></p>

<p>I’m running debian and rvm might ask for your root password to install some prerequsites from apt before compiling a new version.</p>

<p>Congrats, you now have a ruby install</p>

<div class="language-shell highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nv">$ </span>ruby <span class="nt">-v</span>
ruby 2.6.0p0 <span class="o">(</span>2018-12-25 revision 66547<span class="o">)</span> <span class="o">[</span>x86_64-linux]
</code></pre></div></div>

<p>from here you can now do whatever since I’m blogging this using jekyll</p>

<p><code class="language-plaintext highlighter-rouge">gem install bundler jekyll</code></p>

<h1 id="go">go</h1>
<p>Go is a language that releases new versions on a regular basis.
There’s a similar tool to rvm called gvm. It’s a “go version manager” available from here <code class="language-plaintext highlighter-rouge">https://github.com/moovweb/gvm</code> that’ll let you install multiple versions and set $GOPATH and $GOROOT.</p>

<p>as a regular user:</p>
<div class="language-shell highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nv">$ </span>bash &lt; &lt;<span class="o">(</span>curl <span class="nt">-s</span> <span class="nt">-S</span> <span class="nt">-L</span> https://raw.githubusercontent.com/moovweb/gvm/master/binscripts/gvm-installer<span class="o">)</span>
Cloning from https://github.com/moovweb/gvm.git to /root/.gvm
No existing Go versions detected
Installed GVM v1.0.22

Please restart your terminal session or to get started right away run
<span class="sb">`</span><span class="nb">source</span> /root/.gvm/scripts/gvm<span class="sb">`</span>
</code></pre></div></div>

<p>you should be able to run and see</p>
<div class="language-shell highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nv">$ </span>gvm version
Go Version Manager v1.0.22 installed at /home/john/.gvm
</code></pre></div></div>

<p>Run <code class="language-plaintext highlighter-rouge">gvm listall</code>
which will give you a list of all the available versions of go.</p>

<div class="language-shell highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nv">$gvm</span> listall

gvm gos <span class="o">(</span>available<span class="o">)</span>

go1
go1.0.1
...
go1.11rc1
go1.11rc2
go1.11.1
go1.11.2
go1.11.3
go1.11.4
go1.12beta1
go1.12beta2
</code></pre></div></div>
<p>of which there are entirely too many.</p>

<p>From here, we can install go as our user via binary here:</p>

<p><code class="language-plaintext highlighter-rouge">gvm install go1.4 -B</code></p>

<p>try it out</p>
<div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nv">$ </span>go version
go version go1.4 linux/amd64
</code></pre></div></div>
<p>We can see it gets installed here:</p>
<div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nv">$ </span><span class="nb">echo</span> <span class="nv">$GOROOT</span>
/home/john/.gvm/gos/go1.4
</code></pre></div></div>

<p>From the gvm link earlier, in order to compile a go build environment for versions 1.5 on we require another go build environment.
Go compiles itself! Neat huh?</p>

<p>As of now the latest version is go1.11.4</p>
<div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nv">$ </span><span class="nb">export </span><span class="nv">GOROOT_BOOTSTRAP</span><span class="o">=</span><span class="nv">$GOROOT</span>
<span class="nv">$ </span>gvm <span class="nb">install </span>go1.11.4
</code></pre></div></div>

<div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nv">$ </span>go version
go version go1.4 linux/amd64
</code></pre></div></div>
<p>you can run
<code class="language-plaintext highlighter-rouge">gvm use - select a go version to use (--default to set permanently)</code></p>

<div class="language-shell highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nv">$ </span>gvm use go1.11.4 <span class="nt">--default</span>
Now using version go1.11.4
<span class="nv">$ </span>go version
go version go1.11.4 linux/amd64
<span class="nv">$ </span><span class="nb">echo</span> <span class="nv">$GOROOT</span>
/home/john/.gvm/gos/go1.11.4
<span class="nv">$ </span><span class="nb">echo</span> <span class="nv">$GOPATH</span>
/home/john/.gvm/pkgsets/go1.11.4/global
<span class="nv">$ </span><span class="nb">ls</span> /home/john/.gvm/gos/go1.11.4
AUTHORS CONTRIBUTING.md CONTRIBUTORS LICENSE PATENTS README.md VERSION api bin doc favicon.ico lib manifest misc pkg robots.txt src <span class="nb">test
ls</span> <span class="nv">$GOPATH</span>
overlay pkg src
</code></pre></div></div>

<p>Be sure to set –default so you keep the same version when you relaunch the shell, so that whatever you install stays where you expect it.</p>

<h1 id="node-js">node js</h1>
<p>node.js, the server side javascript framework</p>

<p>nvm is Node Version Manager. Install it like this:
<code class="language-plaintext highlighter-rouge">curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.34.0/install.sh | bash</code></p>

<p>Since there are major revisions to the javascript language between node 4, 6, 8 I’ve found I’ve had to switch more often between these versions according to project than I did with other languages.</p>

<p>You can run <code class="language-plaintext highlighter-rouge">nvm ls-remote</code> and get a list of all the node versions available</p>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>$ nvm
Example:
nvm install 8.0.0 Install a specific version number
nvm use 8.0 Use the latest available 8.0.x release
nvm run 6.10.3 app.js Run app.js using node 6.10.3
nvm exec 4.8.3 node app.js Run `node app.js` with the PATH pointing to node 4.8.3
nvm alias default 8.1.0 Set default node version on a shell
nvm alias default node Always default to the latest available node version on a shell
</code></pre></div></div>

<p>so if you run</p>

<div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nv">$ </span>nvm <span class="nb">install </span>10
Downloading and installing node v10.15.0...
Downloading https://nodejs.org/dist/v10.15.0/node-v10.15.0-linux-x64.tar.gz...
<span class="c">######################################################################## 100.0%</span>
Computing checksum with <span class="nb">sha256sum
</span>Checksums matched!
Now using node v10.15.0 <span class="o">(</span>npm v6.4.1<span class="o">)</span>
Creating default <span class="nb">alias</span>: default -&gt; 10 <span class="o">(</span>-&gt; v10.15.0<span class="o">)</span>

<span class="nv">$ </span>whereis node
node: /home/john/.nvm/versions/node/v10.15.0/bin/node
</code></pre></div></div>

<p>and you can set it to be the default so the setting persists between sessions</p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>nvm alias default 10
</code></pre></div></div>

<p>So now you can run:</p>
<div class="language-shell highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nv">$ </span>node <span class="nt">-v</span>
v10.15.0
<span class="nv">$ </span>npm <span class="nt">-v</span>
6.4.1
</code></pre></div></div>

<h1 id="rust">rust</h1>
<p>Rust is another language that sees regular updates. You’ll just have to check which is the version for the 2015 and 2018 edition.</p>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>curl https://sh.rustup.rs -sSf | sh



Current installation options:

default host triple: x86_64-unknown-linux-gnu
default toolchain: stable
modify PATH variable: yes

1) Proceed with installation (default)
2) Customize installation
3) Cancel installation
&gt;

select 1

To configure your current shell run source $HOME/.cargo/env
</code></pre></div></div>

<p>add <code class="language-plaintext highlighter-rouge">$HOME/.cargo/env</code> to your path in .bashrc</p>

<div class="language-shell highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nv">$ </span>whereis cargo
cargo: /home/john/.cargo/bin/cargo
<span class="nv">$ </span>whereis rustc
cargo: /home/john/.cargo/bin/rustc
</code></pre></div></div>

:ET
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
I"�<p>I like to play around with lots of different programming languages, but install too many and they pollute your working environment, so it’s better to have them installed as a user instead of root.
Here’s a way to get several of them installed into your unix user directory.
If things go wrong, or you get bored you can easily <code class="language-plaintext highlighter-rouge">rm -rf</code> the installation.</p>
:ET
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
I"H<p>Recently I had to write a file uploader for AWS S3 in node.</p>
:ET
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
I"*<p>Poor Man’s Audiobook Reader</p>
:ET
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
I"H<p>Recently I had to write a file uploader for AWS S3 in node.</p>
:ET
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
I"7<p>Gradual Typing With Javascript and VS Code</p>
:ET
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
I"K<p>I’m currently reading a contemporary history of Steve Jobs’s time with the creation and unraveling of NeXT Computer - <a href="https://www.goodreads.com/book/show/226316.Steve_Jobs_the_NeXT_Big_Thing">Steve Jobs and the NeXT Big Thing</a>.
<img src="jobscover.png" alt="Steve Jobs and the NeXT Big Thing" width="250" /></p>
:ET
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
I"+<p>🌲 johncsimon.github.io 🐦</p>
:ET
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
I"
:EF
Loading