mirror of
https://github.com/aljazceru/cryptoanarchywiki.github.io.git
synced 2025-12-17 05:04:21 +01:00
128 lines
9.0 KiB
HTML
128 lines
9.0 KiB
HTML
<!DOCTYPE html>
|
||
<html>
|
||
<head>
|
||
<meta charset="utf-8">
|
||
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
|
||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||
|
||
<link rel="shortcut icon" href="/img/favicon.ico" />
|
||
<title> Welcome to Simply Grey </title>
|
||
|
||
<!-- syntax highlighting CSS -->
|
||
<link rel="stylesheet" href="/css/syntax.css">
|
||
|
||
<!-- Bootstrap core CSS -->
|
||
<link href="/css/bootstrap.min.css" rel="stylesheet">
|
||
|
||
<!-- Fonts -->
|
||
<link href="//fonts.googleapis.com/css?family=Roboto+Condensed:400,300italic,300,400italic,700&subset=latin,latin-ext" rel="stylesheet" type="text/css">
|
||
|
||
<!-- Custom CSS -->
|
||
<link rel="stylesheet" href="/css/main.css">
|
||
</head>
|
||
|
||
<body>
|
||
<div class="container">
|
||
<div class="col-sm-3">
|
||
<img id="about" src="/img/avatar.jpg" height="75px" width="75px" />
|
||
<h1 class="author-name">Agus Makmun</h1>
|
||
|
||
<div id="about">
|
||
I am freelance developer. Currently doing more in backend, actually in Python and Django.
|
||
</div>
|
||
|
||
<hr />
|
||
<strong>Navigation</strong><br />
|
||
» <a href="">Home</a> <br />
|
||
|
||
» <a class="about" href="/about/">About Me</a><br />
|
||
|
||
» <a class="about" href="https://github.com/agusmakmun">Github</a><br />
|
||
|
||
» <a class="about" href="/sitemap.xml">XML Sitemap</a><br />
|
||
|
||
</div>
|
||
|
||
<div class="col-sm-8 col-offset-1">
|
||
<h1>Welcome to Simply Grey</h1>
|
||
<span class="time">23 Dec 2013</span>
|
||
|
||
<div class="content">
|
||
<div class="post"><p>SimplyGrey is a simple, easy to use theme for Jekyll that compromises of mainly grey colours. A lot of people enjoy the simplistic look of grey and also find it easier to read.</p>
|
||
|
||
<h2 id="why-use-simply-grey">Why use Simply Grey?</h2>
|
||
<p>There are lots of reasons why I think you should use Simply Grey but I will list the main ones that I believe are more of benefit to you, the user.</p>
|
||
|
||
<ul>
|
||
<li><em>Easy to use and setup</em> - Jekyll has a huge range of documentation to get you started writing posts and the Simply Grey theme makes your blog look beautiful.</li>
|
||
<li><em>Easy configuration</em> - I developed this theme in order to be as customisable as possible. If you want to add more links to the navigation bar, all you have to do is edit the _config.yaml file and the <code class="highlighter-rouge">urls</code> part of it.</li>
|
||
<li><em>You can change it</em> - After being released with the MIT license (like Jekyll itself) you are free to change and basically do anything you want to this theme provided you keep the copyright notice in the files and distribute the license with it.</li>
|
||
</ul>
|
||
|
||
<h2 id="jekyll">Jekyll</h2>
|
||
<p>Jekyll is a static site generator developed in ruby that generates websites from markdown and many other formats. The benefit of this is that you can have a highly customisable blog where you can generate posts by writing easy markdown code whilst still retaining the small memory imprint that Jekyll has.</p>
|
||
|
||
<h3 id="code-snippets">Code Snippets</h3>
|
||
<p>Code Snippets are one of the main reasons why I love Jekyll and I think you will too. All code snippets become highlighted with great colours when you write the code in markdown. Here is an example of highlighted Ruby code in a weather application that I have made.</p>
|
||
|
||
<figure class="highlight"><pre><code class="language-ruby" data-lang="ruby"><span class="c1">#!/usr/bin/env ruby</span>
|
||
|
||
<span class="nb">require</span> <span class="s1">'json'</span>
|
||
<span class="nb">require</span> <span class="s1">'net/http'</span>
|
||
<span class="nb">require</span> <span class="s1">'libnotify'</span>
|
||
|
||
<span class="k">def</span> <span class="nf">parsejson</span>
|
||
<span class="n">file</span> <span class="o">=</span> <span class="s2">"http://api.openweathermap.org/data/2.5/find?q=London&mode=json"</span>
|
||
<span class="n">response</span> <span class="o">=</span> <span class="no">Net</span><span class="o">::</span><span class="no">HTTP</span><span class="p">.</span><span class="nf">get_response</span><span class="p">(</span><span class="no">URI</span><span class="p">.</span><span class="nf">parse</span><span class="p">(</span><span class="n">file</span><span class="p">))</span>
|
||
<span class="n">weatherjson</span> <span class="o">=</span> <span class="n">response</span><span class="p">.</span><span class="nf">body</span>
|
||
<span class="n">actual</span> <span class="o">=</span> <span class="no">JSON</span><span class="p">.</span><span class="nf">parse</span><span class="p">(</span><span class="n">weatherjson</span><span class="p">)</span>
|
||
|
||
<span class="c1"># check for errors</span>
|
||
<span class="k">if</span> <span class="n">actual</span><span class="p">.</span><span class="nf">has_key?</span> <span class="s1">'Error'</span>
|
||
<span class="k">raise</span> <span class="s2">"error with the url"</span>
|
||
<span class="k">end</span>
|
||
|
||
<span class="n">results</span> <span class="o">=</span> <span class="p">[]</span>
|
||
|
||
<span class="n">actual</span><span class="p">[</span><span class="s2">"list"</span><span class="p">].</span><span class="nf">each</span> <span class="k">do</span> <span class="o">|</span><span class="n">listitem</span><span class="o">|</span>
|
||
<span class="n">weather</span> <span class="o">=</span> <span class="n">listitem</span><span class="p">[</span><span class="s2">"weather"</span><span class="p">]</span>
|
||
<span class="n">weather</span><span class="p">.</span><span class="nf">each</span> <span class="k">do</span> <span class="o">|</span><span class="n">weath</span><span class="o">|</span>
|
||
<span class="n">results</span><span class="p">.</span><span class="nf">push</span><span class="p">(</span><span class="n">weath</span><span class="p">[</span><span class="s2">"description"</span><span class="p">])</span>
|
||
<span class="k">end</span>
|
||
<span class="n">main</span> <span class="o">=</span> <span class="n">listitem</span><span class="p">[</span><span class="s2">"main"</span><span class="p">]</span>
|
||
<span class="n">temp</span> <span class="o">=</span> <span class="n">main</span><span class="p">[</span><span class="s2">"temp"</span><span class="p">]</span> <span class="o">-</span> <span class="mi">273</span><span class="o">.</span><span class="mi">15</span>
|
||
<span class="n">results</span><span class="p">.</span><span class="nf">push</span> <span class="p">(</span><span class="s2">"%.2f"</span> <span class="o">%</span> <span class="n">temp</span><span class="p">)</span>
|
||
<span class="k">end</span>
|
||
|
||
<span class="k">return</span> <span class="n">results</span>
|
||
<span class="k">end</span>
|
||
|
||
<span class="k">def</span> <span class="nf">notify</span><span class="p">(</span><span class="n">summary</span><span class="p">)</span>
|
||
<span class="no">Libnotify</span><span class="p">.</span><span class="nf">show</span><span class="p">(</span><span class="ss">:body</span> <span class="o">=></span> <span class="s2">"Current temperature is: </span><span class="si">#{</span><span class="n">summary</span><span class="p">[</span><span class="mi">1</span><span class="p">]</span><span class="si">}</span><span class="s2"> degrees celsius.</span><span class="se">\n</span><span class="s2">Current description of conditions: </span><span class="si">#{</span><span class="n">summary</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span><span class="si">}</span><span class="s2">"</span><span class="p">,</span> <span class="ss">:summary</span> <span class="o">=></span> <span class="s2">"Weather Update"</span><span class="p">,</span> <span class="ss">:timeout</span> <span class="o">=></span> <span class="mi">10</span><span class="p">)</span>
|
||
<span class="k">end</span>
|
||
|
||
<span class="n">notify</span><span class="p">(</span><span class="n">parsejson</span><span class="p">())</span></code></pre></figure>
|
||
|
||
<p>Check out the <a href="http://jekyllrb.com">Jekyll docs</a> for more info on how to get the most out of Jekyll. File all bugs/feature requests at <a href="https://github.com/mojombo/jekyll">Jekyll’s GitHub repo</a>.</p>
|
||
|
||
</div>
|
||
</div>
|
||
|
||
|
||
<footer>
|
||
© Agus Makmun
|
||
|
||
- <a href="https://github.com/agusmakmun">https://github.com/agusmakmun</a> - Powered by Jekyll.
|
||
|
||
</footer>
|
||
</div><!-- end /.col-sm-8 -->
|
||
</div><!-- end /.container -->
|
||
|
||
<!-- Bootstrap core JavaScript
|
||
================================================== -->
|
||
<!-- Placed at the end of the document so the pages load faster -->
|
||
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script>
|
||
<script src="js/bootstrap.min.js"></script>
|
||
</body>
|
||
</html>
|