Skip to content

Instantly share code, notes, and snippets.

View Leechael's full-sized avatar
🐹
Working from home

Leechael Leechael

🐹
Working from home
View GitHub Profile
@Leechael
Leechael / maybe.py
Last active December 29, 2016 04:34 — forked from zvyn/maybe.py
# maybe.py - a Pythonic implementation of the Maybe monad
# Copyright (C) 2014. Milan Oberkirch <milan.py@oberkirch.org>
# Copyright (C) 2014. Senko Rasic <senko.rasic@goodcode.io>
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#!/bin/bash
# virtualenv-auto-activate.bash
#
# Installation:
# Add this line to your .bashrc or .bash-profile:
#
# source /path/to/virtualenv-auto-activate.bash
#
# Go to your project folder, run "virtualenv .venv", so your project folder
# has a .venv folder at the top level, next to your version control directory.
@Leechael
Leechael / Entity.php
Created March 11, 2012 12:39 — forked from clexmond/Entity.php
Implementing custom getters and setters in Lithium
<?php
namespace path\to\lib;
use BadMethodCallException;
use lithium\core\Libraries;
use lithium\util\Inflector;
/**
* This class can extend either \lithium\data\entity\Record or \lithium\data\entity\Document