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 pitchit.server | |
(:require [cheshire.core :as json] | |
[cheshire.factory :as factory] | |
[noir.server :as server] | |
[pitchit.views common welcome] | |
[pitchit.models db])) | |
(server/load-views-ns 'pitchit.views) | |
(defn -main [& m] |
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 hash | |
(:import [java.security MessageDigest] | |
[org.apache.commons.codec.binary Base64])) | |
(defn hash-password [pass] | |
(String. | |
(org.apache.commons.codec.binary.Base64/encodeBase64 | |
(-> | |
(doto | |
(java.security.MessageDigest/getInstance "SHA-256") |
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
(def input {:type alcohol}) | |
(defn itBarCrawl [ITMajor] | |
(while (. ITMajor isStanding) | |
(let [bar (. ITMajor getLocation)] | |
(cond | |
(= bar "Pub II") (. ITMajor drink "Pitchers") | |
(= bar "Mulligans") (. ITMajor drink "Long Islands") | |
(= bar "Drifters") (. ITMajor drink "Mixed Drinks") | |
(= bar "Fat Jacks") (if (<= 6 (. ITMajor getDrunkLevel)) | |
(. ITMajor drink "Rum Dumps") |
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
# -*- mode: ruby -*- | |
# vi: set ft=ruby sts=2 ts=2 expandtab sw=2: | |
Vagrant.configure("2") do |config| | |
puppet_nodes = [ | |
{ | |
:hostname => 'clusternode', | |
:ip => '192.168.2.202', | |
:ram => 1024 |
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
'use strict'; | |
/** | |
* @ngdoc function | |
* @name ngMock.$mockHttpPromise | |
* @function | |
* @param {object} mockSuccess The object to return to the .success() callback function | |
* @param {object} mockError The object to return to the .error() callback function | |
* @requires $q | |
* |
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 getPath = function(path) { | |
return '/i' + (path.indexOf('/') === 0 ? path : '/' + path); | |
}; | |
var config = { | |
when: function(path, route) { | |
if(route.overrideRoot) { | |
$routeProvider.when(path, route); | |
} else { | |
var redirect = angular.copy(route); | |
delete redirect.templateUrl; |
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 com.example.interceptor; | |
import javax.interceptor.InterceptorBinding; | |
import java.lang.annotation.*; | |
@Inherited | |
@InterceptorBinding | |
@Retention(RetentionPolicy.RUNTIME) | |
@Target({ElementType.METHOD, ElementType.TYPE}) | |
public @interface CrossDomain { |
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
angular.module('myApp').directive('a', function( | |
PhonegapConstant, | |
$window | |
) { 'use strict'; | |
return { | |
priority: 1, | |
restrict: 'E', | |
link: function($scope, $element, $attrs) { | |
if(PhonegapConstant) { | |
$attrs.$observe('href', function(value) { |
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
window._ubaq = window._ubaq || []; | |
window._ubaq.push(['trackGoal', 'convert']); | |
(function() { | |
var ub_script = document.createElement('script'); | |
ub_script.type = 'text/javascript'; | |
ub_script.src = | |
('https:' == document.location.protocol ? 'https://' : 'http://') + | |
'd3pkntwtp2ukl5.cloudfront.net/uba.js'; | |
var s = document.getElementsByTagName('script')[0]; | |
s.parentNode.insertBefore(ub_script, s); |
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
{ | |
"pg": { | |
"user": "admin", | |
"pass": "secret" | |
}, | |
"node" : { | |
"env": "dev" | |
}, | |
"port": 8081 | |
} |
OlderNewer