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
# mongo_template.rb | |
# fork of Ben Scofield's Rails MongoMapper Template (http://gist.github.com/181842) | |
# | |
# To use: | |
# rails project_name -m http://gist.github.com/270200.txt | |
# remove unneeded defaults | |
run "rm public/index.html" | |
run "rm public/images/rails.png" |
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
check host mongodb with address localhost | |
start program = "/usr/bin/sudo /opt/database/mongo/bin/mongod" | |
stop program = "/usr/bin/sudo /usr/bin/pkill -f mongod" | |
if failed port 28017 protocol HTTP | |
request / | |
with timeout 10 seconds | |
then start |
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
Pacotes | |
- entidades - referente ao conjunto de atributos de uma abstraçao | |
- controladores - referente ao total de acoes de uma visao | |
- persistencia - refetente ao total de acoes no banco de dados | |
- logica de negocio - referente ao total de acoes de um caso de uso | |
- logica pura - referente ao total de operacoes em objetos primitivos, coleçoes ou wrappers | |
- visao - refetente a virtualizacao de parte de um caso de uso | |
- Persistencia | |
- recebe informacoes da logica de negocios |
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
- Doc ready function -o | |
- Functional setting -w | |
- Chainable -w | |
- Classy dom -w | |
- Selector engine -o | |
- Element transformation -w | |
- Event management -o | |
- Intelligent ajax -w | |
- Templating -o |
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
package br.org.pav.svp.old; | |
import java.io.File; | |
import java.io.IOException; | |
import org.tmatesoft.svn.core.SVNException; | |
import org.tmatesoft.svn.core.SVNNodeKind; | |
import org.tmatesoft.svn.core.SVNURL; | |
import org.tmatesoft.svn.core.io.ISVNEditor; | |
import org.tmatesoft.svn.core.io.SVNRepository; |
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
package br.org.pav.svp.old; | |
import java.io.ByteArrayInputStream; | |
import java.io.File; | |
import org.tmatesoft.svn.core.SVNCommitInfo; | |
import org.tmatesoft.svn.core.SVNDepth; | |
import org.tmatesoft.svn.core.SVNErrorCode; |
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
(ns reactor.clj.core | |
(:import [reactor.core Reactor Context])) | |
;;create the reactor | |
(def reactor (Reactor. (Context/rootDispatcher))) | |
;;create the selector | |
(def selector (reactor.Fn/$ "print.received")) | |
;;create and implement the consumer | |
(def consumer (proxy [reactor.fn.Consumer][] (accept [event] (println "Received")))) |
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
(ns marsrover.core | |
(:require [clojure.string :as s])) | |
(defn add-tuple [fst snd] | |
[(+ (first fst) (first snd)) (+ (second fst) (second snd))]) | |
(defn input->rovers [input] | |
(partition 2 (drop 1 (s/split-lines input)))) | |
(defn next-movement [facing] |
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
object MyApp{ | |
trait ApplicativeFunctor[A, F[A]] { | |
def apply[X](a:X): F[X] | |
def map[B](f: A => B): F[B] | |
} | |
trait Monad[A, M[A]] extends ApplicativeFunctor[A, M] { | |
def flatMMap[B](f: A => M[B]): M[B] | |
} |
OlderNewer