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
sudo !! |
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
echo “Hello World” | pbcopy |
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
mkdir my-new-dialogue && cd $_ |
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
// shorthand for result that is a promise | |
it(() => { | |
return expect(result) | |
.to.eventually.deep.equal({url, options}) | |
}) | |
// ... longhand, which handles multiple promises in a test, and is | |
// easier to debug (by inserting console.log in then handler) | |
it(() => { | |
return Promise.all([ |
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
echo '1 | |
2 | |
3 | |
4 | |
LOG: 5 | |
6 | |
LOG: 7' | tee >(grep LOG | sed 's/LOG: //' > tmp.txt) |
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
// Don't use fat arrow functions as props in pure components, use a named function instead e.g. | |
export const ChoiceKey = (props: Props) => { | |
const keyClickHandler = () => { | |
props.keyClick(props.id) | |
} | |
return <div className={classes.choiceKey} | |
onClick={keyClickHandler}>Choice Key {props.id}</div> | |
} |
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
{} |
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
// Get the Arn from a resource | |
"Principal": { | |
"AWS": { "Fn::GetAtt": [ "BarbaraBossUser", "Arn" ] } | |
}, |
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
{ | |
"AWSTemplateFormatVersion": "2010-09-09", | |
"Resources": { | |
"BossRole" : { | |
"Type": "AWS::IAM::Role", | |
"Properties": { | |
"RoleName": "BossRole", | |
"AssumeRolePolicyDocument": { | |
"Version" : "2012-10-17", | |
"Statement": [ { |
OlderNewer