Skip to content

Instantly share code, notes, and snippets.

View chaos95's full-sized avatar

Morgan Lokhorst chaos95

  • Melbourne, Australia
View GitHub Profile
import XMonad
import XMonad.ManageHook
import XMonad.Hooks.ManageHelpers
import XMonad.Hooks.ManageDocks
import XMonad.Hooks.SetWMName
import XMonad.Hooks.UrgencyHook
import XMonad.Hooks.DynamicLog
import XMonad.Hooks.FadeInactive
import XMonad.Layout.Accordion
import XMonad.Layout.PerWorkspace

Keybase proof

I hereby claim:

  • I am chaos95 on github.
  • I am chaos95 (https://keybase.io/chaos95) on keybase.
  • I have a public key ASBEZ1J9WN4k_QutDtQRL2IhMOBMxAuGUbx23eQ73kzKgQo

To claim this, I am signing this object:

@chaos95
chaos95 / Default.sublime-commands
Created January 28, 2013 22:06
Sublime config bits and pieces
[
{
"caption": "Word Wrap: Toggle",
"command": "toggle_setting",
"args": {"setting": "word_wrap"}
},
{
"caption": "Convert Case: Upper Case",
"command": "upper_case"
},
@chaos95
chaos95 / ContainerExamples.cs
Last active December 10, 2015 13:18
EF Collections
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
public class BigContainer
{
[Key]
public virtual int BigContainerID { get; set; }
public virtual ICollection<LittleContainer> LittleContainers { get; set; }
}
@chaos95
chaos95 / lsystems.go
Created October 23, 2012 01:59
L-systems in Go
package lsystems
import (
"bytes"
)
func lsystem_buffer(s *bytes.Buffer, rules []string) {
tmpbuf := bytes.NewBuffer(make([]byte, 0, 1e6))
for _, b := range s.Bytes() {
@chaos95
chaos95 / gist:951050
Created May 2, 2011 00:56
Get Terminal Size via python
# found at http://stackoverflow.com/questions/566746/how-to-get-console-window-width-in-python/566752#566752
def getTerminalSize():
def ioctl_GWINSZ(fd):
try:
import fcntl, termios, struct, os
cr = struct.unpack('hh', fcntl.ioctl(fd, termios.TIOCGWINSZ,
'1234'))
except:
return None
return cr