Skip to content

Instantly share code, notes, and snippets.

View sebdah's full-sized avatar
:shipit:
Trust the source

Sebastian Dahlgren sebdah

:shipit:
Trust the source
View GitHub Profile
@sebdah
sebdah / gist:9641147
Created March 19, 2014 13:01
Example use of Dynamic DynamoDB with regexp (issue 129)
[sebastian ~/tmp]$ ~/git/sebdah/dynamic-dynamodb/dynamic-dynamodb --config dyndyn-101.conf --dry-run
2014-03-19 14:00:07,009 - dynamic-dynamodb - DEBUG - dryrun - Authenticating to SNS using credentials in configuration file
2014-03-19 14:00:07,010 - dynamic-dynamodb - DEBUG - dryrun - Connected to SNS in ap-southeast-1
2014-03-19 14:00:07,011 - dynamic-dynamodb - DEBUG - dryrun - Connecting to DynamoDB in ap-southeast-1
2014-03-19 14:00:07,011 - dynamic-dynamodb - DEBUG - dryrun - Authenticating to DynamoDB using credentials in configuration file
2014-03-19 14:00:07,012 - dynamic-dynamodb - DEBUG - dryrun - Connected to DynamoDB in ap-southeast-1
2014-03-19 14:00:07,061 - dynamic-dynamodb - DEBUG - dryrun - Authenticating to CloudWatch using credentials in configuration file
2014-03-19 14:00:07,062 - dynamic-dynamodb - DEBUG - dryrun - Connected to CloudWatch in ap-southeast-1
2014-03-19 14:00:08,328 - dynamic-dynamodb - DEBUG - dryrun - Table CLIENT_GEN_PRO_002 match with config key ^CLIENT_GEN_PRO_002|CLIE
@sebdah
sebdah / gist:10364185
Created April 10, 2014 10:05
index.html for Meteor-Cordova
<!DOCTYPE html>
<!--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
@sebdah
sebdah / .jshintrc
Created May 23, 2014 06:24
.jshintrc for NodeJS
{
"globals" : {
"describe" : false,
"it" : false,
"before" : false,
"beforeEach" : false,
"after" : false,
"afterEach" : false
},
"camelcase": true,
/**
* This function converts '.' and '$' to their unicode equivalents.
*
* . is converted to U+FF0E
* $ is converted to U+FF04
*
* More details at:
* http://docs.mongodb.org/manual/reference/limits/#Restrictions-on-Field-Names
* http://docs.mongodb.org/manual/faq/developers/#faq-dollar-sign-escaping
*
@sebdah
sebdah / gist:c2cf1404b0ab4b03ab7b
Created June 24, 2014 10:54
SNS notification configuration example
[table: ^my_table$]
...
#
# Simple Notification Service configuration
#
# Topic ARN to publish notifications to
#
# Example:
@sebdah
sebdah / client.html
Created June 24, 2014 12:30
Bootstrap3 with accounts support in MeteorJS
<head>
<title>Bootstrap3 test</title>
</head>
<body>
{{>menu}}
{{>welcome}}
</body>
<template name="welcome">
@sebdah
sebdah / client.html
Last active August 29, 2015 14:02
Accessing parent data in MeteorJS
<template name="garage">
<h1>Garage: </h1>
Cars in the garage:<br/>
<ul>
{{#each cars}}
<li>{{registrationNumber}} {{owner}} - <button class="removeCar"></li>
{{/each}}
</ul>
</template>
@sebdah
sebdah / example-update.py
Created June 24, 2014 12:43
Updating throughput in DynamoDB global secondary indexes with boto
connection.update_table(
table_name='MailPostsExperimet',
global_secondary_index_updates=[
{
"Update": {
"IndexName": "gsiPosts",
"ProvisionedThroughput": {
"ReadCapacityUnits": 2,
"WriteCapacityUnits": 2
}
@sebdah
sebdah / gist:6c07f113654c6e5e341f
Created June 24, 2014 12:46
Accessing GitHub user data in Meteor client
Accounts.onCreateUser(function(options, user) {
if (options.profile) {
user.profile = options.profile;
}
user.profile.github = {};
user.profile.github.accessToken = user.services.github.accessToken;
user.profile.github.email = user.services.github.email;
user.profile.github.username = user.services.github.username;
@sebdah
sebdah / client.html
Created June 24, 2014 12:51
Tutorial: Writing your first Meteor application - Writing the HTML template
<head>
<title>Chat app</title>
</head>
<body>
<h1>Chatapp</h1>
{{> welcome }}
</body>
<template name="welcome">