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
// Vue path changer that ties in with ui-router. | |
// Add this somewhere, such as in your app runner, to catch the event. | |
addEventListener("requestPathChange", (e: CustomEventInit) => { | |
$state.go(e.detail.path, e.detail.params); | |
}); |
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
app.get("/some-endpoint", validate({...}), (req, res, next) => {}); |
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
<input type="password" show-password=""> |
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'; | |
angular.module('ngJsdifflib', []); | |
angular.module('ngJsdifflib').directive('jsdifflib', function () { | |
return { | |
restrict: 'E', | |
scope: { | |
previous: '=', | |
current: '=' |
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
<?xml version="1.0" encoding="utf-8"?> | |
<configuration> | |
<system.web> | |
<customErrors mode="off"/> | |
</system.web> | |
<system.webServer> | |
<httpErrors existingResponse="passthrough"/> | |
<handlers> | |
<add name="iisnode" path="server/app.js" verb="*" modules="iisnode"/> | |
</handlers> |
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 wodbc = require("./wodbc")(); | |
var data = { | |
UserName: 'Jane Doe' | |
} | |
wodbc.upsert('User', 'UserId', data, function (err, insertId) { ... |
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
Rails.application.routes.draw do | |
scope "/:locale" do | |
# blablabla.. | |
end | |
root to: "welcome#index" | |
get '/:locale' => 'welcome#index', :as => 'locale_root' | |
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
(function($) { | |
Drupal.behaviors.contact = { | |
attach: function (context, settings) { | |
$('.webform-client-form input').attr('readonly', false); | |
// Actions are stored in Drupal.ajax, every ajax call these identifiers might change. | |
$.each(Drupal.ajax, function(k, v) { | |
if(k.match(/edit-submitted-about/g)) { // The identifier I was aiming for was prefixed with "edit-submitted-about". | |
Drupal.ajax[k].options.beforeSerialize = function(element, options) { |
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 | |
/** | |
* Implements hook_menu_block_tree_alter(). | |
*/ | |
function mymodule_menu_block_tree_alter(&$tree, &$config) { | |
global $language; | |
$default = language_default('language'); | |
if($language->language != $default) { |
NewerOlder