Skip to content

Instantly share code, notes, and snippets.

{
"$schema": "https://schema.management.azure.com/schemas/2018-05-01/subscriptionDeploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"metadata": {
"_generator": {
"name": "bicep",
"version": "0.11.1.770",
"templateHash": "14662597527208625730"
}
},
import { objectAssign } from '../services/utils'
import { getOidcConfig, getOidcCallbackPath, createOidcUserManager, addUserManagerEventListener, removeUserManagerEventListener, tokenIsExpired, tokenExp } from '../services/oidc-helpers'
import { dispatchCustomBrowserEvent } from '../services/browser-event'
import { openUrlWithIframe } from '../services/navigation'
export default (oidcSettings, storeSettings = {}, oidcEventListeners = {}) => {
const oidcConfig = getOidcConfig(oidcSettings)
const oidcUserManager = createOidcUserManager(oidcSettings)
storeSettings = objectAssign([
{
const { jarFromCookies } = require('insomnia-cookies');
module.exports.templateTags = [
{
name: 'cookieJar',
displayName: 'CookieJar',
description: 'reference cookie value from cookie jar',
args: [
{
type: 'string',
$(function () {
$('select[data-jms=true]').multiselect({
open: function(event, ui) {
//This hack needs to be merged into the real multiselect js.
$(this).parent().find('button.ui-multiselect').attr('tabindex', '-1');
},
close: function(event, ui) {
$(this).parent().find('button.ui-multiselect').focus();
}
});
<?php
/**
* Get a subset of the items from the input data.
*
* @param array $keys
* @return array
*/
public function only($keys)
{
$keys = is_array($keys) ? $keys : func_get_args();
var i = 0;
function appendRow() {
$('#row')
.clone()
.attr('id', '')
.find(':input')
.each(function(index) {
$(this).attr({
'id': function(_, id) { return id + '[' + i + '_' + (index + 1) + ']' },
@coolhome
coolhome / fixperm.sh
Created March 4, 2013 03:28
Fix permissions after install of vtiger 5.4. Fixes a lot of issues!
#Permission Fix
find ./ -type d -exec chmod 755 {} \;
find ./ -type f -exec chmod 644 {} \;
chmod 777 ./config.inc.php
chmod 777 ./parent_tabdata.php
chmod 777 ./tabdata.php
chmod 644 ./cache/
chmod 644 ./test/wordtemplatedownload/
chmod 644 ./storage/
chmod 644 ./test/product/
@coolhome
coolhome / compile.py
Last active December 13, 2015 23:39
Python script to compile ChesterGL
# compile.py
# - Version: 1.0
# - Replacement for the Makefile. This is cross-platform.
# - Requires Python 2.7+
import sys, argparse, subprocess, urllib2
externs = ['jquery-1.7.js', 'webkit_console.js', 'google_analytics_api.js', 'json.js']
src = ['chesterGL/core.js', 'chesterGL/block.js', 'chesterGL/blockFrames.js', 'chesterGL/blockGroup.js', 'chesterGL/actions.js', 'chesterGL/tmxBlock.js', 'chesterGL/GPUParticleSystem.js', 'chesterGL/primitivesBlock.js', 'chesterGL/labelBlock.js', 'chesterGL/bmFontLabelBlock.js']
parser = argparse.ArgumentParser(description='Compiler for ChesterGL')
#include "FrameTest.hpp"
BEGIN_EVENT_TABLE(FrameTest, wxFrame)
EVT_TREE_ITEM_ACTIVATED(wxID_ANY, FrameTest::HandleOnSelect)
END_EVENT_TABLE()
FrameTest::FrameTest(wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style)
: wxFrame(parent, id, title, pos, size, style)
{
@coolhome
coolhome / gist:1029724
Created June 16, 2011 17:18
Testing sf::Window::GetPosition();
#include <SFML/Graphics.hpp>
#include <iostream>
#include <sstream>
#include <string>
//Hack! I know lol
std::string IntToString(int x)
{
std::ostringstream output;
output << x;