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
/// | |
/// @param moduleUri | |
/// @param vars | |
/// @param config | |
xdmp.spawn( | |
"/triggers/background-trigger.sjs", | |
{"URI": ""}, | |
{"modules" : xdmp.modulesDatabase()} | |
); |
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
xquery version "1.0-ml"; | |
import module namespace admin = "http://marklogic.com/xdmp/admin" | |
at "/MarkLogic/admin.xqy"; | |
let $config := admin:get-configuration() | |
let $config := admin:cluster-set-opsdirector-session-endpoint($config, | |
"http://172.20.6.19:8009/v1/opsdirector/session") | |
return |
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
server { listen 80; | |
server_name example.com; | |
access_log /var/log/example.com/nginx.access.log; | |
error_log /var/log/example.com/nginx.error.log; | |
root /var/www/apps/example.com/public; | |
charset utf-8; | |
location / { | |
rewrite ^ https://$host$request_uri? permanent; | |
} |
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("umbraco") | |
.controller("My.Workshop.EditController", function ($routeParams, notificationsService, workshopResource, assetsService, navigationService) { | |
vm.save = function() { | |
vm.buttonState = "busy"; | |
workshopResource.save(vm.workshop).then(function (response) { | |
vm.buttonState = "success"; | |
vm.workshop = response.data; | |
notificationsService.success("Workshop saved!"); | |
navigationService.syncTree({ tree: 'workshopTree', path: ["-1", response.id], forceReload: false, activate: 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
interface IOrderProvider | |
{ | |
/// <summary> | |
/// Gets a list of orders for the given date | |
/// </summary> | |
/// <param name="dateTime"></param> | |
/// <returns></returns> | |
void GetOrderList(DateTime dateTime); | |
} |
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
<?php | |
$loginSuccessful = false; | |
if (isset($_SERVER['PHP_AUTH_USER']) && isset($_SERVER['PHP_AUTH_PW'])){ | |
$username = $_SERVER['PHP_AUTH_USER']; | |
$password = $_SERVER['PHP_AUTH_PW']; | |
if ($username == '' && $password == ''){ | |
$loginSuccessful = 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
<?php | |
// IF WE ARE ON HOMEPAGE | |
if( | |
Mage::getSingleton('cms/page')->getIdentifier() == 'home' && | |
Mage::app()->getFrontController()->getRequest()->getRouteName() == 'cms' | |
) : ?> | |
// Put your homepage-only code in here. | |
<?php endif; ?> |
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
// Disable scroll zooming and bind back the click event | |
var onMapMouseleaveHandler = function (event) { | |
var that = $(this); | |
that.on('click', onMapClickHandler); | |
that.off('mouseleave', onMapMouseleaveHandler); | |
that.find('iframe').css("pointer-events", "none"); | |
} | |
var onMapClickHandler = function (event) { |
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 TokenAuthenticatable | |
extend ActiveSupport::Concern | |
module ClassMethods | |
def find_by_authentication_token(authentication_token = nil) | |
if authentication_token | |
where(authentication_token: authentication_token).first | |
end | |
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
// code for the shopping cart page | |
// "Proceed to Checkout" button HTML | |
<button type="button" title="Proceed to Checkout" class="button btn btn-danger btn-proceed-checkout btn-checkout" onclick="onCheckout()">Proceed to Checkout</button> | |
// JS | |
<script> | |
function onCheckout() { | |
dataLayer.push({ | |
'event': 'checkout', |
NewerOlder