Skip to content

Instantly share code, notes, and snippets.

import { Injectable } from '@angular/core';
import * as globals from '../globals';
import { NGXLogger, NgxLoggerLevel } from 'ngx-logger';
import { HttpClient } from '@angular/common/http';
import * as $ from 'jquery';
import { SettingsService } from '../utils/settings.service';
/**
* @title Speak service,
* Service to speak and highlight the words on the page.
@drorm
drorm / schemaspy.cfg
Last active October 20, 2023 12:49
schemaspy for redshift
# type of database. Run with -dbhelp for details
schemaspy.t=redshift
# optional path to alternative jdbc drivers.
schemaspy.dp=./RedshiftJDBC42-1.2.7.1003.jar
# database properties: host, port number, name user, password
schemaspy.host=xxxxx.yyyy.eu-west-1.redshift.amazonaws.com
schemaspy.port=5439
schemaspy.db=test
schemaspy.u=test
schemaspy.p=***************
@drorm
drorm / awb_eb_cheatsheet.md
Last active April 7, 2016 18:31
AWS EB cheat sheet
<!doctype html>
<html>
<head>
<title>Empty Page</title>
<meta charset="utf-8" />
</head>
<body>
@drorm
drorm / reloadUntil.js
Created August 31, 2015 22:19
Casper function to reload a page until a condition is met
/**
* Reload a page until a selector satisfies a condition
* is changed to a different value.
*
* @param String selector The CSS selector we're looking at
* @param Number delay How long to wait till we reload the page
* @param Function testFunc A function to determine if we found what we're looking for
* @param String result The text found by the selector that is passed to the above function
* @return Does not return anything
*/
@drorm
drorm / nighwatch.json
Last active August 29, 2015 14:20
Nightwatch.js local with phantom.js or on saucelabs
{
"src_folders" : ["tests"],
"output_folder" : "reports",
"custom_commands_path" : "",
"custom_assertions_path" : "",
"page_objects_path" : "",
"globals_path" : "",
"selenium" : {
"start_process" : false,
@drorm
drorm / chat.html
Last active August 29, 2015 14:02
Node http-proxy websockets
<html>
<head>
<script src="/socket.io/socket.io.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.6.4/jquery.min.js"></script>
</head>
<body>
<script>
var URL = window.location.protocol + "//" + window.location.host;
console.log("Connecting to " + URL);
var socket = io.connect(URL);
@drorm
drorm / proxy.js
Created December 4, 2012 20:07
Meteor Proxy server
"use strict";
var httpProxy = require('http-proxy'),
http = require('http'),
accesslog = require('access-log'),
addresses;
var LISTENPORT = 80; //port we're listening to the outside world
var METEORPORT = 3000; //port meteor is run on the guests
var MINIP = 10; //Minimum IP address we can use. Smaller numbers are for admin purposes
@drorm
drorm / race.html
Created October 28, 2012 05:21
Handlebars race condition
<title>race</title>
</head>
<body>
{{> hello}}
</body>
<template name="hello">
<h1>Hello World!</h1>
<br/>