Skip to content

Instantly share code, notes, and snippets.

View jaepetto's full-sized avatar

Emmanuel Jaep jaepetto

  • @epfl-ic-it
  • Lausanne
View GitHub Profile
@jaepetto
jaepetto / script.sh
Created July 9, 2021 11:48
Best shebang
#!/usr/bin/env bash
@jaepetto
jaepetto / ansiblePull.service
Created July 8, 2021 13:20
Sample systemd timer unit to run ansible-pull every 30 minutes
[Unit]
Description=Runs ansible-pull to get common server configuration
Wants=ansiblePull.timer
[Service]
Type=oneshot
ExecStart=/usr/bin/ansible-pull -U https://github.com/<username>/<repo_name>.git --accept-host-key -i hosts --vault-password-file /root/.vault_password
[Install]
WantedBy=multi-user.target
@jaepetto
jaepetto / main.py
Created May 24, 2021 08:48
Querying and pushing data from Python to Google Sheets
import arrow
import gspread
from oauth2client.service_account import ServiceAccountCredentials
import settings
def get_client():
"""Return a Google client API object

Keybase proof

I hereby claim:

  • I am jaepetto on github.
  • I am jaep (https://keybase.io/jaep) on keybase.
  • I have a public key ASAjXvzlDAwGR6CpHiYZbb5OXyb1SLQFdh9aKwlIArRzdAo

To claim this, I am signing this object: