Skip to content

Instantly share code, notes, and snippets.

//<debug>
// If we have ?nolaunch query parameter, don't call Ext.application
//
if (location.search.match(/\bnolaunch\b/)) {
Ext.require(''); // still need the reequires from Ext.application
} else {
//</debug>
/*
* This file is responsible for launching the application. Application logic should be
@dongryphon
dongryphon / ConEmu
Last active September 3, 2017 21:54
My machine setups
# Create first, main (top-left) console
cmd.exe -cur_console:n /k pushd Q:\Data\Don\Git\configly & "%ConEmuBaseDir%\CmdInit.cmd"
# Split it evenly vertical to create (2nd) bottom-left console
cmd.exe -cur_console:s1TVn /k pushd Q:\Data\Don\Git\configly & "%ConEmuBaseDir%\CmdInit.cmd" & C:\Programs\Git\git-cmd.exe --no-cd --command=usr/bin/bash.exe -l -i
# Split 1st console (top-left) horizontally by 1/3 to create top-right
cmd.exe -cur_console:s1T33H /k pushd Q:\Data\Don\Git\phylo & "%ConEmuBaseDir%\CmdInit.cmd"
# Split 1st console again now by 1/2 to create top-center
@dongryphon
dongryphon / add.sql
Last active October 24, 2023 16:29
Closure table triggers
-- NOTE: Organizations have id and parentOrgId columns
-- OrgClosure has parentId, childId, depth columns
CREATE OR REPLACE TRIGGER Org_Add_Trigger
AFTER INSERT ON Organization
REFERENCING NEW AS NEW
FOR EACH ROW
BEGIN
-- must insert in this order...
insert into OrgClosure (parentId, childId, depth)
@dongryphon
dongryphon / selenium-login.t.js
Last active March 9, 2020 11:26
Testing JavaScript Applications
const webdriver = require('selenium-webdriver');
describe('Happy path', function() {
let driver;
const Page = {
name : 'name',
pswd : 'pswd',
login : 'login',
getEl(locator) {
<!DOCTYPE html>
<html>
<head>
<!-- Required for IE11 compatibility-->
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
<!-- Web interface -->
const project = new Siesta.Project.Browser();
project.configure({
title : 'Basic browser test suite',
pageUrl: '../index.html'
});
project.plan(
{
group : 'Login',
describe('Login to application', t => {
const Page = {
name : 'input[name="name"]',
pswd : 'input[type="password"]',
login : 'input[type="button"]'
};
t.it('should login with name and password', async t => {
await t.click(Page.name);
await t.type(Page.name, 'dongryphon');