Skip to content

Instantly share code, notes, and snippets.

intergalactic-overlords / rename.js
Created December 3, 2019 14:48
replace all package.json byindex.js
View rename.js
var fs = require('fs');
var path = require('path');
const replacePackageByIndex = function(dir) {
const list = fs.readdirSync(dir);
const dirName = path.basename(dir)
list.forEach(function(file) {
if (file === "package.json") {
fs.writeFile(`${dir}/index.js`, createIndexContents(dirName), (err) => {
if (err) {
intergalactic-overlords / gist:83114074087666967da3
Created March 5, 2015 10:35
gulp task for running protractor e2e test on saucelabs through sauce connect
View gist:83114074087666967da3
var sauceConnectLauncher = require('sauce-connect-launcher');
// connects to saucelabs server and runs protractor e2e tests against saucelabs server
gulp.task('e2e_protractor_sauce', function() {
username: 'xxx',
accessKey: 'xxxx',
// logger: console.log
}, function (err, sauceConnectProcess) {
if (err) {
View Create the following folders and files in your theme
folder ds_layouts
> folder ds_1col_linked
> file ds-1col-linked.tpl.php
> file
View Allowed html elements
<a> <em> <strong> <cite> <blockquote> <code> <ul> <ol> <li> <dl> <dt> <dd> <h2> <h3> <h4> <p> <br/> <img> <table> <thead> <tbody> <tfoot> <tr> <th> <td> <hr/>