Skip to content

Instantly share code, notes, and snippets.

Dana Majid danamajid

Block or report user

Report or block danamajid

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View nosql-done-right-with-dynamodb.js
// See: https://www.youtube.com/watch?v=HaEPXoXVf2k
const AWS = require('aws-sdk');
AWS.config.update({region: 'us-east-1'});
const dynamoDb = new AWS.DynamoDB.DocumentClient({ api_version: '2012-08-10' });
const TABLE = 'single-table-design';
const GSI1 = 'gsi1';
const GSI1PK = `${GSI1}pk`;
const GSI1SK = `${GSI1}sk`;
View example.js
const AWS = require('aws-sdk');
AWS.config.update({region: 'us-east-1'});
const dynamoDb = new AWS.DynamoDB.DocumentClient({ api_version: '2012-08-10' });
const TABLE = 'single-table-design';
const GSI1 = 'gsi1';
const GSI1PK = `${GSI1}pk`;
const GSI1SK = `${GSI1}sk`;
const GSI2 = 'gsi2';
const GSI2PK = `${GSI2}pk`;
@danamajid
danamajid / dropdown-directive
Created Nov 7, 2014
Simple Dropdown Directive AngularJS
View dropdown-directive
app.directive('hasDropdown', function ($window, $timeout) {
return {
restrict: 'A',
replace: false,
link: function (scope, elm, attrs) {
elm.bind("click", open);
function open(e) {
elm[0].classList.add("open");
$timeout(function () {
You can’t perform that action at this time.