Skip to content

Instantly share code, notes, and snippets.

@beresmate
beresmate / machine.js
Created April 27, 2021 17:42
Generated by XState Viz: https://xstate.js.org/viz
const mhrMachine = Machine({
id: 'mhrMachine',
initial: 'metaData',
states: {
metaData: {
initial: 'empty',
states: {
empty: {
on: {
METADATA_CACHE_REUSED: 'populated',
{
// Details: https://github.com/victorporof/Sublime-JSHint#using-your-own-jshintrc-options
// Example: https://github.com/jshint/jshint/blob/master/examples/.jshintrc
// Documentation: http://www.jshint.com/docs/
"curly": true,
"eqeqeq": true,
"latedef": true,
"quotmark": "single",
"undef": true,
54 error git fetch -a origin (https://github.com/gawkermedia/soy-grunt-task.git) error: cannot open FETCH_HEAD: Permission denied
55 silly lockFile e480c54a-m-gawkermedia-soy-grunt-task-git https://github.com/gawkermedia/soy-grunt-task.git
56 error Error: Command failed: error: cannot open FETCH_HEAD: Permission denied
56 error
56 error
56 error at ChildProcess.exithandler (child_process.js:637:15)
56 error at ChildProcess.EventEmitter.emit (events.js:98:17)
56 error at maybeClose (child_process.js:735:16)
56 error at Socket.<anonymous> (child_process.js:948:11)
56 error at Socket.EventEmitter.emit (events.js:95:17)
@beresmate
beresmate / mocha-wd-test.js
Last active December 31, 2015 04:09
Runs a simple webdriver test via Mocha
describe('After the user logs in', function () {
// setting the timeout for the suite
this.timeout(30000);
// get the existing sessionId from the environment variables,
// and attach our browser to it
before(function (done) {
var sessionId = process.env.sessionId,
browser = wd.promiseChainRemote();
@beresmate
beresmate / parallel-test-task.js
Last active May 12, 2016 18:17
Run mocha processes parallel from a Grunt task.
module.exports = function (grunt) {
// collect the test files from our test folder
// for example grunt.file.expand
function getTests () {
var tests = [
{
filePath: '/Users/Mate/Desktop/LoginTest.js',
name: 'Login test'
},
{
2013-11-22 17:11:40.431:WARN:osjs.ServletHandler:Error for /grid/resources/images/console-beta.css
java.lang.Error: Cannot find resource images/console-beta.css
at org.openqa.grid.web.servlet.ResourceServlet.process(ResourceServlet.java:58)
at org.openqa.grid.web.servlet.ResourceServlet.doGet(ResourceServlet.java:48)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
at org.seleniumhq.jetty7.servlet.ServletHolder.handle(ServletHolder.java:565)
at org.seleniumhq.jetty7.servlet.ServletHandler.doHandle(ServletHandler.java:479)
at org.seleniumhq.jetty7.server.session.SessionHandler.doHandle(SessionHandler.java:225)
at org.seleniumhq.jetty7.server.handler.ContextHandler.doHandle(ContextHandler.java:1031)
/* global module, require */
(function () {
'use strict';
var library = require('./../app/controllers/library'),
views = require('./../app/controllers/views'),
_ = require('lodash');
module.exports = function (app, io) {
/* global module, require */
(function () {
'use strict';
var library = require('./../app/controllers/library'),
views = require('./../app/controllers/views'),
_ = require('lodash');
module.exports = function (app, io) {
/* global module, require */
(function () {
'use strict';
var library = require('./../app/controllers/library'),
views = require('./../app/controllers/views'),
_ = require('lodash');
module.exports = function (app, io) {
@beresmate
beresmate / hint.js
Last active December 25, 2015 08:49
// https://github.com/gawkermedia/kinja-mantle/blob/grunt-soy/build/mantle.js#L51
jsFilesExceptLib: function () {
return global.mantle.getCachedList('jsFilesExceptLib.txt', function () {
//return _.map(_.filter(grunt.file.expand({..
});
}
// https://github.com/gruntjs/grunt/wiki/grunt.file#gruntfileexpand
// This method accepts either comma separated globbing patterns or an array of globbing patterns.
// Paths matching patterns that begin with ! will be excluded from the returned array.