Skip to content

Instantly share code, notes, and snippets.

@gngdb
gngdb / gist:7334467
Created November 6, 2013 11:15
hoc file used for NEURON assignment at University of Edinburgh.
// create soma and dendrite
create soma
access soma
create dend
// connect the soma to the dendrite
connect dend(0),soma(0)
// set up parameters of the soma
soma insert pas
@gngdb
gngdb / gist:8565000
Created January 22, 2014 18:57
tutorial 1
{
"metadata": {
"name": ""
},
"nbformat": 3,
"nbformat_minor": 0,
"worksheets": [
{
"cells": [
{
## Hibernating
Want to hibernate at low battery automatically. First getting hibernate to work. Created swap partition larger than RAM (8Gb) and set it up with mkswap and swapon as in [Arch Wiki](https://wiki.archlinux.org/index.php/Swap). Added kernel parameters to grub. **Problem**: didn't read the article properly and forgot to add to fstab so swap didn't stay on reboot.
Next should use udev rule to get the system to auto-hiberate at 5% or similar. [Forum post](https://bbs.archlinux.org/viewtopic.php?pid=1164408) appears to cover how to do this, but doesn't. It's in the [Laptop page](https://wiki.archlinux.org/index.php/laptop#Udev_events) of the arch wiki.
```
# Suspend the system when battery level drops to 2%
SUBSYSTEM=="power_supply", ATTR{status}=="Discharging", ATTR{capacity}=="2", RUN+="/usr/bin/systemctl suspend"
```
@gngdb
gngdb / gist:6fd55578799d5c9bb91a
Created June 19, 2014 14:47
draft notebook extracting GO features
{
"metadata": {
"name": "",
"signature": "sha256:b23e93486e20b6aff97fda2c314462af8b5520f5d167aac630da914b91510d87"
},
"nbformat": 3,
"nbformat_minor": 0,
"worksheets": [
{
"cells": [
ctrl_interface=/var/run/wpa_supplicant
eapol_version=1
ap_scan=1
fast_reauth=1
network={
ssid="eduroam"
identity="email@address.com"
#psk="your password goes here"
# or:
@gngdb
gngdb / gist:fbf1d3eaf174cafaacf6
Created November 6, 2014 20:29
wpa2-peap-nodomain
name = WPA2-PEAP-NODOMAIN
author = atiketemola
version = 1
require identity *Username password *Password
protected password *Password
-----
ctrl_interface=/var/run/wpa_supplicant
network={
ssid="$_ESSID"
proto=RSN
@gngdb
gngdb / gist:eadb4c53c55b3b3fa287
Created November 7, 2014 12:53
pip error log
------------------------------------------------------------
/usr/bin/pip3 run on Fri Nov 7 12:38:03 2014
Downloading/unpacking h5py
Getting page https://pypi.python.org/simple/h5py/
URLs to search for versions for h5py:
* https://pypi.python.org/simple/h5py/
Analyzing links from page https://pypi.python.org/simple/h5py/
Skipping link https://pypi.python.org/packages/2.6/h/h5py/h5py-2.2.1.win32-py2.6.exe#md5=ce6c26dc8ef1fea864ecf286c1e4cb98 (from https://pypi.python.org/simple/h5py/); unknown archive format: .exe
Skipping link https://pypi.python.org/packages/2.6/h/h5py/h5py-2.3.0.win32-py2.6.exe#md5=23f12194da7e5fededa2e590c6531f51 (from https://pypi.python.org/simple/h5py/); unknown archive format: .exe
Skipping link https://pypi.python.org/packages/2.6/h/h5py/h5py-2.3.0b1.win32-py2.6.exe#md5=92174de66333d5ec4919d3a5bf7cb302 (from https://pypi.python.org/simple/h5py/); unknown archive format: .exe
@gngdb
gngdb / gist:0392d7ba201dd3a09189
Created January 31, 2015 19:43
PMR tutorial 1 notes
{
"metadata": {
"name": "",
"signature": "sha256:eff41c41a5ebd1edc41f0a9e68a94ac18d5b417ce2cfe2baf22d49c0f7699eb9"
},
"nbformat": 3,
"nbformat_minor": 0,
"worksheets": [
{
"cells": [
@gngdb
gngdb / gist:dbcd157b917410561c72
Last active August 29, 2015 14:15
in progress notes on variational GMM
{
"metadata": {
"name": "",
"signature": "sha256:f4c2596208087783232f2bf4dbd6fc6742fa724077af8d31dee04d115c68c9f2"
},
"nbformat": 3,
"nbformat_minor": 0,
"worksheets": [
{
"cells": [