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
require 'mongo_mapper' | |
require 'will_paginate/array' | |
MongoMapper.database = 'testing' | |
class Post | |
include MongoMapper::Document | |
key :title, String | |
key :comments_count, Integer, default: 0 |
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
2012-11-02T11:51:50+00:00 app[web.1]: | |
2012-11-02T11:51:50+00:00 app[web.1]: Started GET "/" for 213.1.223.82 at 2012-11-02 11:51:50 +0000 | |
2012-11-02T11:51:50+00:00 app[web.1]: cache: [GET /] miss | |
2012-11-02T11:51:50+00:00 app[web.1]: | |
2012-11-02T11:52:25+00:00 app[web.1]: | |
2012-11-02T11:52:25+00:00 app[web.1]: | |
2012-11-02T11:52:25+00:00 app[web.1]: Started GET "/" for 213.1.223.82 at 2012-11-02 11:52:25 +0000 | |
2012-11-02T11:52:25+00:00 app[web.1]: cache: [GET /] miss | |
2012-11-02T11:52:33+00:00 app[web.1]: | |
2012-11-02T11:52:33+00:00 app[web.1]: |
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
module Main where | |
import Test.HUnit | |
import System.Environment | |
main :: IO () | |
main = do | |
words <- getArgs |
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
::NewRelic::Agent.logger.info "Patching NetHTTPRequest for XMLRPC (in config/intializers/new_relic.rb)" | |
module NewRelic | |
module Agent | |
module HTTPClients | |
class NetHTTPRequest | |
def method | |
match = @request.body.match /<methodName>(.*)<\/methodName>/ | |
if match | |
return match.captures.first | |
else |
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
Vagrant.configure(2) do |config| | |
config.vm.box = "precise64" | |
config.vm.provision "ansible" do |ansible| | |
ansible.playbook = "test-perms.yml" | |
end | |
end |
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
module Main exposing (..) | |
import Html.App as Html | |
import Html exposing (..) | |
import Html.Events exposing (..) | |
main : Program Never | |
main = | |
Html.beginnerProgram |
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
resolver: lts-6.14 | |
packages: | |
- location: . # elm-lang.org itself | |
- location: | |
git: https://github.com/elm-lang/elm-compiler | |
commit: c9c7e72c424a13255f8ee84c719f7ef48b689c1a # 0.17 | |
extra-dep: true | |
- location: | |
git: https://github.com/elm-lang/elm-package |
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 API = "users" :> (Capture "id" Int :> Get '[JSON] User | |
:<|> Get '[JSON] [User]) | |
urlForUser :<|> urlForUsers = urlHelpersFor (Proxy :: Proxy API) | |
-- urlForUser :: Int -> URI | |
-- urlForUsers :: URI |
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
{-# LANGUAGE RankNTypes #-} | |
newtype ListC a = ListC | |
{ foldC :: forall r. (a -> r -> r) -> r -> r | |
} | |
foldC' :: (a -> r -> r) -> r -> ListC a -> r | |
foldC' co ni (ListC f) = f co ni | |
isNil :: ListC a -> Bool |
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
<html> | |
<head> | |
<meta charset="UTF-8"/> | |
<title>Document</title> | |
</head> | |
<body> | |
<script src="https://unpkg.com/angular/angular.js"></script> | |
<script src="https://unpkg.com/angular-ui-router/release/angular-ui-router.js"></script> | |
<script> | |
var app = angular.module('my-app', ['ui.router']); |
OlderNewer