Browse Source

Initial commit

master
Kim Grytøyr 3 years ago
commit
dd5fe49983
100 changed files with 10699 additions and 0 deletions
  1. 4
    0
      .gitignore
  2. 36
    0
      README.md
  3. BIN
      aws_credentials.csv.gpg
  4. 56
    0
      config.toml
  5. 7
    0
      content/about.md
  6. 23
    0
      content/post/2014-07-08-going-static.md
  7. 53
    0
      content/post/2014-07-09-case-sensitivty-problem-with-git-in-os-x.md
  8. 39
    0
      content/post/2014-09-03-opening-sublime-text-from-the-command-line.md
  9. 162
    0
      content/post/2015-06-14-locationpicker.js.md
  10. 48
    0
      content/post/2015-06-14-using-launchctl-on-mac-osx-10-10.markdown
  11. 137
    0
      content/post/2015-06-20-my-mutt-setup.md
  12. 107
    0
      content/post/2015-06-21-mutt-tips-and-tricks.md
  13. 26
    0
      content/post/2015-06-21-note-taking-workflow-with-alfred-app.md
  14. 57
    0
      content/post/2015-08-09-basic-usage-of-git-svn.md
  15. 29
    0
      content/post/2015-08-09-deleteing-rows-with-a-left-join-in-mysql.markdown
  16. 27
    0
      content/post/2015-08-09-useful-git-tips.md
  17. 50
    0
      content/post/2016-01-21-creating-a-bootable-usb-stick-on-os-x.md
  18. 48
    0
      content/post/2016-01-21-trouble-booting-newer-linux-kernels-on-asus-vivopc-vm42.md
  19. 16
    0
      content/post/2016-01-31-resizing-windows-on-linux.md
  20. 11
    0
      content/post/2016-10-28-useful-vim-plugins.md
  21. 13
    0
      content/post/2017-04-13-moving-to-hugo.md
  22. 30
    0
      content/post/3D-book-model.md
  23. 33
    0
      deploy.sh
  24. 269
    0
      public/2014/07/08/going-static/index.html
  25. 307
    0
      public/2014/07/09/case-sensitivty-problem-with-git-in-os-x/index.html
  26. 292
    0
      public/2014/09/03/opening-sublime-text-from-the-command-line/index.html
  27. 431
    0
      public/2015/06/14/locationpicker.js/index.html
  28. 292
    0
      public/2015/06/14/using-launchctl-on-mac-osx-10-10/index.html
  29. 358
    0
      public/2015/06/21/mutt-tips-and-tricks/index.html
  30. 314
    0
      public/2015/08/09/basic-usage-of-git-svn/index.html
  31. 280
    0
      public/2015/08/09/deleteing-rows-with-a-left-join-in-mysql/index.html
  32. 274
    0
      public/2015/08/09/useful-git-tips/index.html
  33. 310
    0
      public/2016/01/21/creating-a-bootable-usb-stick-on-os-x/index.html
  34. 296
    0
      public/2016/01/21/trouble-booting-newer-linux-kernels-on-asus-vivopc-vm42/index.html
  35. 261
    0
      public/2016/01/31/resizing-windows-on-linux/index.html
  36. 186
    0
      public/404.html
  37. 245
    0
      public/about/index.html
  38. BIN
      public/assets/kims.jpg
  39. BIN
      public/assets/mutt-sidebar-patch.png
  40. 59
    0
      public/categories/index.xml
  41. 177
    0
      public/categories/posts-development/index.html
  42. 81
    0
      public/categories/posts-development/index.xml
  43. 1
    0
      public/categories/posts-development/page/1/index.html
  44. 137
    0
      public/categories/posts-email/index.html
  45. 25
    0
      public/categories/posts-email/index.xml
  46. 1
    0
      public/categories/posts-email/page/1/index.html
  47. 145
    0
      public/categories/posts-linux/index.html
  48. 35
    0
      public/categories/posts-linux/index.xml
  49. 1
    0
      public/categories/posts-linux/page/1/index.html
  50. 145
    0
      public/categories/posts/index.html
  51. 39
    0
      public/categories/posts/index.xml
  52. 1
    0
      public/categories/posts/page/1/index.html
  53. 137
    0
      public/categories/projects/index.html
  54. 30
    0
      public/categories/projects/index.xml
  55. 1
    0
      public/categories/projects/page/1/index.html
  56. 107
    0
      public/css/highlight.css
  57. 25
    0
      public/css/monosocialiconsfont.css
  58. 670
    0
      public/css/style.css
  59. BIN
      public/favicon.png
  60. BIN
      public/fonts/MonoSocialIconsFont-1.10.eot
  61. BIN
      public/fonts/MonoSocialIconsFont-1.10.otf
  62. 1013
    0
      public/fonts/MonoSocialIconsFont-1.10.svg
  63. BIN
      public/fonts/MonoSocialIconsFont-1.10.ttf
  64. BIN
      public/fonts/MonoSocialIconsFont-1.10.woff
  65. 18
    0
      public/fonts/icons.svg
  66. BIN
      public/fonts/icons.ttf
  67. BIN
      public/fonts/icons.woff
  68. BIN
      public/images/3D-book/Book1.png
  69. BIN
      public/images/3D-book/Book2.png
  70. BIN
      public/images/3D-book/PaperPhoto.jpeg
  71. BIN
      public/images/avatar.png
  72. BIN
      public/images/avatar@2x.png
  73. BIN
      public/images/avatar_old.png
  74. BIN
      public/images/favicon.ico
  75. 217
    0
      public/index.html
  76. 180
    0
      public/index.xml
  77. 1
    0
      public/js/highlight.js
  78. 36
    0
      public/js/main.js
  79. 1
    0
      public/page/1/index.html
  80. 177
    0
      public/page/2/index.html
  81. 314
    0
      public/post/3d-model-of-a-book/index.html
  82. 218
    0
      public/post/index.html
  83. 171
    0
      public/post/index.xml
  84. 265
    0
      public/post/new-website-platform/index.html
  85. 1
    0
      public/post/page/1/index.html
  86. 170
    0
      public/post/page/2/index.html
  87. 318
    0
      public/sitemap.xml
  88. 137
    0
      public/tags/3d-book/index.html
  89. 26
    0
      public/tags/3d-book/index.xml
  90. 1
    0
      public/tags/3d-book/page/1/index.html
  91. 137
    0
      public/tags/3d/index.html
  92. 26
    0
      public/tags/3d/index.xml
  93. 1
    0
      public/tags/3d/page/1/index.html
  94. 137
    0
      public/tags/aws/index.html
  95. 25
    0
      public/tags/aws/index.xml
  96. 1
    0
      public/tags/aws/page/1/index.html
  97. 137
    0
      public/tags/blender/index.html
  98. 26
    0
      public/tags/blender/index.xml
  99. 1
    0
      public/tags/blender/page/1/index.html
  100. 0
    0
      public/tags/boot/index.html

+ 4
- 0
.gitignore View File

@@ -0,0 +1,4 @@
.DS_Store
.sync.log
.changed-files
.paths

+ 36
- 0
README.md View File

@@ -0,0 +1,36 @@
# kim.grytoyr.io
My personal website.

