Browse Source

Added email whitelist post

master
Kim Grytøyr 3 years ago
parent
commit
17bd2ad08e
Signed by: kim GPG Key ID: 759EF8C94E0B45B7
  1. 2
      config.toml
  2. 13
      content/post/2018-08-23-pretty-print-json-mac.md
  3. 31
      content/post/2018-10-01-whitelist-email-addresses.md
  4. 14
      public/2014/07/08/going-static/index.html
  5. 14
      public/2014/07/09/case-sensitivty-problem-with-git-in-os-x/index.html
  6. 14
      public/2014/09/03/opening-sublime-text-from-the-command-line/index.html
  7. 14
      public/2015/06/14/locationpicker.js/index.html
  8. 14
      public/2015/06/14/using-launchctl-on-mac-osx-10-10/index.html
  9. 14
      public/2015/06/21/mutt-tips-and-tricks/index.html
  10. 14
      public/2015/08/09/basic-usage-of-git-svn/index.html
  11. 14
      public/2015/08/09/deleteing-rows-with-a-left-join-in-mysql/index.html
  12. 14
      public/2015/08/09/useful-git-tips/index.html
  13. 14
      public/2016/01/21/creating-a-bootable-usb-stick-on-os-x/index.html
  14. 14
      public/2016/01/21/trouble-booting-newer-linux-kernels-on-asus-vivopc-vm42/index.html
  15. 14
      public/2016/01/31/resizing-windows-on-linux/index.html
  16. 14
      public/404.html
  17. 14
      public/about/index.html
  18. 18
      public/index.html
  19. 11
      public/index.xml
  20. 22
      public/page/2/index.html
  21. 153
      public/page/3/index.html
  22. 14
      public/post/2017-07-30-ludum-dare-39/index.html
  23. 14
      public/post/2018-02-09-ubuntu-sudo-nopasswd/index.html
  24. 14
      public/post/2018-02-12-basic-server-setup-ubuntu/index.html
  25. 14
      public/post/2018-06-15-vim-encoding/index.html
  26. 265
      public/post/2018-08-23-pretty-print-json-mac/index.html
  27. 14
      public/post/3d-model-of-a-book/index.html
  28. 18
      public/post/index.html
  29. 11
      public/post/index.xml
  30. 14
      public/post/ludum-dare-38/index.html
  31. 14
      public/post/new-website-platform/index.html
  32. 10
      public/post/page/2/index.html
  33. 23
      public/sitemap.xml
  34. 20
      public/tags/index.xml
  35. 10
      public/tags/mac/index.html
  36. 11
      public/tags/mac/index.xml
  37. 28
      signed/2014-07-08-going-static.md.txt
  38. 28
      signed/2014-07-09-case-sensitivty-problem-with-git-in-os-x.md.txt
  39. 28
      signed/2014-09-03-opening-sublime-text-from-the-command-line.md.txt
  40. 28
      signed/2015-06-14-locationpicker.js.md.txt
  41. 28
      signed/2015-06-20-my-mutt-setup.md.txt
  42. 28
      signed/2015-06-21-mutt-tips-and-tricks.md.txt
  43. 28
      signed/2015-06-21-note-taking-workflow-with-alfred-app.md.txt
  44. 28
      signed/2015-08-09-basic-usage-of-git-svn.md.txt
  45. 28
      signed/2015-08-09-useful-git-tips.md.txt
  46. 28
      signed/2016-01-21-creating-a-bootable-usb-stick-on-os-x.md.txt
  47. 28
      signed/2016-01-21-trouble-booting-newer-linux-kernels-on-asus-vivopc-vm42.md.txt
  48. 28
      signed/2016-01-31-resizing-windows-on-linux.md.txt
  49. 28
      signed/2016-10-28-useful-vim-plugins.md.txt
  50. 28
      signed/2017-04-13-moving-to-hugo.md.txt
  51. 28
      signed/2017-07-30-ludum-dare-39.md.txt
  52. 28
      signed/2018-02-09-ubuntu-sudo-nopasswd.md.txt
  53. 28
      signed/2018-02-12-basic-server-setup-ubuntu.md.txt
  54. 28
      signed/2018-06-15-vim-encoding.md.txt
  55. 40
      signed/2018-08-23-pretty-print-json-mac.md.txt
  56. 53
      signed/2018-10-01-whitelist-email-addresses.md.txt
  57. 28
      signed/3D-book-model.md.txt
  58. 28
      signed/ludum-dare-38.md.txt
  59. BIN
      static/images/mail-whitelist.png
  60. 0
      support/kim_grytoyr_io.sublime-project
  61. 962
      support/kim_grytoyr_io.sublime-workspace

2
config.toml

@ -37,7 +37,7 @@ disqusShortname = ""
readMore = ""
copyright = ""
# Sharing options and author information in posts
aboutAuthor = "A guy."
aboutAuthor = "Developer"
tweet = ""
share = ""
# 404 page

13
content/post/2018-08-23-pretty-print-json-mac.md

