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
#ifdef GL_ES | |
precision mediump float; | |
#endif | |
#extension GL_EXT_gpu_shader4 : enable | |
uniform sampler2D u_texture; | |
uniform vec2 g_Resolution; | |
varying vec2 v_texCoords; |
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
var spawn = require('child_process').spawn; | |
var Stream = require('stream'); | |
/** | |
* crops and resizes images to our desired size | |
* @param {Stream} streamIn in stream containing the raw image | |
* @return {Stream} | |
*/ | |
exports.cropImage = function(streamIn){ |
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
{-# LANGUAGE RecordWildCards, MultiParamTypeClasses, FlexibleInstances #-} | |
class KVEntity a b where | |
kvIdentity :: a -> KVIdentifier | |
kvProperties :: a -> Value | |
kvLastModified :: a -> UTCTime | |
kvClass :: a -> KVClass | |
kvRelations :: a -> [KVLink] | |
kvCachedRels :: a -> [b] |
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 Data.List (isSuffixOf) | |
dropSuffix s str | s `isSuffixOf` str = take ((length str) - (length s)) str | |
| otherwise = str |
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
toUnderscore (a:b:c) | isAlpha a, isUpper b = a : '_' : toUnderscore (toLower b : c) | |
toUnderscore (a:b) = a : toUnderscore b | |
toUnderscore x = x |
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
{-# LANGUAGE OverloadedStrings #-} | |
{-# LANGUAGE DeriveDataTypeable #-} | |
import Data.Aeson | |
import qualified Data.ByteString.Char8 as BS | |
import qualified Data.ByteString.Lazy.Char8 as BSL | |
import Data.ByteString.Lazy (toChunks) | |
import Data.List | |
import Data.Maybe | |
import Data.Typeable (Typeable) |
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
{-# LANGUAGE OverloadedStrings #-} | |
{-# LANGUAGE DeriveDataTypeable #-} | |
import Data.Aeson | |
import qualified Data.ByteString.Char8 as BS | |
import qualified Data.ByteString.Lazy.Char8 as BSL | |
import Data.ByteString.Lazy (toChunks) | |
import Data.List | |
import Data.Maybe | |
import Data.Typeable (Typeable) |
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
$ -> | |
($ '#login-btn').click -> | |
navigator.id.request | |
siteName: 'neighr' | |
#siteLogo: '/logo.png' | |
false | |
($ '#logout-btn').click -> | |
navigator.id.logout() | |
false |
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
class GoogleAnalytics | |
@init: (webPropertyId) -> | |
@_initQueue(webPropertyId) | |
scriptTag = @_createScriptTag() | |
@_injectScriptTag(scriptTag) | |
@_initQueue: (webPropertyId) -> | |
window._gaq ?= [] | |
window._gaq.push ['_setAccount', webPropertyId] | |
window._gaq.push ['_trackPageview'] |
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
{-# LANGUAGE OverloadedStrings, RecordWildCards #-} | |
module Main where | |
--import Data.Conduit.Binary | |
import Network.Wai | |
import Network.Wai.Handler.Warp | |
import Network.HTTP.Types | |
import qualified Data.ByteString.Lazy as L | |
import qualified Data.ByteString.Char8 as B | |
import Control.Monad.Trans |