- Put storage (dynamo, rds, s3, etc) in its own nested stack, seperate from other resources, and reference them externally. This allows us to delete all other resources types without affecting existing storage.
- When possible, do not pass in whole resources from one stack to another. This is fine for nested stacks within the same parent stack, but in the 'main' context it creates tight coupling between stacks and can make them more brittle to change.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# guide https://www.nanoant.com/mac/macos-function-key-remapping-with-hidutil | |
# map https://www.freebsddiary.org/APC/usb_hid_usages.php | |
hidutil property --matching '{"ProductID":0x07a5}' --set '{ | |
"UserKeyMapping":[ | |
{"HIDKeyboardModifierMappingSrc":0x000700000039,"HIDKeyboardModifierMappingDst": 0x00070000002b}, | |
{"HIDKeyboardModifierMappingSrc":0x0007000000E0,"HIDKeyboardModifierMappingDst": 0x0007000000E3}, | |
{"HIDKeyboardModifierMappingSrc":0x0007000000E4,"HIDKeyboardModifierMappingDst": 0x0007000000E7}, | |
{"HIDKeyboardModifierMappingSrc":0x0007000000E3,"HIDKeyboardModifierMappingDst": 0x0007000000E0}, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ "hello" : "world" } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const sinon = require('sinon'); | |
const _ = require('lodash'); | |
const chai = require('chai'); | |
const unique = ()=> Math.random().toString(); | |
const quickCommand = (command, obj, ...keys) => { | |
_.forEach(keys, function(item){ | |
obj[item] = sinon[command](obj, item); | |
}); | |
}; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function valuesToList() { | |
var head, tail; | |
head = tail = { value : arguments[0] }; | |
for(var i = 1; i < arguments.length; i++){ | |
tail = tail.next = { value : arguments[i] }; | |
} | |
return head; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static void MapMvcAttributeRoutes(this RouteCollection routeCollection, Assembly controllerAssembly) | |
{ | |
var controllerTypes = (from type in controllerAssembly.GetExportedTypes() | |
where | |
type != null && type.IsPublic | |
&& type.Name.EndsWith("Controller", StringComparison.OrdinalIgnoreCase) | |
&& !type.IsAbstract && typeof(IController).IsAssignableFrom(type) | |
select type).ToList(); | |
var attributeRoutingAssembly = typeof(RouteCollectionAttributeRoutingExtensions).Assembly; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Web; | |
namespace ThinkingSites | |
{ | |
public class Injection | |
{ | |
private static Dictionary<Type, Func<object>> Registry = new Dictionary<Type, Func<object>>(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
virtualenv --no-site-packages ./ | |
. bin/activate | |
pip install nodeenv | |
nodeenv --node=X.X.X -p | |
npm install -g npm | |
git clone [email protected]:your-user/ua-b2c.git |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var React = require('react'); | |
var ReactDOM = require('react-dom'); | |
var document = global.document; | |
module.exports = React.createClass({ | |
componentDidMount : function() { | |
this.node = document.getElementById('component-modal-overlay'); | |
if(!this.node){ | |
this.node = document.createElement("div"); | |
this.node.id = 'component-modal-overlay' |
NewerOlder