Skip to content

Instantly share code, notes, and snippets.

View benkeen's full-sized avatar

Ben Keen benkeen

View GitHub Profile
const fs = require('fs');
const ORIGINAL_LOCALE_FOLDER = './src/locale';
const NEW_DATA_FOLDER = './src/data';
// our new data folder
if (!fs.existsSync(NEW_DATA_FOLDER)){
fs.mkdirSync(NEW_DATA_FOLDER);
}
@benkeen
benkeen / papaparse.txt
Last active September 16, 2015 12:19
Current situation
-----------------
Two scripts have special treatment in grunt to allow them to work in local + prod:
Ace
- referenced as a requireJS dependency and thus included in the require.js bundle.
- The Ace themes + modes AREN'T, however & therefore copied over manually by grunt.
- they're copied to an /ace subfolder. I think the subfolder is needed because of
the "ace/ace" use as the requireJS name. see:
<!DOCTYPE html>
<html>
<head>
<style type="text/css">
html {
/* NEEDED */
height: 100%;
}
body {
<!DOCTYPE html>
<html>
<head>
<style type="text/css">
html {
/* NEEDED */
height: 100%;
}
body {
var MyComponent = FauxtonAPI.createClass({
// this would contain the React.createClass() stuff like now. the FauxtonAPI wrapper would
// handle the instantiation for us
component: function (stores) {
return {
getInitialState: function () {
{
"warehouse_name": {
"sources": [
{
"name": "sourcename",
"doc_url": "document1_url",
"replication_status": {
"status": "running",
"sub_status": "initial",
"time": "2015-07-09T21:05:11Z",
@benkeen
benkeen / findZIndexes
Created July 9, 2015 16:12
Find all elements in a page with a z-index set
$('*').filter(function() {
return $(this).css("zIndex") !== "auto";
}).each(function(row, item) {
console.log(item, $(item).css("zIndex"));
});
{
"total_rows":19,
"offset":3,
"rows":[
{
"id":"_design/411df74ea205461521b4ca74ddc527580fabf828",
"key":"_design/411df74ea205461521b4ca74ddc527580fabf828",
"value":{
"rev":"2-47fb9cc3c58247f2665126d9cfdf1156"
},
var Parent = FauxtonAPI.createReactClass('Parent', {
render: function () {
var Child = FauxtonAPI.getReactClass('child');
return (
<div>
<Child />
</div>
);
}
});