Skip to content

Instantly share code, notes, and snippets.

View asteriusj's full-sized avatar

J Stewart asteriusj

  • Asterius Media LLC
View GitHub Profile
import './components/error/error'
import content404 from './components/404/404.html'
import DATA_SERVICE from './utils/data'
const ds = new DATA_SERVICE()
// get SPA containing element
const $el = document.getElementById('app')
// define routes
const home = async () => {
await import('./components/recipe/recipe')
import template from './recipe.html'
import DATA_SERVICE from '../../utils/data'
export default class Recipe extends HTMLElement {
constructor () {
// attach shadow DOM, initialize private recipe property, and initialize data service
super()
this._shadowRoot = this.attachShadow({ mode: 'open' })
this._recipe = null
this.ds = new DATA_SERVICE()
}
@bmorelli25
bmorelli25 / allScrape.js
Created October 24, 2017 17:27
Scrape all books on the hompage
const puppeteer = require('puppeteer');
let scrape = async () => {
const browser = await puppeteer.launch({headless: false});
const page = await browser.newPage();
await page.goto('http://books.toscrape.com/');
const result = await page.evaluate(() => {
let data = []; // Create an empty array that will store our data
anonymous
anonymous / form.json
Created April 10, 2016 15:37
A saved configuration for a schema form example, http://textalk.github.io/angular-schema-form/examples/bootstrap-example.html
[
{
"type": "help",
"helpvalue": "<h4>Tabbed Array Example</h4><p>Tab arrays can have tabs to the left, top or right.</p>"
},
{
"key": "comments",
"type": "tabarray",
"add": "New",
"remove": "Delete",
@apaatsio
apaatsio / dynamodb-rest-api-lambda.js
Last active September 13, 2019 16:13
Single Lambda function for all CRUD operations with DynamoDB in REST API
console.log('Loading function');
var doc = require('dynamodb-doc');
var dynamo = new doc.DynamoDB();
/**
* Provide an event that contains the following keys:
*
* - operation: one of the operations in the switch statement below
* - tableName: required for operations that interact with DynamoDB

Hot Progress Bar Widget

Description

This widget is a fork of the original Progress Bar Widget, a widget made for Dashing.

The original widget shows multiple animated progress bars and reacts dynamically to new information being passed in. This forked widget adds the possibility to define warning and critical thresholds for each progress bars, which will change their color depending on the threshold reached.

Anything with a current state and with a projected max/goal state can easily be represented with this widget.

@masha256
masha256 / README.md
Last active January 3, 2021 07:54
Google Gauge for Dashing

Description

A Dashing widget to show a Google Visualizations Gauge on a dashboard.

Installation

Copy the google_gauge.coffee, google_gauge.html and google_gauge.scss file to into /widgets/google_gauge directory.

Add the following to the dashboard layout file:

@gregology
gregology / README.md
Created March 19, 2013 14:47
Facebook link stats

Setup

Put the facebooklinkstats.rb to jobs/facebooklinkstats.rb.

Add the code from facebooklinkstats.erb to the desired dashboard.

Preview

@JanPaulEttles
JanPaulEttles / nestedformtojson.json
Created December 8, 2011 15:26
nestedformtojson #1
"meh": {
"feh": "what ever the user types into the form field",
"bleh": "what ever the user types into the form field"
}