## Setup
1. Install [Hugo](https://gohugo.io/)
2. Install Amazon Web Services CLI ([Windows instructions](http://docs.aws.amazon.com/cli/latest/userguide/awscli-install-windows.html))
```bash
pip install --upgrade --user awscli
```

3. Add aws executable to `$PATH`:
[Linux](http://docs.aws.amazon.com/cli/latest/userguide/awscli-install-linux.html#awscli-install-linux-path),
[Mac](http://docs.aws.amazon.com/cli/latest/userguide/cli-install-macos.html#awscli-install-osx-path),
[Windows](http://docs.aws.amazon.com/cli/latest/userguide/awscli-install-windows.html#awscli-install-windows-path)
4. Decrypt AWS credentials
5. Authenticate with AWS
```bash
aws configure # enter credentials, default region eu-central-1
aws configure set preview.cloudfront true # enable cloudfront cli support
```

## Usage
Build the site:
```
hugo
```

Run server (and watch for changes):
```
hugo server -w
```

Deploy new version:
```
./deploy.sh
```

BIN
aws_credentials.csv.gpg View File


+ 56
- 0
config.toml View File

@@ -0,0 +1,56 @@
# Site settings
baseurl = "/"
themesDir = "./themes"
languageCode = "en-us"
title = "Kim Grytøyr"
theme = "hugo-cactus-theme"

# Enter your tracking code to enable Google Analytics
googleAnalytics = ""

# Disable comments by leaving disqusShortname empty
disqusShortname = ""

[params]
name = "Kim Grytøyr"
description = "Personal website for Kim Grytøyr."
bio = "Programmer - Tech enthusiast"
# Enter optionally your twitter account
twitter = "kimgrytoyr"
enableRSS = true

# Integrate Javascript files or stylesheets by adding the url to the external assets or by
# linking local files with their path relative to the static folder, e.g. "css/styles.css"
customCSS = []
customJS = []

# The variables below are optionally too and can be used to
# translate or customize each string of the theme.

# Navigation links
home = ""
about = ""
subscribe = ""
# Pagination links
olderPosts = ""
newerPosts = ""
readMore = ""
copyright = ""
# Sharing options and author information in posts
aboutAuthor = "A guy."
tweet = ""
share = ""
# 404 page
title404 = ""
subtitle404 = ""

# Choose a font for the social icons in the footer. Either "mono-social" or "font-awesome"
iconFont = "mono-social"
# The social icons can be styled differently if you use mono as font - circle, rounded, or empty
socialIconStyle = "circle"

# Add additional social link entries underneath
[social]
twitter = "https://www.twitter.com/kimgrytoyr"
facebook = "https://www.facebook.com/kimgrytoyr"
github = "https://www.github.com/kimgrytoyr"

+ 7
- 0
content/about.md View File

@@ -0,0 +1,7 @@
+++
date = "2017-04-13T01:28:48+02:00"
description = "About me and this site."
title = "About"
+++

You are now viewing my personal website. Not much to say about it.

+ 23
- 0
content/post/2014-07-08-going-static.md View File

@@ -0,0 +1,23 @@
---
categories: posts
date: 2014-07-08T23:13:00Z
title: Going static
url: /2014/07/08/going-static/
tags:
- jekyll
- static
---

My personal homepage has been powered by [Wordpress](https://wordpress.org) for several years. There's nothing wrong with Wordpress, it's a mature blogging platform with a plethora of plugins and themes to choose from. Nevertheless, lately I've been wanting to use a static site generator for my personal homepage. Here are some of the reasons why:

* I want to use Markdown
* I want to use my favorite editor when writing
* I can easily store my homepage source in a Git repository or in Dropbox
* I can easily host it anywhere

Now, most of these things can also be accomplished using Wordpress, but I find the concept of using a static site generator quite interesting, so I've decided to give it a go.

I ended up with [Jekyll](http://jekyllrb.com). It's a static site generator written in Ruby, and it seems to be very flexible and quite easy to configure and use. My homepage is now hosted as a Github Page, which means that all of the contents are stored in a public Git repository.

Come back later to learn more about my experience with using Jekyll, as I'll try to post useful articles about how I'm using it.


+ 53
- 0
content/post/2014-07-09-case-sensitivty-problem-with-git-in-os-x.md View File

@@ -0,0 +1,53 @@
---
categories: posts development
date: 2014-07-09T02:18:36Z
tags:
- git
- mac
- case-sensitivity
- disk image
title: Case-sensitivity problem with Git in OS X
url: /2014/07/09/case-sensitivty-problem-with-git-in-os-x/
---

I've several times experienced problems with files and folders having incorrect case in Git repositories in OS X, so I decided to gather some possible fixes and solutions to this problem. If you have any suggestions or comments, please consider sharing it with me in a comment.

## Hacks

First off, here's a solution published at [Coderwall.com](https://coderwall.com/p/mgi8ja):

{{< highlight bash >}}
git mv filename filename_tmp
git mv filename_tmp Filename
git commit -m "Set correct case for filename"
{{< / highlight >}}

The author mentions that this is a hack and that it could possibly mess up other users' repositories, and that a `git pull` by other users won't include this change.

In a comment to that article, a user suggests the following approach instead:

{{< highlight bash >}}
git mv --force filename Filename
git commit -m "Set correct case for filename"
{{< / highlight >}}

According to the comment, a `git pull` would now rename the file for other OS X users as well.

---

## A permanent fix

As mentioned in both the article at [Coderwall.com](https://coderwall.com/p/mgi8ja), and by several users in this [Stackexchange post](http://stackoverflow.com/questions/8904327/case-sensitivity-in-git), OS X's filesystem uses a *case-preserving* format, not a *case-sensitive* format. There are ways to get around this when working with a repository, though. Both articles suggests creating a **disk image** with a *case-sensitive* format, more specifically the **Mac OS Extended (Case-sensitive, Journaled)** format.

Here's a slightly rewritten version of the step-by-step list found in the article at [Coderwall.com](https://coderwall.com/p/mgi8ja), explaining how to create such a disk image:

1. Launch Disk Utility
2. Choose "New Image"
3. Enter a name for your volume, e.g "Workspace"
4. Set the size to something that will most likely fit your needs
5. Select **Mac OS Extended (Case-sensitive, Journaled)** in "Format".
6. Select "Single Partition - Apple Partition Map" in "Partitions"
7. Ensure "Sparse bundle disk image" is set in "Image Format".
8. Save it somewhere on your hard drive

The final step is to move any Git repositories to this new disk image. Any problems you've had with case-sensitivity will now be history.

+ 39
- 0
content/post/2014-09-03-opening-sublime-text-from-the-command-line.md View File

@@ -0,0 +1,39 @@
---
categories: posts development
date: 2014-09-03T20:53:36Z
tags:
- sublime text
- mac
- command lin
- quick tip
title: Opening Sublime Text from the command line
url: /2014/09/03/opening-sublime-text-from-the-command-line/
---

I'm using [Sublime Text 3 beta](http://www.sublimetext.com/3) as my text editor. It's fast and lightweight, but at the same time it's very powerful.

Here's how you can open Sublime Text from the command line:

{{< highlight bash >}}
ln -s /Applications/Sublime\ Text.app/Contents/SharedSupport/bin/subl /usr/local/bin/subl
{{< / highlight >}}

(if you're using Sublime Text 2, just replace the path in the first argument)

If you would rather like to use another name for the command that opens Sublime Text, just change the last part (`subl`) of this command to whatever you want.

For this to work you must have `/usr/local/bin` in your $PATH environment variable. To check if it's already there, type this into your command line:

{{< highlight bash >}}
echo $PATH | grep -q "/usr/local/bin"
{{< / highlight >}}

If nothing is returned, you must add `/usr/local/bin` to $PATH. I'm not going to cover how you do this, because there are probably hundreds of other sites that does.

When everything is set up, you can type any of the following in your terminal:

{{< highlight bash >}}
subl <filename> # Opens a file
subl <foldername> # Opens a folder
subl . # Opens the current folder
{{< / highlight >}}

+ 162
- 0
content/post/2015-06-14-locationpicker.js.md View File

@@ -0,0 +1,162 @@
---
categories: projects
date: 2015-06-14T16:40:00Z
tags:
- javascript
- geodecoding
title: locationpicker.js
url: /2015/06/14/locationpicker.js/
---

locationpicker.js is a simple-to-use jQuery plugin that allows you to select a location on a map and receive the coordinates using a callback function. It also supports searching for a location based on an address.

## Repository
To download the latest version of locationpicker.js, visit the repository:

[https://bitbucket.org/kimgrytoyr/locationpicker.js/src](https://bitbucket.org/kimgrytoyr/locationpicker.js/src)

## Examples
Here are two live examples of how locationpicker.js works.

[Modal window (with address search)](http://dev.kimgrytoyr.com/locationpicker.js/example/)

[Fullscreen](http://dev.kimgrytoyr.com/locationpicker.js/example/index_fullscreen.html)

## Requirements
locationpicker.js requires [jQuery](http://jquery.com/) and the [Google Maps API](https://www.google.com/intx/en_uk/work/mapsearth/products/mapsapi.html) to work.

## Usage
These are the scripts you need to include in your HTML file:

{{< highlight html >}}
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.min.js"></script>
<script src="//maps.google.com/maps/api/js?sensor=false&libraries=places"></script>
<script src="js/locationpicker.js"></script>
{{< / highlight >}}

In addition, you'll need to insert a container that will hold the actual map from Google Maps:

{{< highlight html >}}
<div id="myMap"></div>
{{< / highlight >}}

The map container can be styled using CSS.

The last thing you need to do is to load the locationpicker.js plugin:

{{< highlight html >}}
<script>
$('#myMap').locationpicker({ options });
</script>
{{< / highlight >}}

## Options
You can configure locationpicker.js with a few options. Here are the defaults:

{{< highlight js >}}
location: {
latitude: 69.675366,
longitude: 18.975428
},
minRadius: 15,
maxRadius: 300,
radius: 150,
zoom: 15,
zoomLevelAfterAddressResult: 15,
markerTitle: "Dra markøren til uteposten",
draggable: true,
clickable: true,
mapType: google.maps.MapTypeId.NORMAL,
mapTypeControl: true,
zoomControl: true,
panControl: true,
streetViewControl: false,
circleOptions: {
strokeColor: "#0000FF",
strokeOpacity: 0.45,
strokeWeight: 2,
fillColor: "#0000FF",
fillOpacity: 0.10,
editable: true
},
afterLoad: function(currentLocation, radius) {},
afterChange: function(currentLocation, radius) {},
{{< / highlight >}}

**location { latitude, longitude }** (default: 69.675366, 18.975428)
The coordinates that will be loaded when the map is first displayed.

**minRadius** (default: 15)
The minimum radius (in meters) that the user can set.

**maxRadius** (default: 300)
The maximum radius (in meters) that the user can set.

**radius** (default: 150)
The radius (in meters) that will be used when the map is first displayed.

**zoom** (default: 15)
The zoom level that will be used when the map is first displayed.

**zoomLevelAfterAddressResult** (default: same as `zoom`)
After a successful address search, the map's zoom level will be reset to the value of this parameter. To disable this behavior, set the value to `false`.

**draggable** (default: true)
If set to false, dragging the map to pan will not be possible.

**clickable** (default: true)
If set to true, the user will be able to change location only by clicking on the map. This will also change the location when double clicking to zoom in, so you can consider setting it to false.

**mapType** (default: google.maps.MapTypeId.HYBRID)
The map type to use. Valid options:

* google.maps.MapTypeId.ROADMAP (normal map)
* google.maps.MapTypeId.SATELITTE (satellite map)
* google.maps.MapTypeId.HYBRID (normal + satellite)
* google.maps.MapTypeId.TERRAIN (shows terrain info)

**mapTypeControl** (default: true)
If set to false, the user will not be able to change the mapType.

**zoomControl** (default: true)
If set to false, the zoom controls will be hidden.

**panControl** (default: true)
If set to false, the pan controls will be hidden.

**streetViewControl** (default: false)
If set to true, street view control will be shown.

**circleOptions { .. }**
Options:
* strokeColor: The color of the stroke around the radius circle.
* strokeOpacity: The opacity of the stroke around the radius circle
* strokeWeight: The weight/width of the stroke around the radius circle
* fillColor: The color of the background fill of the radius circle
* fillOpacity: The opacity of the background fill of the radius circle
* editable: true|false (true will allow the user to change radius size by dragging the edges of the radius circle)

**markerTitle** (default: Dra markøren)
The title that will be displayed when the mouse is hovered over the marker.

**afterLoad:** function(currentLocation, radius)
A callback function that is called after the initial load of the map. `currentLocation` is an object with the properties `latitude` and `longitude`. `radius` contains the current radius.


**afterChange:** function(currentLocation, radius)
A callback function that is called every time the location or radius changes. `currentLocation` is an object with the properties `latitude` and `longitude`. `radius` contains the current radius.

## Address search
The plugins also supports searching for a location by providing the address. Here's an example of how to do that:

{{< highlight js >}}
$('#myMap').locationpicker('address', 'Karl Johans gate 1, Oslo, Norway', function(e) {
if (e.noResults) {
// No results found, alert the user.
}
});
{{< / highlight >}}

If Google Maps' geocoder is able to find a location, the first location returned from Google will be selected in the map. If not, the object `e` will have a property called `noResults` with the value `true`.

__Note:__ If a location is found, the map's zoom level will be reset to the value provided in the config parameter `zoomLevelAfterAddressResult` if it's not set to `false`.

+ 48
- 0
content/post/2015-06-14-using-launchctl-on-mac-osx-10-10.markdown View File

@@ -0,0 +1,48 @@
---
categories: posts development
date: 2015-06-14T15:26:36Z
published: true
tags:
- mac
- command line
title: Using launchctl on Mac OSX 10.10 to run a script periodically
url: /2015/06/14/using-launchctl-on-mac-osx-10-10/
---

Lately I've been playing around with [mutt](http://www.mutt.org/), a _"small but
powerful text-based email client for Unix operating systems"_ and
[offlineimap](http://offlineimap.org/), a software that downloads your mailbox
as a local Maildir.

After I finally got everything set up (easier said than done), I needed a way to
make offlineimap synchronize my mailbox periodically. Apple recommends using __launchctl__
instead of crontab. The following example shows how to run __offlineimap__ in quiet mode every two minutes:

{{< highlight xml >}}
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>com.kimgrytoyr.offlineimap.plist</string>
<key>ProgramArguments</key>
<array>
<string>/usr/local/bin/offlineimap</string>
<string>-u</string>
<string>quiet</string>
</array>
<key>StartInterval</key>
<integer>120</integer>
</dict>
</plist>
{{< / highlight >}}

This file is basically an XML file, but the extension you must use is `.plist`. You would typically call it something like _com.yourname.scriptname.plist_. Place it in the folder `~/Library/LaunchAgents/`, and make sure you replace _yourname_ and _scriptname_ with something relevant.

When you've saved the file to the specified location, type the following to load it into launchctl:

`launchctl load ~/Library/LaunchAgents/com.yourname.scriptname.plist`

If you ever need to remove it from launchctl, you can type the following:

`launchctl remove ~/Library/LaunchAgents/com.yourname.scriptname.plist`

+ 137
- 0
content/post/2015-06-20-my-mutt-setup.md View File

@@ -0,0 +1,137 @@
---
categories: posts email
date: 2015-06-20T10:18:00Z
published: false
tags:
- mutt
- email
- pgp
title: My mutt setup
url: /2015/06/20/my-mutt-setup/
---

[mutt][] is _a small but very powerful text-based mail client for Unix operating systems._ It is fast and powerful, but not very easy to install and set up on Mac OS X. This post will mainly function as a note to myself about what I did to get [mutt][], [offlineimap][] and [msmtp][] to work with Google Apps on OS X.

1. [Installation](#installation)
- [Installing Homebrew](#installing-homebrew)
- [Installing offlineimap](#installing-offlineimap)
- [Installing msmtp](#installing-msmtp)
- [Installing mutt](#installing-mutt)
2. [Configuration](#configuration)
- [Configuring offlineimap](#configuring-offlineimap)
- [Configuring msmtp](#configuring-msmtp)
- [Configuring mutt](#configuring-mutt)
3. [Useful tips for mutt](#useful-tips-for-mutt)

<a name="installation"></a>Installation
---------------------------------------
There are several components involved in my [mutt][] setup. This section will describe in detail how to install each one of them.

<a name="installing-homebrew"></a>Installing Homebrew
=====================================================
The easiest way to install [mutt][] is to use [Homebrew][] - _The missing package manager for OS X_. At the time of writing, the official documentation of Homebrew says this is the way to install it:

{{< highlight bash >}}
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
{{< / highlight >}}

> Please consult the current documentation of [Homebrew][] before installing. Also note that [Homebrew][] requires [ruby][].

<a name="installing-offlineimap"></a>Installing offlineimap
===========================================================
Once you have [Homebrew][] installed, it's time to move on to installing [offlineimap][]. [offlineimap][] is a software that lets you download your mailbox as a local Maildir folder. It basically synchronizes your mailbox to your local harddrive. This will make your email experience very fast and also lets you browse your email when being offline.

With [Homebrew][], installing [offlineimap][] is very easy:

{{< highlight bash >}}
brew install offlineimap
{{< / highlight >}}

<a name="installing-msmtp"></a>Installing msmtp
===============================================
[msmtp][] is an SMTP client that allows you to send email using your email provider's SMTP server. When you send an email, [mutt][] will trigger [msmtp][] to deliver the mail to Gmail's SMTP server.

Again, using [Homebrew][], the installation is super easy:

{{< highlight bash >}}
brew install msmtp
{{< / highlight >}}

<a name="installing-mutt"></a>Installing mutt
=============================================
Now to the more difficult part. I've struggled to install [mutt][] on Mac OS X using [Homebrew][] because of some errors saying the ncurses library is missing. Some recommend building [mutt][] against the S-Lang library instead, but this guide will explain how to build against ncurses.

Generally, you should be able to install [mutt][] using [Homebrew][], like this:

{{< highlight bash >}}
brew install mutt
{{< / highlight >}}

In my setup I've also included a nice addon: [The sidebar patch][]. This gives you a folder list on the left side of the screen, like this:

![mutt with the sidebar patch](/images/mutt-sidebar-patch.png)

To be able to install [The sidebar patch][], you need to edit the brew formula for [mutt][]:

{{< highlight bash >}}
brew edit mutt
{{< / highlight >}}

This will open an editor with the mutt formula, and you'll need to add a few lines to it. To begin with, you need to add an option called `with-sidebar-patch`, like this:

{{< highlight ruby >}}
option "with-sidebar-patch", "Apply sidebar patch" # <- Add this line
option "with-debug", "Build with debug option enabled"
option "with-trash-patch", "Apply trash folder patch"
option "with-s-lang", "Build against slang instead of ncurses"
option "with-ignore-thread-patch", "Apply ignore-thread patch"
option "with-pgp-verbose-mime-patch", "Apply PGP verbose mime patch"
{{< / highlight >}}

Then you'll need to add the actual patch information to the file. Add these lines close to the other lines looking similar:

{{< highlight ruby >}}
patch do
url "https://raw.github.com/nedos/mutt-sidebar-patch/master/mutt-sidebar.patch"
end if build.with? "sidebar-patch"
{{< / highlight >}}

Now, try installing [mutt][] using the following command:

{{< highlight bash >}}
brew install mutt --with-sidebar-patch --with-pgp-verbose-mime-patch
{{< / highlight >}}
**Note**: The `--with-pgp-verbose-mime-patch` is only necessary if you plan on using [PGP][] and want to be able to change the filename of the signature attachment.

If you get an error complaining about the missing ncurses library, you can try this before running the above command:

{{< highlight bash >}}
brew install ncurses
brew doctor
brew link ncurses
{{< / highlight >}}

If the last command fails, try this instead:

{{< highlight bash >}}
brew link ncurses --force
{{< / highlight >}}

Now, you can again try to install [mutt][] using [Homebrew][]:

{{< highlight bash >}}
brew install mutt --with-sidebar-patch --with-pgp-verbose-mime-patch
{{< / highlight >}}

Hopefully, you've now managed to install all the necessary applications needed to continue with the configuration.

<a name="configuration"></a> Configuration
------------------------------------------

[mutt]: http://www.mutt.org/
[offlineimap]: http://offlineimap.org/
[msmtp]: http://msmtp.sourceforge.net/
[Homebrew]: http://brew.sh/
[ruby]: https://www.ruby-lang.org/
[The sidebar patch]: http://www.lunar-linux.org/mutt-sidebar/
[PGP]: https://en.wikipedia.org/wiki/Pretty_Good_Privacy

+ 107
- 0
content/post/2015-06-21-mutt-tips-and-tricks.md View File

@@ -0,0 +1,107 @@
---
categories: posts email
date: 2015-06-21T00:10:00Z
published: true
tags:
- mutt
- email
- tips
title: mutt tips & tricks
url: /2015/06/21/mutt-tips-and-tricks/
---

I've been using [mutt][] [with offlineimap and msmtp](/posts/email/2015/06/20/my-mutt-setup.html) (dead link, coming soon.) for a while now, and I want to use
this post to collect some features and tips that I've found myself often searching for.

1. [Finding messages in the current folder](#finding-messages)
- [Common flags](#common-flags)
2. [Tagging messages and doing bulk actions](#tagging-messages)
- [Untagging messages](#untagging)
3. [Changing the filename of the PGP signature attachment](#changing-pgp-signature-filename)
4. ["From"-specific signatures](#from-specific-signatures)

<a name="finding-messages"></a> Finding messages in the current folder
--------------------------------------
The default keybinding for searching the current folder is `l`. After you've
entered search/limiting mode, you can use a wide variety of combinations of
flags and regular expressions to match messages:

> Note that limiting only matches the subject and the sender's name by default.

<a name="common-flags"></a>Common flags
============
`~N` New/unread messages

`~F` Flagged messages

`~B` Search the whole message, not only subject and sender's name

`~A` All messages (you can also use `all`)

See the [official mutt documentation](http://www.mutt.org/doc/manual/manual-4.html#ss4.2) for a full list of available patterns.

<a name="tagging-messages"></a>Tagging messages
----------------
A common thing to do is to tag/mark all messages meeting certain criterias.
This is very easy to do in [mutt][] using the `tag-pattern` function. By
default, this function is bound to `T` (that's shift+t). You can then use the
same flags and regular expressions as you can when limiting messages.

> tag-pattern only selects messages in the current folder/mailbox

After tagging messages, you'll most likely want to do something with them. This
is where the `tag-prefix` operator comes into play. This operator tells [mutt][]
to apply the next operation to all tagged messages. The default keybinding for
`tag-prefix` is `;` (semicolon).

Here's an example of how to tag all unread messages and mark them as read:

{{< highlight bash >}}
T # Invokes the tag-pattern function
~N # Tags all unread messages
; # tag-prefix operator, next operation will be applied to all tagged messages
W # Clear flag
N # Clear the N (unread) flag
{{< / highlight >}}

<a name="untagging"></a>Untagging messages
==========
In the beginning I often found myself searching for how to untag messages. It can be done the same as you tag messages, except that you have to use CTRL instead of SHIFT: `^t <pattern>`. To untag all messages, type `^t all`.

<a name="changing-pgp-signature-filename"></a>Changing the PGP signature attachment's filename
--------------------------------------
When using [mutt][] with PGP, the default filename of the signature attachment
is `noname`. Although this is a commonly used filename, I personally want it to
be named `signature.asc`. To be able to do this, you'll need to install [mutt][]
with the `pgp-verbose-mime-patch`. I've covered how to install [mutt][] on Mac
OS X with this patch in the post [My mutt setup](/posts/email/2015/06/20/my-mutt-setup.html) (dead link, coming soon).

After you've installed [mutt][] with this patch, it's very simple to change the
signature attachment's filename. All you have to do is add the following line to
your `.muttrc`:

{{< highlight bash >}}
set pgp_mime_signature_filename = 'signature.asc'
{{< / highlight >}}

<a name="from-specific-signatures"></a>"From"-specific signatures
------------------------------------
I have different email addresses based on what "role" I have. One (with several aliases) is for personal stuff, one is for work related stuff and one is for my freelance company. I'd like [mutt][] to change my signature based on which address I send the email from. This is also fairly easy to accomplish. Just add the following line to `.muttrc` for each account you would like a specific signature for:

{{< highlight bash >}}
send-hook "~f from@address1.com" 'set signature=~/.mutt/signature_for_address1'
{{< / highlight >}}

This will tell [mutt][] that *"whenever I send a message from
`from@address1.com`, use the signature in the file
`~/.mutt/signature_for_address1`"*.

That's it for now. I'll continue to add useful mutt tips to this post.

[mutt]: http://www.mutt.org/
[offlineimap]: http://offlineimap.org/
[msmtp]: http://msmtp.sourceforge.net/
[Homebrew]: http://brew.sh/
[ruby]: https://www.ruby-lang.org/
[The sidebar patch]: http://www.lunar-linux.org/mutt-sidebar/
[PGP]: https://en.wikipedia.org/wiki/Pretty_Good_Privacy

+ 26
- 0
content/post/2015-06-21-note-taking-workflow-with-alfred-app.md View File

@@ -0,0 +1,26 @@
---
categories: posts productivity
date: 2015-06-21T13:30:00Z
published: false
tags:
- alfredapp
- productivity
- notes
- workflow
title: Note-taking workflow with Alfred App
url: /2015/06/21/note-taking-workflow-with-alfred-app/
---

I'm using [Alfred App][] on my Macbook Air and my iMac at work quite heavily.
There are many nice things you can do with [Alfred App][] which I'm not going
to cover in this post, but one of the most common use-cases for me is to quickly
take notes. I have two different workflows for note-taking:

1. Take a quick note and append it to a Notes-file
2. Create a new Markdown-file in my Dropbox folder and open it for editing

## Take a quick note and append it to a Notes-file
I use this workflow for quickly noting down things I want to remember and keep
for reference. I **don't** use this for todos.

[Alfred App]: http://www.alfredapp.com/

+ 57
- 0
content/post/2015-08-09-basic-usage-of-git-svn.md View File

@@ -0,0 +1,57 @@
---
categories: posts development
date: 2015-08-09T15:13:36Z
published: true
tags:
- git
- svn
- git-svn
title: Basic usage of git-svn
url: /2015/08/09/basic-usage-of-git-svn/
---

This is a small guide I wrote for my own convenience when I recently was converting an SVN repository to a Git repository. I've published it here so that I can easily look up the things I need to remember.

I've found most of these examples in the excellent official [git-svn documentation](http://git-scm.com/docs/git-svn).

## Cloning the SVN repository
{{< highlight bash >}}
git svn clone <repo-url>
{{< / highlight >}}

## Adding another remote
{{< highlight bash >}}
git remote add <remote-name> <remote-url>
{{< / highlight >}}

## Fetching and rebasing changes from SVN
{{< highlight bash >}}
git svn fetch && git svn rebase
{{< / highlight >}}
Note that the git-svn documentation has a section discussing rebase vs pull/merge:

> Prefer to use git svn rebase or git rebase, rather than git pull or git merge to synchronize unintegrated commits with a git svn branch. Doing so will keep the history of unintegrated commits linear with respect to the upstream SVN repository and allow the use of the preferred git svn dcommit subcommand to push unintegrated commits back into SVN.

## Doing work and pushing to SVN
{{< highlight bash >}}
git add <file>
git commit -m "<commit message>"
git svn dcommit # This will push your changes to the SVN repository
{{< / highlight >}}

## Pushing to other remotes
{{< highlight bash >}}
git push <remote-name>
{{< / highlight >}}

## See what will be pushed to SVN
{{< highlight bash >}}
git diff git-svn HEAD # Assuming your remote SVN branch is called git-svn
{{< / highlight >}}
[http://stackoverflow.com/a/9776318/1094451](http://stackoverflow.com/a/9776318/1094451)

{{< highlight bash >}}
git svn dcommit --dry-run
{{< / highlight >}}
[http://stackoverflow.com/a/6040113/1094451](http://stackoverflow.com/a/6040113/1094451)


+ 29
- 0
content/post/2015-08-09-deleteing-rows-with-a-left-join-in-mysql.markdown View File

@@ -0,0 +1,29 @@
---
categories: posts development
date: 2015-08-09T11:28:36Z
published: true
tags:
- mysql
- sql
- database
title: Deleting rows with a LEFT JOIN in MySQL
url: /2015/08/09/deleteing-rows-with-a-left-join-in-mysql/
---

This is something I don't do that often, and I always forget the correct syntax. Thus this post.

Let's say you have a table **images** and a table **users**. Now you want to delete all rows in table **images** that are associated with rows in the table **users** that are marked as deleted.

First, I usually do a visual inspection of the rows that will be deleted:

{{< highlight sql >}}
SELECT i.* FROM images i LEFT JOIN users u ON i.user_id = u.id WHERE u.deleted = 1;
{{< / highlight >}}

The rows returned by this query are the rows that will be deleted when you run the following query:

{{< highlight sql >}}
DELETE i FROM images i LEFT JOIN users u ON i.user_id = u.id WHERE u.deleted = 1;
{{< / highlight >}}

They key part here is to specify which table you want to delete from. In this case it's the table `i`, which is the `images` table.

+ 27
- 0
content/post/2015-08-09-useful-git-tips.md View File

@@ -0,0 +1,27 @@
---
categories: posts development
date: 2015-08-09T17:03:00Z
published: true
tags:
- git
- tips
title: Useful git tips
url: /2015/08/09/useful-git-tips/
---

This is a collection of useful git commands, aliases, tips and tricks that I've come across or been using. Feel free to contribute to this collection by adding a comment below.

## Aliases for ignoring files
To prevent changes in already-commited files from being commited, you can update your index with the `--assume-unchaged` flag for the files that you don't want to commit. Here are a couple of useful aliases for dealing with this.

{{< highlight ini >}}
ignore = !git update-index --assume-unchanged
unignore = !git update-index --no-assume-unchanged
ignored = !git ls-files -v | grep ^[a-z]
{{< / highlight >}}

With these aliases you can use `git ignore <file>` to ignore a file, `git unignore <file>` to unignore a file, and `git ignored` to list files that are currently being ignored.

**Warning:** Adding a file directly with `git add <file>` will add the file regardless of this flag.

Source: [http://gitready.com/intermediate/2009/02/18/temporarily-ignoring-files.html](http://gitready.com/intermediate/2009/02/18/temporarily-ignoring-files.html) (comments)

+ 50
- 0
content/post/2016-01-21-creating-a-bootable-usb-stick-on-os-x.md View File

@@ -0,0 +1,50 @@
---
categories: posts
date: 2016-01-21T10:40:00Z
published: true
tags:
- usb
- boot
- mac
- tips
title: Creating a bootable USB stick on OS X
url: /2016/01/21/creating-a-bootable-usb-stick-on-os-x/
---

Here's a simple way to create a bootable USB stick from a downloaded .ISO file on OS X.

## Convert ISO to IMG
Open the terminal and type the following command:

{{< highlight bash >}}
hdiutil convert -format UDRW -o target.img source.iso
{{< / highlight >}}

Remember to replace the paths in the previous example.

## Transfer to USB stick

**Warning:** This will erase all data on your USB stick.

First, find the correct device node:

{{< highlight bash >}}
diskutil list
{{< / highlight >}}

After you have successfully identified your USB stick, unmount the disk (replace *N* with the disk number):

{{< highlight bash >}}
diskutil unmountDisk /dev/diskN
{{< / highlight >}}

Finally, transfer the image to the USB stick (again, replace *N* with the disk number):

{{< highlight bash >}}
sudo dd if=target.img of=/dev/rdiskN bs=1m
{{< / highlight >}}

After a short while, depending on the image size, your USB stick will be ready to use as a bootable media.


Source: [http://www.ubuntu.com/download/desktop/create-a-usb-stick-on-mac-osx](http://www.ubuntu.com/download/desktop/create-a-usb-stick-on-mac-osx)

+ 48
- 0
content/post/2016-01-21-trouble-booting-newer-linux-kernels-on-asus-vivopc-vm42.md View File

@@ -0,0 +1,48 @@
---
categories: posts linux
date: 2016-01-21T10:40:00Z
published: true
tags:
- linux
- boot
- kernel
title: Trouble booting newer Linux kernels on Asus VivoPC VM42
url: /2016/01/21/trouble-booting-newer-linux-kernels-on-asus-vivopc-vm42/
---

I recently bought an [Asus VivoPC VM42](https://www.asus.com/Mini-PCs/VivoPC_VM42/)
because I wanted a small and simple desktop computer to play around with different
Linux distros. I was able to install Ubuntu 14.04 without problems, but when booting
it for the first time it got stuck with a message from NMI Watchdog saying that
CPU#1 had been stuck for 22 seconds.

I also tried booting Linux Mint and Fedora from a Live USB, but the same thing
happened.

The only thing that was working was booting Ubuntu with kernel 3.19.0-25.

I tried the following:

1. Booting with `nomodeset`
2. Booting with `noacpi`
3. Updating the BIOS from version 1008 to 1203
4. Using legacy BIOS instead of UEFI
5. Disabling Secure Boot and Fast Boot
6. A bunch of other things


Finally, after several days of searching for a solution, I tried disabling all
the on-board controllers:

* HD Audio
* WLAN
* Bluetooth

Now I could boot everything, including newer kernels, Linux Mint and Fedora. I have yet to figure out which one was causing the problem, but I will update this post whenever I do.

**Update:** Turned out it was the WLAN controller that caused this issue.

I should of course have tried this at an earlier stage, but since the older version
of the kernel was working, I figured it couldn't be because of those BIOS settings.

I was wrong.

+ 16
- 0
content/post/2016-01-31-resizing-windows-on-linux.md View File

@@ -0,0 +1,16 @@
---
categories: posts linux
date: 2016-01-31T10:18:36Z
tags:
- linux
title: Resizing windows on linux
url: /2016/01/31/resizing-windows-on-linux/
---

Here’s an easy way to resize windows on Fedora 23 and probably most other Linux distributions:

1. Hold ALT and right click (and hold) with your mouse
2. Move the mouse to resize

Using this method the window will resize as if you hovered your mouse over the nearest corner and resized it manually.


+ 11
- 0
content/post/2016-10-28-useful-vim-plugins.md View File

@@ -0,0 +1,11 @@
---
categories: posts vim development
date: 2016-10-28T07:40:00Z
draft: true
tags:
- vim
- plugins
title: Useful Vim plugins
url: /2016/10/28/useful-vim-plugins/
---


+ 13
- 0
content/post/2017-04-13-moving-to-hugo.md View File

@@ -0,0 +1,13 @@
+++
date = "2017-04-13T01:45:56+02:00"
description = "Hugo, S3 and Cloudfront."
title = "New website platform"
tags = [ "hugo", "jekyll", "aws", "s3", "cloudfront", "static" ]
slug = "new-website-platform"
+++

My website was previously built using [Jekyll](https://jekyllrb.com/) and hosted on [Netlify](https://www.netlify.com/). Because of various problems I've had with my Jekyll setup, I decided to go for another static site generator: [Hugo](https://gohugo.io/).

I have been very happy with Netlify. Easy to deploy, integration with Github repos and automatic SSL certificates from [Let's Encrypt](https://letsencrypt.org/) - all for free! Despite all this, I wanted to become more familiar with [Amazon Web Services (AWS)](https://aws.amazon.com/) and all their products, so I changed my setup so that this site is now hosted in an S3 bucket and distributed using Cloudfront.

So far I'm very happy with the new setup. Hugo is lightning fast and easy to configure. I've created a simple bash script that automates the process of building the site, deploying it to S3 and invalidating the Cloudfront cache.

+ 30
- 0
content/post/3D-book-model.md View File

@@ -0,0 +1,30 @@
+++
date = "2017-04-14T00:16:56+02:00"
description = "Learning how to use Blender"
title = "3D model of a book"
tags = [ "3D", "3D-book", "blender" ]
slug = "3D-model-of-a-book"
+++

I am currently learning how to create 3D models in Blender. My first creation is a simple book.

I started out with a simple cube and transformed it into the book in the pictures. At the moment, the book is just one object.
I'm planning on splitting it into several objects and at some point make an animation of opening the book.

{{< figure src="/images/3D-book/Book1.png" title="3D model of a book, top view" >}}
{{< figure src="/images/3D-book/Book2.png" title="3D model of a book, bottom view" >}}

The cover of the book is textured with a simple image I made in Photoshop. The pages are textured with a photo
I took of a real book:
{{< figure src="/images/3D-book/PaperPhoto.jpeg" title="The origin of the texture used for the pages" >}}

I am not planning to use this model for anything, my only objective is to learn how to use Blender. I will continue to work on
this book, and I have a list of things I want to accomplish:

- Smoothing of the back of the book
- Adding some text using a texture and UV mapping
- Splitting it into several objects
- Make the cover texture look more natural
- Create an animation of opening the book

I may post an updated version of the model at some point.

+ 33
- 0
deploy.sh View File

@@ -0,0 +1,33 @@
#!/bin/bash

echo "Cleaning public folder.."
rm -rf ./public

echo "Building website.."
hugo >/dev/null

echo "Deploying.."
aws s3 sync ./public s3://kim-grytoyr-io --delete --size-only > .sync.log

echo "Creating list of changed files.."
> .changed-files
> .paths

while read -r line
do
sed 's/^.*kim-grytoyr-io//' | tr -d '[:blank:]' > .changed-files
done < .sync.log

tr '\r\n' ' ' < .changed-files > .paths

if [ ! -s .paths ]
then
echo "No changes, nothing to invalidate.."
else
echo "Invalidating cache.."
aws cloudfront create-invalidation --distribution-id E1B9KWNF6O30FL --paths $(cat .paths) >/dev/null
fi

echo "Deployed!"



+ 269
- 0
public/2014/07/08/going-static/index.html View File

@@ -0,0 +1,269 @@
<!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.20" />
<title>Going static &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">

<link href="/index.xml" rel="alternate" type="application/rss+xml" title="Kim Grytøyr" />

<meta property="og:title" content="Going static" />
<meta property="og:description" content="My personal homepage has been powered by Wordpress for several years. There&rsquo;s nothing wrong with Wordpress, it&rsquo;s a mature blogging platform with a plethora of plugins and themes to choose from. Nevertheless, lately I&rsquo;ve been wanting to use a static site generator for my personal homepage. Here are some of the reasons why:
I want to use Markdown I want to use my favorite editor when writing I can easily store my homepage source in a Git repository or in Dropbox I can easily host it anywhere Now, most of these things can also be accomplished using Wordpress, but I find the concept of using a static site generator quite interesting, so I&rsquo;ve decided to give it a go." />
<meta property="og:type" content="article" />
<meta property="og:url" content="/2014/07/08/going-static/" />



<meta property="article:published_time" content="2014-07-08T23:13:00&#43;00:00"/>
<meta property="article:modified_time" content="2014-07-08T23:13:00&#43;00:00"/>











<meta itemprop="name" content="Going static">
<meta itemprop="description" content="My personal homepage has been powered by Wordpress for several years. There&rsquo;s nothing wrong with Wordpress, it&rsquo;s a mature blogging platform with a plethora of plugins and themes to choose from. Nevertheless, lately I&rsquo;ve been wanting to use a static site generator for my personal homepage. Here are some of the reasons why:
I want to use Markdown I want to use my favorite editor when writing I can easily store my homepage source in a Git repository or in Dropbox I can easily host it anywhere Now, most of these things can also be accomplished using Wordpress, but I find the concept of using a static site generator quite interesting, so I&rsquo;ve decided to give it a go.">


<meta itemprop="dateModified" content="2014-07-08T23:13:00&#43;00:00" />
<meta itemprop="wordCount" content="193">



<meta itemprop="keywords" content="posts,posts-development,posts-email,posts-linux,projects,3d,3d-book,aws,blender,boot,case-sensitivity,cloudfront,command-lin,command-line,database,disk-image,email,geodecoding,git,git-svn,hugo,javascript,jekyll,kernel,linux,mac,mutt,mysql,quick-tip,s3,sql,static,sublime-text,svn,tips,usb," />


<meta name="twitter:card" content="summary"/>



<meta name="twitter:text:title" content="Going static"/>
<meta name="twitter:title" content="Going static"/>
<meta name="twitter:description" content="My personal homepage has been powered by Wordpress for several years. There&rsquo;s nothing wrong with Wordpress, it&rsquo;s a mature blogging platform with a plethora of plugins and themes to choose from. Nevertheless, lately I&rsquo;ve been wanting to use a static site generator for my personal homepage. Here are some of the reasons why:
I want to use Markdown I want to use my favorite editor when writing I can easily store my homepage source in a Git repository or in Dropbox I can easily host it anywhere Now, most of these things can also be accomplished using Wordpress, but I find the concept of using a static site generator quite interesting, so I&rsquo;ve decided to give it a go."/>
<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>

<a class="cta" href="/index.xml">Subscribe</a>
</nav>

<section id="wrapper">
<article class="post">
<header>
<h1>Going static</h1>
<h2 class="headline">
July 8, 2014
<br>
<a href="/tags/jekyll">jekyll</a>
<a href="/tags/static">static</a>
</h2>
</header>
<section id="post-body">
<p>My personal homepage has been powered by <a href="https://wordpress.org">Wordpress</a> for several years. There&rsquo;s nothing wrong with Wordpress, it&rsquo;s a mature blogging platform with a plethora of plugins and themes to choose from. Nevertheless, lately I&rsquo;ve been wanting to use a static site generator for my personal homepage. Here are some of the reasons why:</p>

<ul>
<li>I want to use Markdown</li>
<li>I want to use my favorite editor when writing</li>
<li>I can easily store my homepage source in a Git repository or in Dropbox</li>
<li>I can easily host it anywhere</li>
</ul>

<p>Now, most of these things can also be accomplished using Wordpress, but I find the concept of using a static site generator quite interesting, so I&rsquo;ve decided to give it a go.</p>

<p>I ended up with <a href="http://jekyllrb.com">Jekyll</a>. It&rsquo;s a static site generator written in Ruby, and it seems to be very flexible and quite easy to configure and use. My homepage is now hosted as a Github Page, which means that all of the contents are stored in a public Git repository.</p>

<p>Come back later to learn more about my experience with using Jekyll, as I&rsquo;ll try to post useful articles about how I&rsquo;m using it.</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=%2f2014%2f07%2f08%2fgoing-static%2f - Going%20static 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/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>
<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>
<li>
<a href="/2016/01/21/trouble-booting-newer-linux-kernels-on-asus-vivopc-vm42/">Trouble booting newer Linux kernels on Asus VivoPC VM42<aside class="dates">Jan 21</aside></a>
</li>
<li>
<a href="/2015/08/09/useful-git-tips/">Useful git tips<aside class="dates">Aug 9</aside></a>
</li>
<li>
<a href="/2015/08/09/basic-usage-of-git-svn/">Basic usage of git-svn<aside class="dates">Aug 9</aside></a>
</li>
<li>
<a href="/2015/08/09/deleteing-rows-with-a-left-join-in-mysql/">Deleting rows with a LEFT JOIN in MySQL<aside class="dates">Aug 9</aside></a>
</li>
<li>
<a href="/2015/06/21/mutt-tips-and-tricks/">mutt tips &amp; tricks<aside class="dates">Jun 21</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 2017 Kim Grytøyr
</p>
</footer>

</section>

<script src="//ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<script src="/js/main.js"></script>
<script src="/js/highlight.js"></script>
<script>hljs.initHighlightingOnLoad();</script>





</body>
</html>

+ 307
- 0
public/2014/07/09/case-sensitivty-problem-with-git-in-os-x/index.html View File

@@ -0,0 +1,307 @@
<!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.20" />
<title>Case-sensitivity problem with Git in OS X &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">

<link href="/index.xml" rel="alternate" type="application/rss+xml" title="Kim Grytøyr" />

<meta property="og:title" content="Case-sensitivity problem with Git in OS X" />
<meta property="og:description" content="I&rsquo;ve several times experienced problems with files and folders having incorrect case in Git repositories in OS X, so I decided to gather some possible fixes and solutions to this problem. If you have any suggestions or comments, please consider sharing it with me in a comment.
Hacks First off, here&rsquo;s a solution published at Coderwall.com:
git mv filename filename_tmp git mv filename_tmp Filename git commit -m &quot;Set correct case for filename&quot; The author mentions that this is a hack and that it could possibly mess up other users&rsquo; repositories, and that a git pull by other users won&rsquo;t include this change." />
<meta property="og:type" content="article" />
<meta property="og:url" content="/2014/07/09/case-sensitivty-problem-with-git-in-os-x/" />



<meta property="article:published_time" content="2014-07-09T02:18:36&#43;00:00"/>
<meta property="article:modified_time" content="2014-07-09T02:18:36&#43;00:00"/>











<meta itemprop="name" content="Case-sensitivity problem with Git in OS X">
<meta itemprop="description" content="I&rsquo;ve several times experienced problems with files and folders having incorrect case in Git repositories in OS X, so I decided to gather some possible fixes and solutions to this problem. If you have any suggestions or comments, please consider sharing it with me in a comment.
Hacks First off, here&rsquo;s a solution published at Coderwall.com:
git mv filename filename_tmp git mv filename_tmp Filename git commit -m &quot;Set correct case for filename&quot; The author mentions that this is a hack and that it could possibly mess up other users&rsquo; repositories, and that a git pull by other users won&rsquo;t include this change.">


<meta itemprop="dateModified" content="2014-07-09T02:18:36&#43;00:00" />
<meta itemprop="wordCount" content="317">



<meta itemprop="keywords" content="posts,posts-development,posts-email,posts-linux,projects,3d,3d-book,aws,blender,boot,case-sensitivity,cloudfront,command-lin,command-line,database,disk-image,email,geodecoding,git,git-svn,hugo,javascript,jekyll,kernel,linux,mac,mutt,mysql,quick-tip,s3,sql,static,sublime-text,svn,tips,usb," />


<meta name="twitter:card" content="summary"/>



<meta name="twitter:text:title" content="Case-sensitivity problem with Git in OS X"/>
<meta name="twitter:title" content="Case-sensitivity problem with Git in OS X"/>
<meta name="twitter:description" content="I&rsquo;ve several times experienced problems with files and folders having incorrect case in Git repositories in OS X, so I decided to gather some possible fixes and solutions to this problem. If you have any suggestions or comments, please consider sharing it with me in a comment.
Hacks First off, here&rsquo;s a solution published at Coderwall.com:
git mv filename filename_tmp git mv filename_tmp Filename git commit -m &quot;Set correct case for filename&quot; The author mentions that this is a hack and that it could possibly mess up other users&rsquo; repositories, and that a git pull by other users won&rsquo;t include this change."/>
<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>

<a class="cta" href="/index.xml">Subscribe</a>
</nav>

<section id="wrapper">
<article class="post">
<header>
<h1>Case-sensitivity problem with Git in OS X</h1>
<h2 class="headline">
July 9, 2014
<br>
<a href="/tags/git">git</a>
<a href="/tags/mac">mac</a>
<a href="/tags/case-sensitivity">case-sensitivity</a>
<a href="/tags/disk-image">disk image</a>
</h2>
</header>
<section id="post-body">

<p>I&rsquo;ve several times experienced problems with files and folders having incorrect case in Git repositories in OS X, so I decided to gather some possible fixes and solutions to this problem. If you have any suggestions or comments, please consider sharing it with me in a comment.</p>

<h2 id="hacks">Hacks</h2>

<p>First off, here&rsquo;s a solution published at <a href="https://coderwall.com/p/mgi8ja">Coderwall.com</a>:</p>

<div class="highlight" style="background: #272822"><pre style="line-height: 125%"><span></span>git mv filename filename_tmp
git mv filename_tmp Filename
git commit -m <span style="color: #e6db74">&quot;Set correct case for filename&quot;</span>
</pre></div>


<p>The author mentions that this is a hack and that it could possibly mess up other users&rsquo; repositories, and that a <code>git pull</code> by other users won&rsquo;t include this change.</p>

<p>In a comment to that article, a user suggests the following approach instead:</p>

<div class="highlight" style="background: #272822"><pre style="line-height: 125%"><span></span>git mv --force filename Filename
git commit -m <span style="color: #e6db74">&quot;Set correct case for filename&quot;</span>
</pre></div>


<p>According to the comment, a <code>git pull</code> would now rename the file for other OS X users as well.</p>

<hr />

<h2 id="a-permanent-fix">A permanent fix</h2>

<p>As mentioned in both the article at <a href="https://coderwall.com/p/mgi8ja">Coderwall.com</a>, and by several users in this <a href="http://stackoverflow.com/questions/8904327/case-sensitivity-in-git">Stackexchange post</a>, OS X&rsquo;s filesystem uses a <em>case-preserving</em> format, not a <em>case-sensitive</em> format. There are ways to get around this when working with a repository, though. Both articles suggests creating a <strong>disk image</strong> with a <em>case-sensitive</em> format, more specifically the <strong>Mac OS Extended (Case-sensitive, Journaled)</strong> format.</p>

<p>Here&rsquo;s a slightly rewritten version of the step-by-step list found in the article at <a href="https://coderwall.com/p/mgi8ja">Coderwall.com</a>, explaining how to create such a disk image:</p>

<ol>
<li>Launch Disk Utility</li>
<li>Choose &ldquo;New Image&rdquo;</li>
<li>Enter a name for your volume, e.g &ldquo;Workspace&rdquo;</li>
<li>Set the size to something that will most likely fit your needs</li>
<li>Select <strong>Mac OS Extended (Case-sensitive, Journaled)</strong> in &ldquo;Format&rdquo;.</li>
<li>Select &ldquo;Single Partition - Apple Partition Map&rdquo; in &ldquo;Partitions&rdquo;</li>
<li>Ensure &ldquo;Sparse bundle disk image&rdquo; is set in &ldquo;Image Format&rdquo;.</li>
<li>Save it somewhere on your hard drive</li>
</ol>

<p>The final step is to move any Git repositories to this new disk image. Any problems you&rsquo;ve had with case-sensitivity will now be history.</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=%2f2014%2f07%2f09%2fcase-sensitivty-problem-with-git-in-os-x%2f - Case-sensitivity%20problem%20with%20Git%20in%20OS%20X 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/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>
<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>
<li>
<a href="/2016/01/21/trouble-booting-newer-linux-kernels-on-asus-vivopc-vm42/">Trouble booting newer Linux kernels on Asus VivoPC VM42<aside class="dates">Jan 21</aside></a>
</li>
<li>
<a href="/2015/08/09/useful-git-tips/">Useful git tips<aside class="dates">Aug 9</aside></a>
</li>
<li>
<a href="/2015/08/09/basic-usage-of-git-svn/">Basic usage of git-svn<aside class="dates">Aug 9</aside></a>
</li>
<li>
<a href="/2015/08/09/deleteing-rows-with-a-left-join-in-mysql/">Deleting rows with a LEFT JOIN in MySQL<aside class="dates">Aug 9</aside></a>
</li>
<li>
<a href="/2015/06/21/mutt-tips-and-tricks/">mutt tips &amp; tricks<aside class="dates">Jun 21</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 2017 Kim Grytøyr
</p>
</footer>

</section>

<script src="//ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<script src="/js/main.js"></script>
<script src="/js/highlight.js"></script>
<script>hljs.initHighlightingOnLoad();</script>





</body>
</html>

+ 292
- 0
public/2014/09/03/opening-sublime-text-from-the-command-line/index.html View File

@@ -0,0 +1,292 @@
<!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.20" />
<title>Opening Sublime Text from the command line &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">

<link href="/index.xml" rel="alternate" type="application/rss+xml" title="Kim Grytøyr" />

<meta property="og:title" content="Opening Sublime Text from the command line" />
<meta property="og:description" content="I&rsquo;m using Sublime Text 3 beta as my text editor. It&rsquo;s fast and lightweight, but at the same time it&rsquo;s very powerful.
Here&rsquo;s how you can open Sublime Text from the command line:
ln -s /Applications/Sublime\ Text.app/Contents/SharedSupport/bin/subl /usr/local/bin/subl (if you&rsquo;re using Sublime Text 2, just replace the path in the first argument)
If you would rather like to use another name for the command that opens Sublime Text, just change the last part (subl) of this command to whatever you want." />
<meta property="og:type" content="article" />
<meta property="og:url" content="/2014/09/03/opening-sublime-text-from-the-command-line/" />



<meta property="article:published_time" content="2014-09-03T20:53:36&#43;00:00"/>
<meta property="article:modified_time" content="2014-09-03T20:53:36&#43;00:00"/>











<meta itemprop="name" content="Opening Sublime Text from the command line">
<meta itemprop="description" content="I&rsquo;m using Sublime Text 3 beta as my text editor. It&rsquo;s fast and lightweight, but at the same time it&rsquo;s very powerful.
Here&rsquo;s how you can open Sublime Text from the command line:
ln -s /Applications/Sublime\ Text.app/Contents/SharedSupport/bin/subl /usr/local/bin/subl (if you&rsquo;re using Sublime Text 2, just replace the path in the first argument)
If you would rather like to use another name for the command that opens Sublime Text, just change the last part (subl) of this command to whatever you want.">


<meta itemprop="dateModified" content="2014-09-03T20:53:36&#43;00:00" />
<meta itemprop="wordCount" content="175">



<meta itemprop="keywords" content="posts,posts-development,posts-email,posts-linux,projects,3d,3d-book,aws,blender,boot,case-sensitivity,cloudfront,command-lin,command-line,database,disk-image,email,geodecoding,git,git-svn,hugo,javascript,jekyll,kernel,linux,mac,mutt,mysql,quick-tip,s3,sql,static,sublime-text,svn,tips,usb," />


<meta name="twitter:card" content="summary"/>



<meta name="twitter:text:title" content="Opening Sublime Text from the command line"/>
<meta name="twitter:title" content="Opening Sublime Text from the command line"/>
<meta name="twitter:description" content="I&rsquo;m using Sublime Text 3 beta as my text editor. It&rsquo;s fast and lightweight, but at the same time it&rsquo;s very powerful.
Here&rsquo;s how you can open Sublime Text from the command line:
ln -s /Applications/Sublime\ Text.app/Contents/SharedSupport/bin/subl /usr/local/bin/subl (if you&rsquo;re using Sublime Text 2, just replace the path in the first argument)
If you would rather like to use another name for the command that opens Sublime Text, just change the last part (subl) of this command to whatever you want."/>
<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>

<a class="cta" href="/index.xml">Subscribe</a>
</nav>

<section id="wrapper">
<article class="post">
<header>
<h1>Opening Sublime Text from the command line</h1>
<h2 class="headline">
September 3, 2014
<br>
<a href="/tags/sublime-text">sublime text</a>
<a href="/tags/mac">mac</a>
<a href="/tags/command-lin">command lin</a>
<a href="/tags/quick-tip">quick tip</a>
</h2>
</header>
<section id="post-body">
<p>I&rsquo;m using <a href="http://www.sublimetext.com/3">Sublime Text 3 beta</a> as my text editor. It&rsquo;s fast and lightweight, but at the same time it&rsquo;s very powerful.</p>

<p>Here&rsquo;s how you can open Sublime Text from the command line:</p>

<div class="highlight" style="background: #272822"><pre style="line-height: 125%"><span></span>ln -s /Applications/Sublime<span style="color: #ae81ff">\ </span>Text.app/Contents/SharedSupport/bin/subl /usr/local/bin/subl
</pre></div>


<p>(if you&rsquo;re using Sublime Text 2, just replace the path in the first argument)</p>

<p>If you would rather like to use another name for the command that opens Sublime Text, just change the last part (<code>subl</code>) of this command to whatever you want.</p>

<p>For this to work you must have <code>/usr/local/bin</code> in your $PATH environment variable. To check if it&rsquo;s already there, type this into your command line:</p>

<div class="highlight" style="background: #272822"><pre style="line-height: 125%"><span></span><span style="color: #f8f8f2">echo</span> <span style="color: #f8f8f2">$PATH</span> <span style="color: #f8f8f2">|</span> grep -q <span style="color: #e6db74">&quot;/usr/local/bin&quot;</span>
</pre></div>


<p>If nothing is returned, you must add <code>/usr/local/bin</code> to $PATH. I&rsquo;m not going to cover how you do this, because there are probably hundreds of other sites that does.</p>

<p>When everything is set up, you can type any of the following in your terminal:</p>

<div class="highlight" style="background: #272822"><pre style="line-height: 125%"><span></span>subl &lt;filename&gt; <span style="color: #75715e"># Opens a file</span>
subl &lt;foldername&gt; <span style="color: #75715e"># Opens a folder</span>
subl . <span style="color: #75715e"># Opens the current folder</span>
</pre></div>


</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=%2f2014%2f09%2f03%2fopening-sublime-text-from-the-command-line%2f - Opening%20Sublime%20Text%20from%20the%20command%20line 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/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>
<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>
<li>
<a href="/2016/01/21/trouble-booting-newer-linux-kernels-on-asus-vivopc-vm42/">Trouble booting newer Linux kernels on Asus VivoPC VM42<aside class="dates">Jan 21</aside></a>
</li>
<li>
<a href="/2015/08/09/useful-git-tips/">Useful git tips<aside class="dates">Aug 9</aside></a>
</li>
<li>
<a href="/2015/08/09/basic-usage-of-git-svn/">Basic usage of git-svn<aside class="dates">Aug 9</aside></a>
</li>
<li>
<a href="/2015/08/09/deleteing-rows-with-a-left-join-in-mysql/">Deleting rows with a LEFT JOIN in MySQL<aside class="dates">Aug 9</aside></a>
</li>
<li>
<a href="/2015/06/21/mutt-tips-and-tricks/">mutt tips &amp; tricks<aside class="dates">Jun 21</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 2017 Kim Grytøyr
</p>
</footer>

</section>

<script src="//ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<script src="/js/main.js"></script>
<script src="/js/highlight.js"></script>
<script>hljs.initHighlightingOnLoad();</script>





</body>
</html>

+ 431
- 0
public/2015/06/14/locationpicker.js/index.html View File

<
@@ -0,0 +1,431 @@
<!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.20" />
<title>locationpicker.js &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">

<link href="/index.xml" rel="alternate" type="application/rss+xml" title="Kim Grytøyr" />

<meta property="og:title" content="locationpicker.js" />
<meta property="og:description" content="locationpicker.js is a simple-to-use jQuery plugin that allows you to select a location on a map and receive the coordinates using a callback function. It also supports searching for a location based on an address.
Repository To download the latest version of locationpicker.js, visit the repository:
https://bitbucket.org/kimgrytoyr/locationpicker.js/src
Examples Here are two live examples of how locationpicker.js works.
Modal window (with address search)
Fullscreen
Requirements locationpicker.js requires jQuery and the Google Maps API to work." />
<meta property="og:type" content="article" />
<meta property="og:url" content="/2015/06/14/locationpicker.js/" />



<meta property="article:published_time" content="2015-06-14T16:40:00&#43;00:00"/>
<meta property="article:modified_time" content="2015-06-14T16:40:00&#43;00:00"/>











<meta itemprop="name" content="locationpicker.js">
<meta itemprop="description" content="locationpicker.js is a simple-to-use jQuery plugin that allows you to select a location on a map and receive the coordinates using a callback function. It also supports searching for a location based on an address.
Repository To download the latest version of locationpicker.js, visit the repository:
https://bitbucket.org/kimgrytoyr/locationpicker.js/src
Examples Here are two live examples of how locationpicker.js works.
Modal window (with address search)
Fullscreen
Requirements locationpicker.js requires jQuery and the Google Maps API to work.">


<meta itemprop="dateModified" content="2015-06-14T16:40:00&#43;00:00" />
<meta itemprop="wordCount" content="728">



<meta itemprop="keywords" content="posts,posts-development,posts-email,posts-linux,projects,3d,3d-book,aws,blender,boot,case-sensitivity,cloudfront,command-lin,command-line,database,disk-image,email,geodecoding,git,git-svn,hugo,javascript,jekyll,kernel,linux,mac,mutt,mysql,quick-tip,s3,sql,static,sublime-text,svn,tips,usb," />


<meta name="twitter:card" content="summary"/>



<meta name="twitter:text:title" content="locationpicker.js"/>
<meta name="twitter:title" content="locationpicker.js"/>
<meta name="twitter:description" content="locationpicker.js is a simple-to-use jQuery plugin that allows you to select a location on a map and receive the coordinates using a callback function. It also supports searching for a location based on an address.
Repository To download the latest version of locationpicker.js, visit the repository:
https://bitbucket.org/kimgrytoyr/locationpicker.js/src
Examples Here are two live examples of how locationpicker.js works.
Modal window (with address search)
Fullscreen
Requirements locationpicker.js requires jQuery and the Google Maps API to work."/>
<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>

<a class="cta" href="/index.xml">Subscribe</a>
</nav>