- I'd recommend sticking with es6 syntax (no async-await).
- Always consider throttling
- Try to make scripts atomically process data that fits the lambda time allotment
- Connections [DB] should be handled at the top most points and always wrapped in a function
- Scripts should always exit when done doing atomic work (dangling connections problem)
- Logging should be using a single/configurable handler (verbosity, cli, parsable)
- Logging should be done where you see neccesary but at a minimum at the tail end + top most point of the process for feedback on the atomic data processed (
then
andcatch
should be directly visible in the entry script) .then(fn)
- fn should either be stupidly simple or be extractable to the point of being able to be unit tested. The name should also be painfully obvious (reference)
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
export $(cat file.env | grep -v ^# | xargs); |
I hereby claim:
- I am kyleparisi on github.
- I am nargella (https://keybase.io/nargella) on keybase.
- I have a public key ASCpsO1L3z4WwOId8Z04PSXmQeCiPDgXmFyBs3kbG-OfYAo
To claim this, I am signing this object:
error TS1036: Statements are not allowed in ambient contexts
=== erronious semi colon (very human)
Doesn't actually make type safe code. If you do spread operators or destructuring you are doomed.
What would make typescript useful is if it removed the need for ternary statements for property accessors.
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
#!/bin/sh | |
### BEGIN INIT INFO | |
# Provides: hubot | |
# Required-Start: $all | |
# Required-Stop: $all | |
# Default-Start: 2 3 4 5 | |
# Default-Stop: 0 1 6 | |
# Short-Description: starts the hubot service | |
# Description: starts the Hubot bot with slack adapter |
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
handleChange(event) { | |
let value = event.target.value; | |
if (!value) { | |
this.setState({ value, data: this.props.data }); | |
return true; | |
} | |
// Let the search be async | |
// The the more the data is filtered the faster it will be |
class RenderItemWithKeyAndHandlers extends Component {
render() {
return this.props.renderListItem(this.props.data);
}
}
and then
docker run --name redis -p 6379:6379 -d redis
vi /etc/init.d/java-app
chmod +x /etc/init.d/java-app
/etc/init.d/java-app start
# reminder:
# chown -R www-data: /needed/paths
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
0 1 * * * [[ -e /var/run/docker.sock ]] && /usr/local/bin/docker system prune --force | |
0 2 * * * [[ -e /var/run/docker.sock ]] && /usr/local/bin/docker volume prune --force |