Skip to content

Instantly share code, notes, and snippets.

@mosquito
mosquito / README.md
Last active June 15, 2024 20:26
Add doker-compose as a systemd unit

Docker compose as a systemd unit

Create file /etc/systemd/system/docker-compose@.service. SystemD calling binaries using an absolute path. In my case is prefixed by /usr/local/bin, you should use paths specific for your environment.

[Unit]
Description=%i service with docker compose
PartOf=docker.service
After=docker.service
@hansdg1
hansdg1 / gist:a2b6e683650381971e489512aff5b378
Created November 13, 2016 21:34
Check ubuntu/debian has a reboot pending. If so, print details
alias rbr2="if [ -f /var/run/reboot-required ]; then cat /var/run/reboot-required; echo -e 'Packages pending reboot:'; cat /var/run/reboot-required.pkgs | sed 's/^/ /' ; fi"
@robby1066
robby1066 / deal-with-me-google-apps-script.js
Last active March 20, 2021 22:14
A short Google Apps script that will label any starred items in your inbox that are older than 14 days with a "DEAL WITH ME" label. Go to https://developers.google.com/apps-script/reference/gmail/ for documentation.
/**
* Get the "DEAL WITH ME" label, or create it if it doesn't exist
* This is called by the other two functions, you shouldn't need to call it directly
*/
function _getNaggingLabel() {
/**
* If you'd like your label to say something different, modify it here
*/
var nagging_label_text = "DEAL WITH ME";