Skip to content

Instantly share code, notes, and snippets.

View bodhiprice's full-sized avatar

Bodhi Price bodhiprice

  • Florida
View GitHub Profile
@bodhiprice
bodhiprice / queryDynamoAsync.js
Last active October 28, 2020 02:18
Query all items in DynamoDb using async/await
// Assumes using serverless-webpack or Node 14+
// See here for more details: https://stackoverflow.com/a/60896150
import DynamoDB from 'aws-sdk/clients/dynamodb';
const docClient = new DynamoDB.DocumentClient();
export const handler = async () => {
const params = {
TableName: 'table-name',
<template>
<section class="container">
<div>
<app-logo>
<h1 class="title">
Demo
</h1>
<h2 class="subtitle">
My project
</h2>
@bodhiprice
bodhiprice / scripts.js
Last active August 29, 2015 14:04
Working with dates and localStorage example
var d1 = new Date();
var d2 = new Date();
localStorage.d1 = d1; // add to localStorage
localStorage.d2 = d2;
d1 = Date.parse(localStorage.d1); // pull from localStorage and parse to date object
d2 = Date.parse(localStorage.d2);
console.log(d2 - d1); // milliseconds elapsed between the two times.
localStorage.clear(); // clear local storage
git rm -r --cached .
git add .
git commit -m 'reset .gitignore'