This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from datetime import datetime | |
from sqlalchemy import Column, Integer, DateTime, ForeignKey | |
from sqlalchemy.orm import relationship | |
from sqlalchemy.ext.declarative import declared_attr | |
from flask_security import current_user | |
class AuditMixin(object): | |
created_at = Column(DateTime, default=datetime.now) | |
updated_at = Column(DateTime, default=datetime.now, onupdate=datetime.now) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Creates a new Uint8Array based on two different ArrayBuffers | |
* | |
* @private | |
* @param {ArrayBuffers} buffer1 The first buffer. | |
* @param {ArrayBuffers} buffer2 The second buffer. | |
* @return {ArrayBuffers} The new ArrayBuffer created out of the two. | |
*/ | |
var _appendBuffer = function(buffer1, buffer2) { | |
var tmp = new Uint8Array(buffer1.byteLength + buffer2.byteLength); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.cloth-bg { | |
background: #777; | |
background: -webkit-radial-gradient(rgba(0, 0, 0, 0.1) 50%, rgba(255, 255, 255, 0.1) 50%), | |
-webkit-linear-gradient(45deg, rgba(50, 50, 50, 0.95), rgba(200, 200, 200, 0.95)), | |
url('http://f.cl.ly/items/3h0j172n2i3q1z0t2G1P/noise.jpg'); | |
background-size: 3px 3px, | |
auto auto, | |
auto auto; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from subprocess import Popen, PIPE | |
from os import path | |
git_command = ['/usr/bin/git', 'status'] | |
repository = path.dirname('/path/to/dir/') | |
git_query = Popen(git_command, cwd=repository, stdout=PIPE, stderr=PIPE) | |
(git_status, error) = git_query.communicate() | |
if git_query.poll() == 0: | |
# Do stuff |
NewerOlder