This file contains hidden or 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 express from 'express'; | |
import importAll from 'import-all'; | |
import gestaltServer from 'gestalt-server'; | |
import gestaltPostgres from 'gestalt-postgres'; | |
import cors from 'cors'; | |
const apiApp = express(); | |
apiApp.use(cors({ | |
origin: 'http://localhost:3000', | |
credentials: true, |
This file contains hidden or 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
# setup variables | |
$window = $ window | |
$section = $ '.tour-section' | |
$intro = $ '.tour-intro' | |
adjustWindow = -> | |
winH = $window.height() | |
win2 = winH * 2 |
This file contains hidden or 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
module.exports = (inputData, onChange, historySize = 100) -> | |
data = inputData | |
undos = [] | |
redos = [] | |
class Cursor | |
constructor: (@path = []) -> | |
cursor: (path = []) -> |
This file contains hidden or 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
/* mock placeholder on required inputs type month */ | |
input[type=month], | |
input[type=date], | |
input[type=time] | |
&[required]:invalid | |
&:after | |
content: attr(placeholder) | |
color: #d8d8d8 | |
position: absolute | |
left: $margin/2 |
This file contains hidden or 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
# This middleware allows cross origin remote API requests, using either JSONP or CORS. | |
# | |
# JSONP requests are modified before being passed on to the wrapped application in order | |
# to allow responses to have a unified format. JSONP is served when a jsonp=true get | |
# parameter is included in a http GET request. The middleware will update the method of | |
# these requests based on a 'method' parameter before passing them on. For POST and PUT | |
# requests, the request content will be updated based on the 'data' get parameter. For all | |
# JSONP requests, get parameters used by the middleware will be removed before the request | |
# is passed on. The response recieved from the wrapped application will then be wrapped | |
# in a callback function named with the 'callback' parameter from the original request, and |
This file contains hidden or 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
module SanitizeAttributes | |
#override setters of some string or text attributes to sanitize w/ Sanitize.clean before setting | |
def sanitize_attribute(attribute) | |
self.send(:define_method, "#{attribute}=") do |arg| | |
self[attribute] = Sanitize.clean arg | |
end | |
end | |
def sanitize_attributes(*attributes) |
This file contains hidden or 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
String.prototype.upper = function() { | |
return _.reduce(this.split(""), function(memo, chr) { return memo + chr.toUpperCase() }, "") | |
} | |
String.prototype.lower = function() { | |
return _.reduce(this.split(""), function(memo, chr) { return memo + chr.toLowerCase() }, "") | |
} | |
String.prototype.capitalize = function() { | |
return this.charAt(0).toUpperCase() + this.slice(1); | |
} | |
String.prototype.title = function() { |
This file contains hidden or 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
//Cross browser CSS3 mixins | |
@mixin box-shadow($left, $top, $radius, $color) { | |
box-shadow: $left $top $radius $color; | |
-webkit-box-shadow: $left $top $radius $color; | |
-moz-box-shadow: $left $top $radius $color; | |
} | |
@mixin transition($property, $duration, $easing: linear) { | |
transition: $property $duration $easing; |