Skip to content

Instantly share code, notes, and snippets.

@ecthiender
ecthiender / virtual-labs-dataservice-entities.py
Created August 20, 2015 04:31
[SQLAlchemy Models] Entities in the Virtual Labs dataservice
class IntegrationLevel(db.Model):
__tablename__ = 'integration_levels'
id = db.Column(db.Integer, primary_key=True)
level = db.Column(db.Integer, nullable=False)
labs = db.relationship('Lab', backref='integration_level')
class TypeOfLab(db.Model):
__tablename__ = 'type_of_labs'
var Timer;
Timer = (function() {
function Timer(opts) {
this.opts = opts != null ? opts : {};
_(this).extend(Backbone.Events);
_.defaults(this.opts, {
start: 0
});
@ecthiender
ecthiender / tmux-session-init.sh
Created March 27, 2013 12:28
Tmux session initiation script: creates a new tmux session or attaches to an existing one.
#!/bin/sh
# tmux session initialisation script
# change the following config to your preferences
SESSION="work"
workspace1="$HOME/server/www"
workspace2="$HOME/codeyard"
tmux has-session -t $SESSION > /dev/null