@ -0,0 +1,13 @@
+++
date = "2018-07-23T08:50:00+02:00"
description = "Simple pretty-printing of JSON on a Mac"
title = "Pretty-print JSON on a Mac"
tags = ["json", "npaste", "mac"]
+++
I've written [npaste](https://git.grytoyr.io/npaste), a simple pastebin for text and images that supports encryption using GPG. My work involves a lot of JSON that I often need to share with others via Slack or other communication platforms. Sometimes the output is quite big and not very suitable for sharing inline. And in some cases the contents are sensitive and should not persist on the internet longer than necessary. In this post I'll collect and present some useful commands that can be used to paste, format and share pretty-printed JSON data.
> This post assumes you have the npaste-cli installed. Please see the [readme](https://git.grytoyr.io/npaste/about) for instructions on how to install it.
Assuming you have a JSON object in your clipboard, you can simply type the following command:
`pbpaste | python -m json.tool | npaste --age=10m --encrypt`

31
content/post/2018-10-01-whitelist-email-addresses.md

@ -0,0 +1,31 @@
+++
date = "2018-10-01T05:50:00+02:00"
description = "Whitelisting email addresses."
title = "How I keep my inbox tidy and clean"
tags = ["server", "email"]
+++
I have two email accounts:
* Work
* Private
The one I use the most is by far my work email. This account mostly receives emails that are addressed to me directly. My private one, on the other hand, receives some spam, which is mostly being filtered out by my spam filters, and a lot of what I call «unimportant email».
> **«Unimportant email»** are messages that I mostly don't care about and don't want to be notified about. I'd still like to receive them and be able to review them.
## The Setup
I run my own mail server. This enables me to quite easily have all new email that I haven't specifically told the mail filter to put somewhere else, to go into a special temporary folder. Every now and then I get a summary of any new messages waiting for me in the temporary inbox delivered to my regular inbox. Only messages arriving in my regular inbox will trigger notifications and, as a result, disturb me.
I maintain a whitelist on the server, which I can easily add an address to remotely, that keeps track of senders that I want email from to arrive directly in my regular inbox.
----
{{< figure src="/images/mail-whitelist.png" >}}
----
By applying this technique I'm making sure that **only important messages** lands in my inbox. All the other cruft I can review and organize whenever I have the time and energy needed to do so.
Kudos to @enpo for mentioning this technique to me and helping me with the bash one-liners that does all the dirty work.

14
public/2014/07/08/going-static/index.html

@ -152,6 +152,13 @@
<li>
<a href="/post/2018-08-23-pretty-print-json-mac/">Pretty-print JSON on a Mac<aside class="dates">Jul 23</aside></a>
</li>
<li>
<a href="/post/2018-06-15-vim-encoding/">Change file encoding in Vim<aside class="dates">Jun 15</aside></a>
</li>
@ -213,13 +220,6 @@
</li>
<li>
<a href="/2016/01/21/creating-a-bootable-usb-stick-on-os-x/">Creating a bootable USB stick on OS X<aside class="dates">Jan 21</aside></a>
</li>
</ul>
<footer id="footer">

14
public/2014/07/09/case-sensitivty-problem-with-git-in-os-x/index.html

@ -184,6 +184,13 @@ git commit -m &quot;Set correct case for filename&quot;
<li>
<a href="/post/2018-08-23-pretty-print-json-mac/">Pretty-print JSON on a Mac<aside class="dates">Jul 23</aside></a>
</li>
<li>
<a href="/post/2018-06-15-vim-encoding/">Change file encoding in Vim<aside class="dates">Jun 15</aside></a>
</li>
@ -245,13 +252,6 @@ git commit -m &quot;Set correct case for filename&quot;
</li>
<li>
<a href="/2016/01/21/creating-a-bootable-usb-stick-on-os-x/">Creating a bootable USB stick on OS X<aside class="dates">Jan 21</aside></a>
</li>
</ul>
<footer id="footer">

14
public/2014/09/03/opening-sublime-text-from-the-command-line/index.html

@ -168,6 +168,13 @@ subl . # Opens the current folder
<li>
<a href="/post/2018-08-23-pretty-print-json-mac/">Pretty-print JSON on a Mac<aside class="dates">Jul 23</aside></a>
</li>
<li>
<a href="/post/2018-06-15-vim-encoding/">Change file encoding in Vim<aside class="dates">Jun 15</aside></a>
</li>
@ -229,13 +236,6 @@ subl . # Opens the current folder
</li>
<li>
<a href="/2016/01/21/creating-a-bootable-usb-stick-on-os-x/">Creating a bootable USB stick on OS X<aside class="dates">Jan 21</aside></a>
</li>
</ul>
<footer id="footer">

14
public/2015/06/14/locationpicker.js/index.html

@ -305,6 +305,13 @@ A callback function that is called every time the location or radius changes. <c
<li>
<a href="/post/2018-08-23-pretty-print-json-mac/">Pretty-print JSON on a Mac<aside class="dates">Jul 23</aside></a>
</li>
<li>
<a href="/post/2018-06-15-vim-encoding/">Change file encoding in Vim<aside class="dates">Jun 15</aside></a>
</li>
@ -366,13 +373,6 @@ A callback function that is called every time the location or radius changes. <c
</li>
<li>
<a href="/2016/01/21/creating-a-bootable-usb-stick-on-os-x/">Creating a bootable USB stick on OS X<aside class="dates">Jan 21</aside></a>
</li>
</ul>
<footer id="footer">

14
public/2015/06/14/using-launchctl-on-mac-osx-10-10/index.html

@ -170,6 +170,13 @@ instead of crontab. The following example shows how to run <strong>offlineimap</
<li>
<a href="/post/2018-08-23-pretty-print-json-mac/">Pretty-print JSON on a Mac<aside class="dates">Jul 23</aside></a>
</li>
<li>
<a href="/post/2018-06-15-vim-encoding/">Change file encoding in Vim<aside class="dates">Jun 15</aside></a>
</li>
@ -231,13 +238,6 @@ instead of crontab. The following example shows how to run <strong>offlineimap</
</li>
<li>
<a href="/2016/01/21/creating-a-bootable-usb-stick-on-os-x/">Creating a bootable USB stick on OS X<aside class="dates">Jan 21</aside></a>
</li>
</ul>
<footer id="footer">

14
public/2015/06/21/mutt-tips-and-tricks/index.html

@ -234,6 +234,13 @@ your <code>.muttrc</code>:</p>
<li>
<a href="/post/2018-08-23-pretty-print-json-mac/">Pretty-print JSON on a Mac<aside class="dates">Jul 23</aside></a>
</li>
<li>
<a href="/post/2018-06-15-vim-encoding/">Change file encoding in Vim<aside class="dates">Jun 15</aside></a>
</li>
@ -295,13 +302,6 @@ your <code>.muttrc</code>:</p>
</li>
<li>
<a href="/2016/01/21/creating-a-bootable-usb-stick-on-os-x/">Creating a bootable USB stick on OS X<aside class="dates">Jan 21</aside></a>
</li>
</ul>
<footer id="footer">

14
public/2015/08/09/basic-usage-of-git-svn/index.html

@ -189,6 +189,13 @@ git svn dcommit # This will push your changes to the SVN repository
<li>
<a href="/post/2018-08-23-pretty-print-json-mac/">Pretty-print JSON on a Mac<aside class="dates">Jul 23</aside></a>
</li>
<li>
<a href="/post/2018-06-15-vim-encoding/">Change file encoding in Vim<aside class="dates">Jun 15</aside></a>
</li>
@ -250,13 +257,6 @@ git svn dcommit # This will push your changes to the SVN repository
</li>
<li>
<a href="/2016/01/21/creating-a-bootable-usb-stick-on-os-x/">Creating a bootable USB stick on OS X<aside class="dates">Jan 21</aside></a>
</li>
</ul>
<footer id="footer">

14
public/2015/08/09/deleteing-rows-with-a-left-join-in-mysql/index.html

@ -159,6 +159,13 @@ SELECT i.* FROM images i LEFT JOIN users u ON i."/>
<li>
<a href="/post/2018-08-23-pretty-print-json-mac/">Pretty-print JSON on a Mac<aside class="dates">Jul 23</aside></a>
</li>
<li>
<a href="/post/2018-06-15-vim-encoding/">Change file encoding in Vim<aside class="dates">Jun 15</aside></a>
</li>
@ -220,13 +227,6 @@ SELECT i.* FROM images i LEFT JOIN users u ON i."/>
</li>
<li>
<a href="/2016/01/21/creating-a-bootable-usb-stick-on-os-x/">Creating a bootable USB stick on OS X<aside class="dates">Jan 21</aside></a>
</li>
</ul>
<footer id="footer">

14
public/2015/08/09/useful-git-tips/index.html

@ -159,6 +159,13 @@ ignored = !git ls-files -v | grep ^[a-z]
<li>
<a href="/post/2018-08-23-pretty-print-json-mac/">Pretty-print JSON on a Mac<aside class="dates">Jul 23</aside></a>
</li>
<li>
<a href="/post/2018-06-15-vim-encoding/">Change file encoding in Vim<aside class="dates">Jun 15</aside></a>
</li>
@ -220,13 +227,6 @@ ignored = !git ls-files -v | grep ^[a-z]
</li>
<li>
<a href="/2016/01/21/creating-a-bootable-usb-stick-on-os-x/">Creating a bootable USB stick on OS X<aside class="dates">Jan 21</aside></a>
</li>
</ul>
<footer id="footer">

14
public/2016/01/21/creating-a-bootable-usb-stick-on-os-x/index.html

@ -185,6 +185,13 @@ diskutil list After you have successfully identified your USB stick, unmount th
<li>
<a href="/post/2018-08-23-pretty-print-json-mac/">Pretty-print JSON on a Mac<aside class="dates">Jul 23</aside></a>
</li>
<li>
<a href="/post/2018-06-15-vim-encoding/">Change file encoding in Vim<aside class="dates">Jun 15</aside></a>
</li>
@ -246,13 +253,6 @@ diskutil list After you have successfully identified your USB stick, unmount th
</li>
<li>
<a href="/2016/01/21/creating-a-bootable-usb-stick-on-os-x/">Creating a bootable USB stick on OS X<aside class="dates">Jan 21</aside></a>
</li>
</ul>
<footer id="footer">

14
public/2016/01/21/trouble-booting-newer-linux-kernels-on-asus-vivopc-vm42/index.html

@ -175,6 +175,13 @@ of the kernel was working, I figured it couldn&rsquo;t be because of those BIOS
<li>
<a href="/post/2018-08-23-pretty-print-json-mac/">Pretty-print JSON on a Mac<aside class="dates">Jul 23</aside></a>
</li>
<li>
<a href="/post/2018-06-15-vim-encoding/">Change file encoding in Vim<aside class="dates">Jun 15</aside></a>
</li>
@ -236,13 +243,6 @@ of the kernel was working, I figured it couldn&rsquo;t be because of those BIOS
</li>
<li>
<a href="/2016/01/21/creating-a-bootable-usb-stick-on-os-x/">Creating a bootable USB stick on OS X<aside class="dates">Jan 21</aside></a>
</li>
</ul>
<footer id="footer">

14
public/2016/01/31/resizing-windows-on-linux/index.html

@ -140,6 +140,13 @@
<li>
<a href="/post/2018-08-23-pretty-print-json-mac/">Pretty-print JSON on a Mac<aside class="dates">Jul 23</aside></a>
</li>
<li>
<a href="/post/2018-06-15-vim-encoding/">Change file encoding in Vim<aside class="dates">Jun 15</aside></a>
</li>
@ -201,13 +208,6 @@
</li>
<li>
<a href="/2016/01/21/creating-a-bootable-usb-stick-on-os-x/">Creating a bootable USB stick on OS X<aside class="dates">Jan 21</aside></a>
</li>
</ul>
<footer id="footer">

14
public/404.html

@ -78,6 +78,13 @@
<li>
<a href="/post/2018-08-23-pretty-print-json-mac/">Pretty-print JSON on a Mac<aside class="dates">Jul 23</aside></a>
</li>
<li>
<a href="/post/2018-06-15-vim-encoding/">Change file encoding in Vim<aside class="dates">Jun 15</aside></a>
</li>
@ -139,13 +146,6 @@
</li>
<li>
<a href="/2016/01/21/creating-a-bootable-usb-stick-on-os-x/">Creating a bootable USB stick on OS X<aside class="dates">Jan 21</aside></a>
</li>
</ul>
</article>

14
public/about/index.html

@ -132,6 +132,13 @@
<li>
<a href="/post/2018-08-23-pretty-print-json-mac/">Pretty-print JSON on a Mac<aside class="dates">Jul 23</aside></a>
</li>
<li>
<a href="/post/2018-06-15-vim-encoding/">Change file encoding in Vim<aside class="dates">Jun 15</aside></a>
</li>
@ -193,13 +200,6 @@
</li>
<li>
<a href="/2016/01/21/creating-a-bootable-usb-stick-on-os-x/">Creating a bootable USB stick on OS X<aside class="dates">Jan 21</aside></a>
</li>
</ul>
<footer id="footer">

18
public/index.html

@ -26,7 +26,7 @@
<meta property="og:updated_time" content="2018-06-15T09:41:00&#43;02:00"/>
<meta property="og:updated_time" content="2018-07-23T08:50:00&#43;02:00"/>
@ -79,6 +79,14 @@
<li>
<a href='/post/2018-08-23-pretty-print-json-mac/'><aside class="dates">Jul 23, &#39;18</aside></a>
<a href='/post/2018-08-23-pretty-print-json-mac/'>Pretty-print JSON on a Mac <h2>Simple pretty-printing of JSON on a Mac</h2></a>
</li>
<li>
<a href='/post/2018-06-15-vim-encoding/'><aside class="dates">Jun 15, &#39;18</aside></a>
<a href='/post/2018-06-15-vim-encoding/'>Change file encoding in Vim <h2>I always forget how to do this..</h2></a>
@ -149,14 +157,6 @@
</li>
<li>
<a href='/2016/01/21/creating-a-bootable-usb-stick-on-os-x/'><aside class="dates">Jan 21, &#39;16</aside></a>
<a href='/2016/01/21/creating-a-bootable-usb-stick-on-os-x/'>Creating a bootable USB stick on OS X <h2></h2></a>
</li>
</ul>
<nav id="post-nav">

11
public/index.xml

@ -6,11 +6,20 @@
<description>Recent content on Kim Grytøyr</description>
<generator>Hugo -- gohugo.io</generator>
<language>en-us</language>
<lastBuildDate>Fri, 15 Jun 2018 09:41:00 +0200</lastBuildDate>
<lastBuildDate>Mon, 23 Jul 2018 08:50:00 +0200</lastBuildDate>
<atom:link href="/index.xml" rel="self" type="application/rss+xml" />
<item>
<title>Pretty-print JSON on a Mac</title>
<link>/post/2018-08-23-pretty-print-json-mac/</link>
<pubDate>Mon, 23 Jul 2018 08:50:00 +0200</pubDate>
<guid>/post/2018-08-23-pretty-print-json-mac/</guid>
<description>I&amp;rsquo;ve written npaste, a simple pastebin for text and images that supports encryption using GPG. My work involves a lot of JSON that I often need to share with others via Slack or other communication platforms. Sometimes the output is quite big and not very suitable for sharing inline. And in some cases the contents are sensitive and should not persist on the internet longer than necessary. In this post I&amp;rsquo;ll collect and present some useful commands that can be used to paste, format and share pretty-printed JSON data.</description>
</item>
<item>
<title>Change file encoding in Vim</title>
<link>/post/2018-06-15-vim-encoding/</link>

22
public/page/2/index.html

@ -79,6 +79,14 @@
<li>
<a href='/2016/01/21/creating-a-bootable-usb-stick-on-os-x/'><aside class="dates">Jan 21, &#39;16</aside></a>
<a href='/2016/01/21/creating-a-bootable-usb-stick-on-os-x/'>Creating a bootable USB stick on OS X <h2></h2></a>
</li>
<li>
<a href='/2016/01/21/trouble-booting-newer-linux-kernels-on-asus-vivopc-vm42/'><aside class="dates">Jan 21, &#39;16</aside></a>
<a href='/2016/01/21/trouble-booting-newer-linux-kernels-on-asus-vivopc-vm42/'>Trouble booting newer Linux kernels on Asus VivoPC VM42 <h2></h2></a>
@ -149,14 +157,6 @@
</li>
<li>
<a href='/2014/07/08/going-static/'><aside class="dates">Jul 8, &#39;14</aside></a>
<a href='/2014/07/08/going-static/'>Going static <h2></h2></a>
</li>
</ul>
<nav id="post-nav">
@ -169,6 +169,12 @@
</span>
<span class="next">
<a href="/page/3/">
Older Posts <span class="arrow"></span>
</a>
</span>
</nav>
<footer id="footer">

153
public/page/3/index.html

@ -0,0 +1,153 @@
<!DOCTYPE html>
<html lang="en-us">
<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">
<meta name="author" content="Kim Grytøyr">
<meta name="description" content="Personal website for Kim Grytøyr.">
<meta name="generator" content="Hugo 0.30.2" />
<title>Kim Grytøyr</title>
<link rel="shortcut icon" href="/favicon.png">
<link rel="stylesheet" href="/css/style.css">
<link rel="stylesheet" href="/css/highlight.css">
<link rel="stylesheet" href="/css/monosocialiconsfont.css">
<meta property="og:title" content="Kim Grytøyr" />
<meta property="og:description" content="Personal website for Kim Grytøyr." />
<meta property="og:type" content="website" />
<meta property="og:url" content="/" />
<meta property="og:updated_time" content="2014-07-08T23:13:00&#43;00:00"/>
<meta itemprop="name" content="Kim Grytøyr">
<meta itemprop="description" content="Personal website for Kim Grytøyr.">
<meta name="twitter:card" content="summary"/><meta name="twitter:title" content="Kim Grytøyr"/>
<meta name="twitter:description" content="Personal website for Kim Grytøyr."/>
<meta name="twitter:site" content="@https://www.twitter.com/kimgrytoyr"/>
</head>
<body>
<nav class="main-nav">
<a href='/about'>About</a>
</nav>
<div class="profile">
<section id="wrapper">
<header id="header">
<a href='/about'>
<img id="avatar" class="2x" src="/images/avatar.png"/>
</a>
<h1>Kim Grytøyr</h1>
<h2>Programmer - Tech enthusiast</h2>
</header>
</section>
</div>
<section id="wrapper" class="home">
<ul id="post-list">
<li>
<a href='/2014/07/08/going-static/'><aside class="dates">Jul 8, &#39;14</aside></a>
<a href='/2014/07/08/going-static/'>Going static <h2></h2></a>
</li>
</ul>
<nav id="post-nav">
<span class="prev">
<a href="/page/2/">
<span class="arrow"></span> Newer Posts
</a>
</span>
</nav>
<footer id="footer">
<div id="social">
<a class="symbol" href="https://www.facebook.com/kimgrytoyr">
circlefacebook
</a>
<a class="symbol" href="https://www.github.com/kimgrytoyr">
circlegithub
</a>
<a class="symbol" href="https://www.twitter.com/kimgrytoyr">
circletwitterbird
</a>
</div>
<p class="small">
© Copyright 2018 Kim Grytøyr
</p>
</footer>
</section>
<script src="/js/jquery.min.js"></script>
<script src="/js/main.js"></script>
<script src="/js/highlight.js"></script>
<script src="/js/instantclick.min.js" data-no-instant></script>
<script>
InstantClick.on('change', function() {
setTimeout(function() {
hljs.initHighlighting();
}, 100);
});
</script>
<script data-no-instant>InstantClick.init();</script>
</body>
</html>

14
public/post/2017-07-30-ludum-dare-39/index.html

@ -181,6 +181,13 @@
<li>
<a href="/post/2018-08-23-pretty-print-json-mac/">Pretty-print JSON on a Mac<aside class="dates">Jul 23</aside></a>
</li>
<li>
<a href="/post/2018-06-15-vim-encoding/">Change file encoding in Vim<aside class="dates">Jun 15</aside></a>
</li>
@ -242,13 +249,6 @@
</li>
<li>
<a href="/2016/01/21/creating-a-bootable-usb-stick-on-os-x/">Creating a bootable USB stick on OS X<aside class="dates">Jan 21</aside></a>
</li>
</ul>
<footer id="footer">

14
public/post/2018-02-09-ubuntu-sudo-nopasswd/index.html

@ -152,6 +152,13 @@
<li>
<a href="/post/2018-08-23-pretty-print-json-mac/">Pretty-print JSON on a Mac<aside class="dates">Jul 23</aside></a>
</li>
<li>
<a href="/post/2018-06-15-vim-encoding/">Change file encoding in Vim<aside class="dates">Jun 15</aside></a>
</li>
@ -213,13 +220,6 @@
</li>
<li>
<a href="/2016/01/21/creating-a-bootable-usb-stick-on-os-x/">Creating a bootable USB stick on OS X<aside class="dates">Jan 21</aside></a>
</li>
</ul>
<footer id="footer">

14
public/post/2018-02-12-basic-server-setup-ubuntu/index.html

@ -208,6 +208,13 @@ ufw enable
<li>
<a href="/post/2018-08-23-pretty-print-json-mac/">Pretty-print JSON on a Mac<aside class="dates">Jul 23</aside></a>
</li>
<li>
<a href="/post/2018-06-15-vim-encoding/">Change file encoding in Vim<aside class="dates">Jun 15</aside></a>
</li>
@ -269,13 +276,6 @@ ufw enable
</li>
<li>
<a href="/2016/01/21/creating-a-bootable-usb-stick-on-os-x/">Creating a bootable USB stick on OS X<aside class="dates">Jan 21</aside></a>
</li>
</ul>
<footer id="footer">

14
public/post/2018-06-15-vim-encoding/index.html

@ -140,6 +140,13 @@
<li>
<a href="/post/2018-08-23-pretty-print-json-mac/">Pretty-print JSON on a Mac<aside class="dates">Jul 23</aside></a>
</li>
<li>
<a href="/post/2018-06-15-vim-encoding/">Change file encoding in Vim<aside class="dates">Jun 15</aside></a>
</li>
@ -201,13 +208,6 @@
</li>
<li>
<a href="/2016/01/21/creating-a-bootable-usb-stick-on-os-x/">Creating a bootable USB stick on OS X<aside class="dates">Jan 21</aside></a>
</li>
</ul>
<footer id="footer">

265
public/post/2018-08-23-pretty-print-json-mac/index.html

@ -0,0 +1,265 @@
<!DOCTYPE html>
<html lang="en-us">
<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">
<meta name="author" content="Kim Grytøyr">
<meta name="description" content="Personal website for Kim Grytøyr.">
<meta name="generator" content="Hugo 0.30.2" />
<title>Pretty-print JSON on a Mac &middot; Kim Grytøyr</title>
<link rel="shortcut icon" href="/favicon.png">
<link rel="stylesheet" href="/css/style.css">
<link rel="stylesheet" href="/css/highlight.css">
<link rel="stylesheet" href="/css/monosocialiconsfont.css">
<meta property="og:title" content="Pretty-print JSON on a Mac" />
<meta property="og:description" content="Simple pretty-printing of JSON on a Mac" />
<meta property="og:type" content="article" />
<meta property="og:url" content="/post/2018-08-23-pretty-print-json-mac/" />
<meta property="article:published_time" content="2018-07-23T08:50:00&#43;02:00"/>
<meta property="article:modified_time" content="2018-07-23T08:50:00&#43;02:00"/>
<meta itemprop="name" content="Pretty-print JSON on a Mac">
<meta itemprop="description" content="Simple pretty-printing of JSON on a Mac">
<meta itemprop="datePublished" content="2018-07-23T08:50:00&#43;02:00" />
<meta itemprop="dateModified" content="2018-07-23T08:50:00&#43;02:00" />
<meta itemprop="wordCount" content="133">
<meta itemprop="keywords" content="json,npaste,mac," />
<meta name="twitter:card" content="summary"/><meta name="twitter:title" content="Pretty-print JSON on a Mac"/>
<meta name="twitter:description" content="Simple pretty-printing of JSON on a Mac"/>
<meta name="twitter:site" content="@https://www.twitter.com/kimgrytoyr"/>
</head>
<body>
<nav class="main-nav">
<a href='/'> <span class="arrow"></span>Home</a>
<a href='/about'>About</a>
</nav>
<section id="wrapper">
<article class="post">
<header>
<h1>Pretty-print JSON on a Mac</h1>
<h2 class="headline">
July 23, 2018
<br>
<a href="/tags/json">json</a>
<a href="/tags/npaste">npaste</a>
<a href="/tags/mac">mac</a>
</h2>
</header>
<section id="post-body">
<p>I&rsquo;ve written <a href="https://git.grytoyr.io/npaste">npaste</a>, a simple pastebin for text and images that supports encryption using GPG. My work involves a lot of JSON that I often need to share with others via Slack or other communication platforms. Sometimes the output is quite big and not very suitable for sharing inline. And in some cases the contents are sensitive and should not persist on the internet longer than necessary. In this post I&rsquo;ll collect and present some useful commands that can be used to paste, format and share pretty-printed JSON data.</p>
<blockquote>
<p>This post assumes you have the npaste-cli installed. Please see the <a href="https://git.grytoyr.io/npaste/about">readme</a> for instructions on how to install it.</p>
</blockquote>
<p>Assuming you have a JSON object in your clipboard, you can simply type the following command:<br />
<code>pbpaste | python -m json.tool | npaste --age=10m --encrypt</code></p>
</section>
<section id="post-verification">
<p>You can verify that this post was written by me by pasting <a href="/signed/2018-08-23-pretty-print-json-mac.md.txt">the signature</a> into <a href="https://keybase.io/verify">keybase.io/verify</a>.</p>
</section>
</article>
<footer id="post-meta" class="clearfix">
<a href="https://twitter.com/kimgrytoyr">
<img class="avatar" src="/images/avatar.png">
<div>
<span class="dark">Kim Grytøyr</span>
<span>A guy.</span>
</div>
</a>
<section id="sharing">
<a class="twitter" href="https://twitter.com/intent/tweet?text=%2fpost%2f2018-08-23-pretty-print-json-mac%2f - Pretty-print%20JSON%20on%20a%20Mac by @kimgrytoyr"><span class="icon-twitter"> Tweet</span></a>
<a class="facebook" href="#" onclick="
window.open(
'https://www.facebook.com/sharer/sharer.php?u='+encodeURIComponent(location.href),
'facebook-share-dialog',
'width=626,height=436');
return false;"><span class="icon-facebook-rect"> Share</span>
</a>
</section>
</footer>
<ul id="post-list" class="archive readmore">
<h3>Read more</h3>
<li>
<a href="/post/2018-08-23-pretty-print-json-mac/">Pretty-print JSON on a Mac<aside class="dates">Jul 23</aside></a>
</li>
<li>
<a href="/post/2018-06-15-vim-encoding/">Change file encoding in Vim<aside class="dates">Jun 15</aside></a>
</li>
<li>
<a href="/post/2018-02-12-basic-server-setup-ubuntu/">Basic server setup (Ubuntu)<aside class="dates">Feb 12</aside></a>
</li>
<li>
<a href="/post/2018-02-09-ubuntu-sudo-nopasswd/">Disabling password for sudo in Ubuntu<aside class="dates">Feb 9</aside></a>
</li>
<li>
<a href="/post/2017-07-30-ludum-dare-39/">Ludum Dare 39: PowerClick<aside class="dates">Jul 30</aside></a>
</li>
<li>
<a href="/post/ludum-dare-38/">Ludum Dare 38: Parking Zone<aside class="dates">Apr 24</aside></a>
</li>
<li>
<a href="/post/3d-model-of-a-book/">3D model of a book<aside class="dates">Apr 14</aside></a>
</li>
<li>
<a href="/post/new-website-platform/">New website platform<aside class="dates">Apr 13</aside></a>
</li>
<li>
<a href="/about/">About<aside class="dates">Apr 13</aside></a>
</li>
<li>
<a href="/2016/01/31/resizing-windows-on-linux/">Resizing windows on linux<aside class="dates">Jan 31</aside></a>
</li>
</ul>
<footer id="footer">
<div id="social">
<a class="symbol" href="https://www.facebook.com/kimgrytoyr">
circlefacebook
</a>
<a class="symbol" href="https://www.github.com/kimgrytoyr">
circlegithub
</a>
<a class="symbol" href="https://www.twitter.com/kimgrytoyr">
circletwitterbird
</a>
</div>
<p class="small">
© Copyright 2018 Kim Grytøyr
</p>
</footer>
</section>
<script src="/js/jquery.min.js"></script>
<script src="/js/main.js"></script>
<script src="/js/highlight.js"></script>
<script src="/js/instantclick.min.js" data-no-instant></script>
<script>
InstantClick.on('change', function() {
setTimeout(function() {
hljs.initHighlighting();
}, 100);
});
</script>
<script data-no-instant>InstantClick.init();</script>
</body>
</html>

14
public/post/3d-model-of-a-book/index.html

@ -193,6 +193,13 @@ this book, and I have a list of things I want to accomplish:</p>
<li>
<a href="/post/2018-08-23-pretty-print-json-mac/">Pretty-print JSON on a Mac<aside class="dates">Jul 23</aside></a>
</li>
<li>
<a href="/post/2018-06-15-vim-encoding/">Change file encoding in Vim<aside class="dates">Jun 15</aside></a>
</li>
@ -254,13 +261,6 @@ this book, and I have a list of things I want to accomplish:</p>
</li>
<li>
<a href="/2016/01/21/creating-a-bootable-usb-stick-on-os-x/">Creating a bootable USB stick on OS X<aside class="dates">Jan 21</aside></a>
</li>
</ul>
<footer id="footer">

18
public/post/index.html

@ -26,7 +26,7 @@
<meta property="og:updated_time" content="2018-06-15T09:41:00&#43;02:00"/>
<meta property="og:updated_time" content="2018-07-23T08:50:00&#43;02:00"/>
@ -80,6 +80,14 @@
<li>
<a href='/post/2018-08-23-pretty-print-json-mac/'><aside class="dates">Jul 23, &#39;18</aside></a>
<a href='/post/2018-08-23-pretty-print-json-mac/'>Pretty-print JSON on a Mac <h2>Simple pretty-printing of JSON on a Mac</h2></a>
</li>
<li>
<a href='/post/2018-06-15-vim-encoding/'><aside class="dates">Jun 15, &#39;18</aside></a>
<a href='/post/2018-06-15-vim-encoding/'>Change file encoding in Vim <h2>I always forget how to do this..</h2></a>
@ -150,14 +158,6 @@
</li>
<li>
<a href='/2016/01/21/trouble-booting-newer-linux-kernels-on-asus-vivopc-vm42/'><aside class="dates">Jan 21, &#39;16</aside></a>
<a href='/2016/01/21/trouble-booting-newer-linux-kernels-on-asus-vivopc-vm42/'>Trouble booting newer Linux kernels on Asus VivoPC VM42 <h2></h2></a>
</li>
</ul>
<nav id="post-nav">

11
public/post/index.xml

@ -6,11 +6,20 @@
<description>Recent content in Posts on Kim Grytøyr</description>
<generator>Hugo -- gohugo.io</generator>
<language>en-us</language>
<lastBuildDate>Fri, 15 Jun 2018 09:41:00 +0200</lastBuildDate>
<lastBuildDate>Mon, 23 Jul 2018 08:50:00 +0200</lastBuildDate>
<atom:link href="/post/index.xml" rel="self" type="application/rss+xml" />
<item>
<title>Pretty-print JSON on a Mac</title>
<link>/post/2018-08-23-pretty-print-json-mac/</link>
<pubDate>Mon, 23 Jul 2018 08:50:00 +0200</pubDate>
<guid>/post/2018-08-23-pretty-print-json-mac/</guid>
<description>I&amp;rsquo;ve written npaste, a simple pastebin for text and images that supports encryption using GPG. My work involves a lot of JSON that I often need to share with others via Slack or other communication platforms. Sometimes the output is quite big and not very suitable for sharing inline. And in some cases the contents are sensitive and should not persist on the internet longer than necessary. In this post I&amp;rsquo;ll collect and present some useful commands that can be used to paste, format and share pretty-printed JSON data.</description>
</item>
<item>
<title>Change file encoding in Vim</title>
<link>/post/2018-06-15-vim-encoding/</link>

14
public/post/ludum-dare-38/index.html

@ -223,6 +223,13 @@ The jam lasts for 72 hours and the compo for 48 hours. There are different <a hr
<li>
<a href="/post/2018-08-23-pretty-print-json-mac/">Pretty-print JSON on a Mac<aside class="dates">Jul 23</aside></a>
</li>
<li>
<a href="/post/2018-06-15-vim-encoding/">Change file encoding in Vim<aside class="dates">Jun 15</aside></a>
</li>
@ -284,13 +291,6 @@ The jam lasts for 72 hours and the compo for 48 hours. There are different <a hr
</li>
<li>
<a href="/2016/01/21/creating-a-bootable-usb-stick-on-os-x/">Creating a bootable USB stick on OS X<aside class="dates">Jan 21</aside></a>
</li>
</ul>
<footer id="footer">

14
public/post/new-website-platform/index.html

@ -144,6 +144,13 @@
<li>
<a href="/post/2018-08-23-pretty-print-json-mac/">Pretty-print JSON on a Mac<aside class="dates">Jul 23</aside></a>
</li>
<li>
<a href="/post/2018-06-15-vim-encoding/">Change file encoding in Vim<aside class="dates">Jun 15</aside></a>
</li>
@ -205,13 +212,6 @@
</li>
<li>
<a href="/2016/01/21/creating-a-bootable-usb-stick-on-os-x/">Creating a bootable USB stick on OS X<aside class="dates">Jan 21</aside></a>
</li>
</ul>
<footer id="footer">

10
public/post/page/2/index.html

@ -26,7 +26,7 @@
<meta property="og:updated_time" content="2015-08-09T17:03:00&#43;00:00"/>
<meta property="og:updated_time" content="2016-01-21T10:40:00&#43;00:00"/>
@ -80,6 +80,14 @@
<li>
<a href='/2016/01/21/trouble-booting-newer-linux-kernels-on-asus-vivopc-vm42/'><aside class="dates">Jan 21, &#39;16</aside></a>
<a href='/2016/01/21/trouble-booting-newer-linux-kernels-on-asus-vivopc-vm42/'>Trouble booting newer Linux kernels on Asus VivoPC VM42 <h2></h2></a>
</li>
<li>
<a href='/2015/08/09/useful-git-tips/'><aside class="dates">Aug 9, &#39;15</aside></a>
<a href='/2015/08/09/useful-git-tips/'>Useful git tips <h2></h2></a>

23
public/sitemap.xml

@ -2,6 +2,11 @@
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"
xmlns:xhtml="http://www.w3.org/1999/xhtml">
<url>
<loc>/post/2018-08-23-pretty-print-json-mac/</loc>
<lastmod>2018-07-23T08:50:00+02:00</lastmod>
</url>
<url>
<loc>/post/2018-06-15-vim-encoding/</loc>
<lastmod>2018-06-15T09:41:00+02:00</lastmod>
@ -221,6 +226,12 @@
<priority>0</priority>
</url>
<url>
<loc>/tags/json/</loc>
<lastmod>2018-07-23T08:50:00+02:00</lastmod>
<priority>0</priority>
</url>
<url>
<loc>/tags/kernel/</loc>
<lastmod>2016-01-21T10:40:00+00:00</lastmod>
@ -229,7 +240,7 @@
<url>
<loc>/</loc>
<lastmod>2018-06-15T09:41:00+02:00</lastmod>
<lastmod>2018-07-23T08:50:00+02:00</lastmod>
<priority>0</priority>
</url>
@ -247,7 +258,7 @@
<url>
<loc>/tags/mac/</loc>
<lastmod>2016-01-21T10:40:00+00:00</lastmod>
<lastmod>2018-07-23T08:50:00+02:00</lastmod>
<priority>0</priority>
</url>
@ -263,9 +274,15 @@
<priority>0</priority>
</url>
<url>
<loc>/tags/npaste/</loc>
<lastmod>2018-07-23T08:50:00+02:00</lastmod>
<priority>0</priority>
</url>
<url>
<loc>/post/</loc>
<lastmod>2018-06-15T09:41:00+02:00</lastmod>
<lastmod>2018-07-23T08:50:00+02:00</lastmod>
<priority>0</priority>
</url>

20
public/tags/index.xml

<
@ -182,6 +182,15 @@
<description></description>
</item>
<item>
<title>Json</title>
<link>/tags/json/</link>
<pubDate>Mon, 23 Jul 2018 08:50:00 +0200</pubDate>
<guid>/tags/json/</guid>
<description></description>
</item>
<item>
<title>Kernel</title>
<link>/tags/kernel/</link>
@ -212,7 +221,7 @@
<item>
<title>Mac</title>
<link>/tags/mac/</link>
<pubDate>Thu, 21 Jan 2016 10:40:00 +0000</pubDate>