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
zfs set acltype=posixacl lxd |
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
# Forcefully remove images that don't have tags | |
docker rmi -f $(docker images | grep "<none>" | awk '{print $3}') | |
# Remove dead and exited containers | |
docker ps --filter status=dead --filter status=exited -aq \ | |
| xargs docker rm -v | |
# Remove images that have dependent children | |
docker image prune -a |
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
# set /etc/hosts to 10.0.2.2 first | |
VBoxManage list runningvms | |
VBoxManage modifyvm "VM name" --natdnshostresolver1 on |
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
find . -name "vendor" -type d -maxdepth 3 -exec vendor-prune {} \; | |
find . -name "node_modules" -type d -maxdepth 3 -exec node-prune {} \; |
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 |
docker run --name redis -p 6379:6379 -d redis
class RenderItemWithKeyAndHandlers extends Component {
render() {
return this.props.renderListItem(this.props.data);
}
}
and then
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 |
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 |