Skip to content

Instantly share code, notes, and snippets.

@Wtower
Wtower / README.md
Created January 1, 2019 21:59
OpenVPN for Windows: Map network drives at connect

OpenVPN for Windows: Map network drives at connect

Create two batch files as below. They need to be in the same directory as the .ovpn OpenVPN configuration file (eg. \Users\Wtower\OpenVPN) and be named with the same name filename, but appending _up and _down.

@Wtower
Wtower / README.md
Last active January 27, 2020 10:23
Setup dev environment with VSCode on Windows

Setup dev environment with VSCode on Windows

This gist is intended to guide on how to setup a dev environment in Windows 7 for developers coming from a Linux background.

For Windows 10 see file win10.md below.

Install

@Wtower
Wtower / README.rst
Last active January 17, 2019 16:11
Ubuntu Gnome 17.04: after installation

Ubuntu Gnome 17.04: After installation

What to after installing Ubuntu Gnome 17.04.

Wifi Gnome issue

Due to a known bug with this version of network manager, Gnome can't connect to wifi networks:

@Wtower
Wtower / install.sh
Created September 14, 2016 10:51
Toradex install prerequisites and flash
#!/bin/bash
# install programs:
sudo apt-get install gksu gtkterm
# run terminal:
gksu gtkterm
# extract image iso:
bzip2 -d Colibri_VF_LinuxImageV2.6Beta2_20160630.tar.bz2
@Wtower
Wtower / README.rst
Last active December 8, 2020 06:16
Bi-directional many-to-many relationship in django admin

Accessing a ManyToMany relationship from both ends

Based on the article Related ManyToManyField in Django admin site, the file forms.py contains a summary of the recommended code.

The file manytomany.py contains a generic base class in order to be DRY and avoid repeating the same code in many form classes.

An example of how to use can be found in the NineCMS project commit 52c710f.

@Wtower
Wtower / config.fish
Last active October 20, 2022 21:47
Using fish shell with python virtualenv, node nvm and ansible
# Greeting prologue
echo "Welcome to "(uname -a | awk '{print $1 " " $2 " " $3 " " $4 " " $12}')
uptime
# ansible
. ~/workspace/ansible/ansible/hacking/env-setup.fish -q > /dev/null ^&1
set -Ux ANSIBLE_INVENTORY ~/workspace/ansible/play/hosts
echo "Now using "(ansible --version | head -n 1 | awk '{print $1 " " $2}')
# Load virtual fish