Skip to content

Instantly share code, notes, and snippets.

View lhstraathof's full-sized avatar

Lars Straathof lhstraathof

View GitHub Profile
<!doctype html>
<html>
<head>
<!-- Run in full-screen mode. -->
<meta name="apple-mobile-web-app-capable" content="yes">
<!-- Make the status bar black with white text. -->
<meta name="apple-mobile-web-app-status-bar-style" content="black">
@lhstraathof
lhstraathof / directus_hugo
Created September 23, 2017 17:55
Get data from DIrectus CMS in Hugo
<ul>
{{ $data := getJSON "https://cms.dev:8890/api/1.1/tables/settings/rows?access_token=vpqBqeRX4CGw2OgDdZxv9H26Rw8mIo4Z" }}
{{ range $data.data }}
{{ if .site_name }}
<li>{{ .site_name }}</li>
{{ end }}
{{ end }}
</ul>
@lhstraathof
lhstraathof / hugo_menu
Created September 23, 2017 18:17
html for a basic menu in hugo template
{{ with .Site.Menus.main }}
<nav class="menu">
<ul class="main_menu">
{{ range . }}
<li class="main_menu__li"><a class="main_menu__link" href="{{ .URL | absURL }}">{{ .Name }}</a></li>
{{ end }}
</ul>
</nav>
{{ end }}
@lhstraathof
lhstraathof / find-kill-all-port-mac.txt
Created December 20, 2018 08:54
Find and kill all process on a specific port on mac
# Run the following code in the terminal
# Find all processes running on a specific port (you can replace 3000 with any port):
[sudo] lsof -i :3000
# Get the PID id of the process you want to kill.
# Then with the PID id run the following command to kill it:
kill -9 <PID>