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
import java.awt.Graphics2D; | |
import java.awt.image.BufferedImage; | |
import java.io.ByteArrayInputStream; | |
import java.io.ByteArrayOutputStream; | |
import java.io.IOException; | |
import java.io.InputStream; | |
import java.util.Map; | |
import javax.imageio.ImageIO; | |
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
# System-wide .bashrc file for interactive bash(1) shells. | |
# The below is just appended to the /etc/bashrc | |
export ARCHFLAGS="-Wno-error=unused-command-line-argument-hard-error-in-future" | |
alias vidiff='git diff | vi -' | |
export DOCKER_HOST=tcp://192.168.59.103:2376 | |
export DOCKER_CERT_PATH=/Users/tresbailey/.boot2docker/certs/boot2docker-vm | |
export DOCKER_TLS_VERIFY=1 | |
export JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.7.0_51.jdk/Contents/Home/ |
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 mongoalchemy.document import Value | |
from pymongo.objectid import ObjectId | |
from market import DB | |
def remove_OIDs(obj, recursive=False): | |
""" | |
Removes the ObjectID types from an object | |
before returning | |
""" |
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
fs = require('fs') | |
under = require('underscore') | |
path = require('path') | |
fs.watch('market/static/templates', function(event, fileName) { | |
if ( '.html' == path.extname(fileName) ) { | |
console.log('Received a change on '+ fileName +'...'); | |
var templ = fs.readFileSync('market/static/templates/'+ fileName).toString(); | |
var html_name = path.basename(fileName, '.html'); | |
fs.writeFileSync('market/static/templates/_compiled/'+ html_name +'.js', 'var '+ html_name.replace(/-([^-]*)$/,'_'+'$1') +' = '+ under.template(templ).source); |
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
/* | |
* To change this template, choose Tools | Templates | |
* and open the template in the editor. | |
*/ | |
package com.tresback.testing; | |
import java.lang.annotation.ElementType; | |
import java.lang.annotation.Retention; | |
import java.lang.annotation.RetentionPolicy; | |
import java.lang.annotation.Target; |
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
mongoose = require 'mongoose' | |
Backbone = require 'backbone' | |
$ = require 'jquery' | |
_ = require('underscore')._ | |
Schema = mongoose.Schema | |
Articles = new Schema | |
identity: Number, | |
order: Number, |
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
var NodeChatController = { | |
init: function() { | |
this.socket = io.connect('http://localhost'); | |
var mysocket = this.socket; | |
this.model = new models.NodeChatModel(); | |
this.view = new NodeChatView({model: this.model, socket: this.socket, el: $('#content')}); | |
var view = this.view; | |
this.socket.on('message', function(msg) { |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Backbone with Mighty Moo Photos</title> | |
</head> | |
<body> | |
<ul id="albums-list"> | |
</ul> | |
<ul id="friends-list"> |
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
TYPE_PARSERS = { | |
'http://www.w3.org/2001/XMLSchema.xsd#string': str, | |
'http://www.w3.org/2001/XMLSchema.xsd#int': int, | |
'http://www.w3.org/2001/XMLSchema.xsd#float': float, | |
'http://www.w3.org/2001/XMLSchema.xsd#date': { 'module': 'datetime', | |
'klass': 'datetime', | |
'method': 'strptime', | |
'args': '%d-%m-%y'}, | |
'http://www.w3.org/2001/XMLSchema.xsd#datetime': { 'module': 'datetime', | |
'klass': 'datetime', |