Skip to content

Instantly share code, notes, and snippets.

Gavin Gray gngdb

View GitHub Profile
View gist:9977911
## 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 Jun 19, 2014
draft notebook extracting GO features
View gist:6fd55578799d5c9bb91a
{
"metadata": {
"name": "",
"signature": "sha256:b23e93486e20b6aff97fda2c314462af8b5520f5d167aac630da914b91510d87"
},
"nbformat": 3,
"nbformat_minor": 0,
"worksheets": [
{
"cells": [
View gist:fbf1d3eaf174cafaacf6
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
View gist:af284e23abe1335d0c91
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:
View gist:eadb4c53c55b3b3fa287
------------------------------------------------------------
/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
View gist:0392d7ba201dd3a09189
{
"metadata": {
"name": "",
"signature": "sha256:eff41c41a5ebd1edc41f0a9e68a94ac18d5b417ce2cfe2baf22d49c0f7699eb9"
},
"nbformat": 3,
"nbformat_minor": 0,
"worksheets": [
{
"cells": [
@gngdb
gngdb / gist:dbcd157b917410561c72
Last active Aug 29, 2015
in progress notes on variational GMM
View gist:dbcd157b917410561c72
{
"metadata": {
"name": "",
"signature": "sha256:f4c2596208087783232f2bf4dbd6fc6742fa724077af8d31dee04d115c68c9f2"
},
"nbformat": 3,
"nbformat_minor": 0,
"worksheets": [
{
"cells": [
@gngdb
gngdb / gist:cdab95c14f6577edfbbb
Created Feb 24, 2015
PMR tutorial 2 questions 4 and 5
View gist:cdab95c14f6577edfbbb
{
"metadata": {
"name": "",
"signature": "sha256:3053e761cda6c1e5fe6f3fa5089c2cb47730ba1f8b6f525924879ecc69582c31"
},
"nbformat": 3,
"nbformat_minor": 0,
"worksheets": [
{
"cells": [
@gngdb
gngdb / gist:809da9c38610ecd2f3f3
Created Mar 27, 2015
PMR tutorial 7 notebook
View gist:809da9c38610ecd2f3f3
This file has been truncated, but you can view the full file.
You can’t perform that action at this time.