-
Update your dependencies inside
package.json
Switch internal app archetype
@walmart/electrode-archetype-react-app @walmart/electrode-archetype-react-app-dev
This file contains 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
# Dont forget to set the env variable "certdomain", and either fill in your email below or use an env variable for that too. | |
# Also note that this config is using the LetsEncrypt staging server, remove the flag when ready! | |
Resources: | |
sslSecurityGroupIngress: | |
Type: AWS::EC2::SecurityGroupIngress | |
Properties: | |
GroupId: {"Fn::GetAtt" : ["AWSEBSecurityGroup", "GroupId"]} | |
IpProtocol: tcp | |
ToPort: 443 |
This file contains 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
// Cartesian product of arrays | |
// @takes N arrays -- arguments *must* be arrays | |
// @returns an array of X arrays of N elements, X being the product of the input arrays' lengths. | |
function cartesianProduct(...arrays) { | |
function _inner(...args) { | |
if (arguments.length > 1) { | |
let arr2 = args.pop(); // arr of arrs of elems | |
let arr1 = args.pop(); // arr of elems | |
return _inner(...args, |
This file contains 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
// Based on this gist: https://gist.github.com/ChrisJefferson/cb8db2a4c67a9506c56c | |
// JS Bin: https://jsbin.com/cefopi/edit?js,console | |
const cartesianProduct = (...rest) => | |
_.reduce((a, b) => | |
_.flatMap(x => | |
_.map(y => | |
x.concat([y]) | |
)(b) | |
)(a) | |
)([[]])(rest); |
This file contains 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
#!/bin/sh | |
# | |
# Run Check Only before commit. | |
RED='\033[0;31m' | |
if [ "$(git diff --cached | grep "+" | grep ".only")" != "" ]; then | |
echo "" | |
echo "${RED}COMMIT FAILED:" | |
echo "${RED}Some spec files have .only. Please remove only and try committing again." |
This file contains 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
# install Github Desktop to get their config | |
# then you can do this | |
# https://desktop.github.com/ | |
. (Resolve-Path "$env:LOCALAPPDATA\GitHub\shell.ps1") | |
# then install psget and install modules | |
# before putting these lines in here | |
# see https://github.com/psget/psget | |
Import-Module PowerLs |
This file contains 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
sourceSets { | |
main { | |
groovy { | |
// override the default locations, rather than adding additional ones | |
srcDirs = ['src/main/groovy', 'src/main/java'] | |
} | |
java { | |
srcDirs = [] // don't compile Java code twice | |
} | |
} |
This file contains 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
angular.module('hf.events.builder', [ | |
'app.resources', | |
'app.values' | |
]) | |
.factory('EventBuilder', function ($injector, $window, apiUrl) { | |
var EventBuilder = function EventBuilder(message) { | |
this['@timestamp'] = new Date(); | |
this['@message'] = message || ''; | |
return this; | |
}; |
This file contains 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
// [B](f: (A) ⇒ [B]): [B] ; Although the types in the arrays aren't strict (: | |
Array.prototype.flatMap = function(lambda) { | |
return Array.prototype.concat.apply([], this.map(lambda)); | |
}; |
This file contains 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 setjava() { | |
export JAVA_HOME=$(/usr/libexec/java_home -v $1) | |
} |
NewerOlder