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
/** | |
* Decorates the ui-bootstrap datepicker directive's controller to allow | |
* refreshing the datepicker view (and rerunning invalid dates function) | |
* upon an event trigger: `$scope.$broadcast('refreshDatepickers');` | |
* | |
* Works with inline and popup. Include this after `ui.bootstrap` js | |
*/ | |
angular.module('ui.bootstrap.datepicker') | |
.config(function($provide) { | |
$provide.decorator('datepickerDirective', function($delegate) { |
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
// | |
// grunt-newer: | |
// Check for newer @import .less files example | |
// See: https://github.com/tschaub/grunt-newer/issues/29 | |
// | |
grunt.initConfig({ | |
// ... | |
newer: { | |
options: { | |
override: function(taskName, targetName, filePath, time, include) { |
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
Memcache serialization test (ext/memcache v2.2.7) | |
*** unsetKey *** | |
bool(false) | |
*** emptyKey *** | |
string(0) "" | |
*** falseKey *** | |
string(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
module.exports = { | |
adapter: 'mysqlDb1', | |
attributes: { | |
name: 'string' | |
} | |
}; |
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
Long Run Button clicked | |
WAMP client initialized | |
WAMP connected 1377136104011-1 | |
status:long-run RECEIVED 0 | |
status:long-run RECEIVED 1 | |
status:long-run RECEIVED 2 | |
status:long-run RECEIVED 3 | |
status:long-run RECEIVED 4 | |
status:long-run RECEIVED 5 | |
status:long-run RECEIVED 6 |
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
$ java -XX:+PrintFlagsFinal | |
[Global flags] | |
uintx AdaptivePermSizeWeight = 20 {product} | |
uintx AdaptiveSizeDecrementScaleFactor = 4 {product} | |
uintx AdaptiveSizeMajorGCDecayTimeScale = 10 {product} | |
uintx AdaptiveSizePausePolicy = 0 {product} | |
uintx AdaptiveSizePolicyCollectionCostMargin = 50 {product} | |
uintx AdaptiveSizePolicyInitializingSteps = 20 {product} | |
uintx AdaptiveSizePolicyOutputInterval = 0 {product} | |
uintx AdaptiveSizePolicyWeight = 10 {product} |
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 my.routes.auth | |
(:use compojure.core | |
[hiccup.util :only (url to-str)]) | |
(:require [ring.util.response :as response] | |
[taoensso.tower :as t] | |
[noir.session :as session] | |
[noir.cookies :as cookies] | |
[noir.validation :as vali] | |
[noir.util.crypt :as crypt])) |
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 sess; | |
ab.connect( | |
// ... | |
function (session) { // Connection callback | |
// Authenticate | |
var username = 'guest'; | |
var password = 'secret-password'; | |
// send authreq rpc call |
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
(defn rpc-url [path] (str "http://wamptutorial/rpc#" path)) | |
(defn evt-url [path] (str "http://wamptutorial/event#" path)) | |
(defn auth-secret [sess-id auth-key extra] | |
"secret-password") ; from database | |
(defn auth-permissions [sess-id auth-key} | |
; get permissions for this user | |
{:rpc {(rpc-url "echo") true} | |
:subscribe {(evt-url "chat") true} |
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 my.server | |
(:use org.httpkit.server | |
[clojure.string :only [split trim lower-case]]) | |
(:import [org.httpkit.server AsyncChannel])) | |
(defn origin-match? [origin-re req] | |
(if-let [req-origin (get-in req [:headers "origin"])] | |
(re-matches origin-re req-origin))) |