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
#!/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
@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

@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 / 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 / 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

  1. Create a systemd service and a timer unit with the below contents
  2. The unit runs with the user so create the unit and timer under $HOME/.config/systemd/user/
  3. Enable the timer only (systemctl enable --user --now update-user-flatpaks.timer)
  4. Flatpaks will update automatically daily, if an update missed - cause the box was off for instance - it will try it again as soon as it can run again.

Contents of update-user-flatpaks.service:

[Unit]
Description=Update user Flatpaks
@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 / 00.howto_install_phantomjs.md
Created September 27, 2022 05:11 — forked from julionc/00.howto_install_phantomjs.md
How to install PhantomJS on Debian/Ubuntu

How to install PhantomJS on Ubuntu

Version: 1.9.8

Platform: x86_64

First, install or update to the latest system software.

sudo apt-get update
sudo apt-get install build-essential chrpath libssl-dev libxft-dev
@apinter
apinter / mongo_err.md
Created November 3, 2022 08:38
ansible mongo error
TASK [Ensure replicaset is stable before beginning] **************************************************************************************************************************************
task path: /var/home/attila.pinter/Project/maintenance/mongors_update/mongors_dup.yml:43
280366 1667462506.63087: sending task start callback
280366 1667462506.63095: entering _queue_task() for mongo-1/community.mongodb.mongodb_status
280366 1667462506.63103: Creating lock for community.mongodb.mongodb_status
280366 1667462506.63514: worker is 1 (out of 2 available)
280366 1667462506.63667: exiting _queue_task() for mongo-1/community.mongodb.mongodb_status
280366 1667462506.63876: getting variables
280366 1667462506.63900: in VariableManager get_vars()
@apinter
apinter / microos_selinux.md
Last active April 20, 2023 11:42
A list of booleans that are nice to have enabled on an SELinux system
sudo setsebool -P abrt_upload_watch_anon_write on
sudo setsebool -P auditadm_exec_content on
sudo setsebool -P boinc_execmem on
sudo setsebool -P cron_userdomain_transition on
sudo setsebool -P daemons_dontaudit_scheduling on
sudo setsebool -P dbadm_exec_content on
sudo setsebool -P domain_fd_use on
sudo setsebool -P entropyd_use_audio on
sudo setsebool -P fips_mode on