Skip to content

Instantly share code, notes, and snippets.

View AdamSaleh's full-sized avatar

Adam Saleh AdamSaleh

View GitHub Profile
behavior: "User login"
given: user $LOGIN $PASSWORD created
when: login $LOGIN $PASSWORD
then: user $LOGIN loggedin
precondition: user $LOGIN has-privilege-to $ACTION $SCOPE $OBJECTS
given: team $TEAM created
given: team $TEAM contains $LOGIN
given: team $TEAM has-privilege-to $ACTION $SCOPE $OBJECTS
{
"name":"exportscript",
"hostname":"localhost.localdomain",
"pid":2113,
"level":20,
"msg":"Command Complete { stdout: '',
stderr: 'Tue Sep 1 07:01:17.525 starting new replica set monitor for replica set ppa4-mbaas1_rs1 with seed of ppa4-mbaas1-ship1.feedhenry.net:27017,ppa4-mbass1-ship2.feedhenry.net:27017,ppa4-mbaas1-mgt1:27017\
Tue Sep 1 07:01:17.646 successfully connected to seed ppa4-mbaas1-ship1.feedhenry.net:27017 for replica set ppa4-mbaas1_rs1\
Tue Sep 1 07:01:17.765 changing hosts to { 0: \"ppa4-mbaas1-ship1.feedhenry.net:27017\", 1: \"ppa4-mbaas1-ship2.feedhenry.net:27017\" } from ppa4-mbaas1_rs1/\
Tue Sep 1 07:01:17.765 trying to add new host ppa4-mbaas1-ship1.feedhenry.net:27017 to replica set ppa4-mbaas1_rs1\
@AdamSaleh
AdamSaleh / protocol.js
Last active August 31, 2015 13:32
Experimental protocol.js
var elementByRecursion = require('./element-commands/_elementByRecursion.js');
var elementsByRecursion = require('./element-commands/_elementsByRecursion.js');
module.exports = function(Nightwatch) {
var MOUSE_BUTTON_LEFT = 'left',
MOUSE_BUTTON_MIDDLE = 'middle',
MOUSE_BUTTON_RIGHT = 'right',
DIRECTION_UP = 'up',
DIRECTION_DOWN = 'down';
@AdamSaleh
AdamSaleh / gist:0615769ffc120660a381
Created August 31, 2015 12:57
Testing javascript injection
var jqueryInjector = function(callback) {
jqueryUrl = 'https://code.jquery.com/jquery-1.11.3.min.js';
if (typeof jQuery == 'undefined') {
var script = document.createElement('script');
var head = document.getElementsByTagName('head')[0];
var done = false;
script.onload = script.onreadystatechange = (function() {
if (!done &&
(!this.readyState || this.readyState == 'loaded' || this.readyState == 'complete')) {
done = true;
{"name":"exportscript","hostname":"localhost.localdomain","pid":20120,"level":30,"msg":"Migrating Appforms Data For Domain domtestdata5","time":"2015-08-31T10:34:51.665Z","v":0}
{"name":"exportscript","hostname":"localhost.localdomain","pid":20120,"level":30,"msg":"Domain Database Exists, Proceeding With Migration","time":"2015-08-31T10:34:51.669Z","v":0}
{"name":"exportscript","hostname":"localhost.localdomain","pid":20120,"level":30,"msg":"Performing Action stop-app For All Apps In Domain domtestdata5","time":"2015-08-31T10:34:51.669Z","v"
:0}
{"name":"exportscript","hostname":"localhost.localdomain","pid":20120,"level":30,"msg":"Domain Database Exists, Proceeding With Migration","time":"2015-08-31T10:34:51.672Z","v":0}
{"name":"exportscript","hostname":"localhost.localdomain","pid":20120,"level":30,"msg":".\n||\n|\n |\n-|\n'","time":"2015-08-31T10:34:51.675Z","v":0}
{"name":"exportscript","hostname":"localhost.localdomain","pid":20120,"level":30,"msg":"Exporting Appforms Data For Domain domtestdata5","time
$ mongo
MongoDB shell version: 2.4.6
connecting to: test
ppa4-core_rs1:PRIMARY> use testing
switched to db testing
ppa4-core_rs1:PRIMARY> show collections
appconfigs
appforms
appthemes
fields
Error importing collection { error: { [Error: Command failed: ] killed: false, code: 255, signal: null },
stdout: '',
stderr: 'connected to: ppa4-core-node1.feedhenry.net:27017\nWed Aug 19 04:40:26.314 dropping: dom1.themes
Wed Aug 19 04:40:26.450 exception:BSON representation of supplied JSON is too large: code FailedToParse: FailedToParse: Date expecting integer milliseconds: offset:15740
Wed Aug 19 04:40:26.450 \nWed Aug 19 04:40:26.450 exception:BSON representation of supplied JSON is too large: code FailedToParse: FailedToParse: Date expecting integer milliseconds: offset:15733\n
Wed Aug 19 04:40:26.450 \n
Wed Aug 19 04:40:26.451 exception:BSON representation of supplied JSON is too large: code FailedToParse: FailedToParse: Date expecting integer milliseconds: offset:15748\n
Wed Aug 19 04:40:26.451
Wed Aug 19 04:40:26.451 exception:BSON representation of supplied JSON is too large: code FailedToParse: FailedToParse: Date expecting integer milliseconds: of
curl -k 'https://testing.feedhenry.me/box/srv/1.1/dat/log/read' -H 'Cookie: feedhenry_v=3; feedhenry=acwqbnigaw33avs3kbng7gfv; csrf=eaeb4c189ea72494ac32f64d6da3dc47; i18next=en' -H 'Origin: https://testing.feedhenry.me' -H 'Accept-Encoding: gzip, deflate' -H 'X-CSRF-Token: eaeb4c189ea72494ac32f64d6da3dc47' -H 'Accept-Language: en-US,en;q=0.8' -H 'User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/39.0.2171.95 Safari/537.36' -H 'X-FH-Studio-Version: 3.12.0-1555' -H 'Content-Type: application/json' -H 'Accept: application/json, text/javascript, */*; q=0.01' -H 'Referer: https://testing.feedhenry.me/' -H 'X-Requested-With: XMLHttpRequest' -H 'Connection: keep-alive' --data-binary '{"cacheKeys":[{"cacheKey":"a73e57a9bc21ec9b31c66ddd402414eb","start":0}]}' --compressed
{
"title":"test7",
"templateId":null,
"apps":[
],
"services":[
],
"template":{
@AdamSaleh
AdamSaleh / gist:ecf15a381a9804101011
Created August 17, 2015 07:33
fh-project-create-problem
{
"title":"test4",
"templateId":null,
"apps":[
],
"services":[
],
"template":{