This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
it "delete in an Array" , -> | |
element.all(By.repeater('a in Array.list')).count() | |
.then (@number_of_rows_before) -> | |
element.all(By.css('i.fa.fa-chevron-up')).last().click() | |
element.all(By.css('a.glyphicon.glyphicon-trash')).last().click() | |
.then () -> | |
waitForAlert() | |
.then () -> | |
browser.switchTo().alert().accept() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env node |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
app.use(function (req, res, next){ | |
res.set('X-Powered-By', 'NameApplication'); | |
next(); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function findDeep(obj, key) { | |
if (_.has(obj, key)) | |
return [obj]; | |
return _.flatten(_.map(obj, function(v) { | |
return typeof v == "object" ? findDeep(v, key) : []; | |
}), true); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var nw = require('nw.gui'); | |
var win = nw.Window.get(); | |
var nativeMenuBar = new nw.Menu({ type: "menubar" }); | |
if (nativeMenuBar.createMacBuiltin) { | |
nativeMenuBar.createMacBuiltin("User-factory"); | |
} | |
win.menu = nativeMenuBar; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<link rel="import" href="../ace-element/ace-element.html"> | |
<link rel="import" href="../chart-js/chart-js.html"> | |
<link rel="import" href="../paper-calculator/paper-calculator.html"> | |
<polymer-element name="my-element"> | |
<template> | |
<style> | |
:host { | |
position: absolute; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var dirFolder= 'TODO/'; | |
var newName = 'TODO' | |
function renameFolder(dirFolder, newName){ | |
var fileList = fs.readdirSync(dirFolder); | |
console.log('we found '+ fileList.length +' files') | |
for(var i=1 ;i<fileList.length; i++){ | |
fs.renameSync(dirFolder+fileList[i], newName); | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var dirFolder= 'TODO/'; | |
function getFileInFolder(dirFolder){ | |
var fileList = fs.readdirSync(dirFolder); | |
console.log('list of files in the folder: '+ fileList) | |
console.log('we found '+ fileList.length +' files') | |
return fileList; | |
} | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Dependancies: npm install -g jsonfile fs | |
var fs = require('fs'); | |
var jsonFile = require('jsonfile'); | |
//update | |
var dirFolder= 'TODO'; | |
var poop = "TODO"; | |
var jsonFileList = fs.readdirSync(dirFolder); | |
console.log('list of files in the folder: '+ jsonFileList) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function traverse(obj) { | |
if (obj instanceof Array) { | |
for (var i=0; i<obj.length; i++) { | |
if (typeof obj[i] == "object" && obj[i]) { | |
callback(i); | |
traverse(obj[i]); | |
} else { | |
callback(i, obj[i]) | |
} | |
} |