Skip to content

Instantly share code, notes, and snippets.

View basicdays's full-sized avatar
🤷

Paul Sanchez basicdays

🤷
View GitHub Profile
@basicdays
basicdays / chicagojs.org lint output
Created October 9, 2018 15:04
Lint output of initial eslint config for chicagojs.org
/home/basicdays/Documents/wip/basicdays-consulting/chicagojs.org/gatsby-node.js
29:18 error Expected to return a value at the end of arrow function consistent-return
38:13 error Use object destructuring prefer-destructuring
/home/basicdays/Documents/wip/basicdays-consulting/chicagojs.org/src/cms/preview-templates/AboutPagePreview.js
10:3 error propType "entry" is not required, but has no corresponding defaultProp declaration react/require-default-props
13:3 error propType "widgetFor" is not required, but has no corresponding defaultProp declaration react/require-default-props
/home/basicdays/Documents/wip/basicdays-consulting/chicagojs.org/src/cms/preview-templates/BlogPostPreview.js
@basicdays
basicdays / Component Structure
Created July 22, 2014 17:32
Component JS Structure
File Structure
==============
/ component.json
| /lib
| /boot
| component.json
| index.js
| /some-model
| component.json
<?xml version="1.0"?>
<!-- For more information on using Web.config transformation visit http://go.microsoft.com/fwlink/?LinkId=125889 -->
<configuration xmlns:xdt="http://schemas.microsoft.com/XML-Document-Transform">
<!--
In the example below, the "SetAttributes" transform will change the value of
"connectionString" to use "ReleaseSQLServer" only when the "Match" locator
finds an atrribute "name" that has a value of "MyDB".
@basicdays
basicdays / node-mongodb ex
Last active December 24, 2015 11:09
Sample mongodb usage
'use strict';
var MongoClient = require('mongodb').MongoClient;
MongoClient.connect('mongodb://localhost/snmp', function(err, db) {
if (err) {error(err);}
db.collection('rawscandata5', function(err, collection) {
if (err) {error(err);}
collection.find().count(function(err, result) {
if (err) {error(err);}
console.log(result);
@basicdays
basicdays / node-mongodb-co ex
Last active December 24, 2015 11:08
Sample mongodb co usage
'use strict';
var co = require('co'),
MongoClient = require('mongodb').MongoClient;
function getConnection(connectionString) {
return function(next) {
MongoClient.connect(connectionString, next);
}
}