Skip to content

Instantly share code, notes, and snippets.

View apinter's full-sized avatar
🏠
Working from home

Attila Pinter apinter

🏠
Working from home
  • OpenStorage.xyz
  • Jakarta, Indonesia
View GitHub Profile
@apinter
apinter / gist:2a056b649a0d643575513a000cbbb2bf
Last active May 30, 2022 17:27
Automated download of rpm packages with systemd and zypper
  1. Create a systemd service and a timer unit with the below contents
  2. The units must run with root so create the units under /etc/systemd/system/
  3. Enable the timer only (systemctl enable --now zypper-dup-download-only.timer)
  4. Use zypper dup whenever you ready to update, packages will be cached daily by the units.

Contents of zypper-dup-download-only.service:

[Unit]
Description=Download available updates
@apinter
apinter / mongodb.md
Created May 4, 2022 08:42 — forked from mayhems1/mongodb.md
MongoDB cheat sheet

MongoDB cheatsheet

Replica Set

Perform Maintenance on Replica Set Members

@apinter
apinter / README.md
Created February 24, 2022 02:41 — forked from ryu1kn/README.md
Getting GCP access token from a service account key JSON file

Getting GCP access token from a service account key

Use your service account's key JSON file to get an access token to call Google APIs.

Good for seeing how things work, including the creation of JWT token.

To create a JWT token, you can replace create-jwt-token.sh script with tools like step.

If you just want to get an access token for a service account,

@apinter
apinter / tmux-cheatsheet.markdown
Created February 22, 2017 04:02 — forked from MohamedAlaa/tmux-cheatsheet.markdown
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@apinter
apinter / timelapse.md
Created November 30, 2016 03:26 — forked from porjo/timelapse.md
ffmpeg time-lapse

Convert sequence of JPEG images to MP4 video

ffmpeg -r 24 -pattern_type glob -i '*.JPG' -i DSC_%04d.JPG -s hd1080 -vcodec libx264 timelapse.mp4

  • -r 24 - output frame rate
  • -pattern_type glob -i '*.JPG' - all JPG files in the current directory
  • -i DSC_%04d.JPG - e.g. DSC_0397.JPG
  • -s hd1080 - 1920x1080 resolution

Slower, better quality

#!/bin/bash
# GUI-related packages
pkgs="
xserver-xorg-video-fbdev
xserver-xorg xinit
gstreamer1.0-x gstreamer1.0-omx gstreamer1.0-plugins-base
gstreamer1.0-plugins-good gstreamer1.0-plugins-bad gstreamer1.0-alsa
gstreamer1.0-libav
epiphany-browser