Skip to content

Instantly share code, notes, and snippets.

@clivetyphon
clivetyphon / meraki-client-vpn-linux.md
Created June 15, 2017 09:09
Configuring Meraki Client VPN in Linux

Configuring Meraki Client VPN in Linux

You can try the official Meraki Configuring Client VPN in Linux article for GUI based setup. For terminal based configuration, see below.

Install packages

Install the following packages:

  • strongswan
  • xl2tpd
@danidiaz
danidiaz / netrw.txt
Created October 7, 2016 20:57
Vim's netrw commands.
--- ----------------- ----
Map Quick Explanation Link
--- ----------------- ----
< <F1> Causes Netrw to issue help
<cr> Netrw will enter the directory or read the file |netrw-cr|
<del> Netrw will attempt to remove the file/directory |netrw-del|
<c-h> Edit file hiding list |netrw-ctrl-h|
<c-l> Causes Netrw to refresh the directory listing |netrw-ctrl-l|
<c-r> Browse using a gvim server |netrw-ctrl-r|
<c-tab> Shrink/expand a netrw/explore window |netrw-c-tab|
@hnaoto
hnaoto / context_processors.py
Last active October 9, 2021 02:57
Write your own context processors ("global variable" in Django templates)
#Reference: https://docs.djangoproject.com/en/1.9/ref/templates/api/#writing-your-own-context-processors
#This file is in yourapp/ directory
+from .models import Foo
+
+def foo(request):
# you might need this line for unit tests
if request.user.is_authenticated and request.user.is_active:
+ count = len(Foo.objects.filter(user = request.user))
+ return {"foo_count" :count}