Skip to content

Instantly share code, notes, and snippets.

View Ivesvdf's full-sized avatar

Ives van der Flaas Ivesvdf

View GitHub Profile
@Ivesvdf
Ivesvdf / gist:0a2fa99bb582c5bd697e3e8e5823de07
Created February 8, 2023 18:40
Rsync flags for backup
rsync --no-g --no-p --no-o --chmod=ugo=rwX -rlt --progress --delete --exclude some_exclude $source $target
@Ivesvdf
Ivesvdf / gist:ffae5a8db9e542d9272e26f85b0cfb70
Created August 14, 2022 13:18
Template for docker compose files which does not create random bridge interfaces, specifies user for security and restarts always and uses the specified IP range
version: "3.9"
services:
grafana:
container_name: grafana
image: grafana/grafana-oss:9.0.6
volumes:
- ./grafana/etc:/etc/grafana:ro
- grafana-lib:/var/lib/grafana
- grafana-log:/var/log/grafana
@Ivesvdf
Ivesvdf / photonos-snmpv3.md
Last active June 25, 2022 15:21
SNMPv3 on PhotonOS

Note

Execute all commands as root

Install

tdnf install net-snmp net-snmp-devel net-snmp-perl

You will need all of them, otherwise you'll be missing scripts or MIBs.

@Ivesvdf
Ivesvdf / main.cpp
Created August 17, 2011 20:54
A performance comparison of linear access on std::list and std::vector
#include <list>
#include <vector>
#include <cmath>
#include <iostream>
#include "univhac.h"
int pow(int num, int exp)
{
int rv = 1;
for(int i = 0; i < exp; i++)
@Ivesvdf
Ivesvdf / gen_encpolygons.rb
Created August 4, 2011 10:56
Google Maps v3 country overlay from database
# Written by Florin Duroiu, see
# http://blog.newsplore.com/2009/03/01/political-boundaries-overlay-google-maps-2
#
# Fixed for Google Maps API v3 by Ives van der Flaas <ives.vdf@gmail.com>
# Be sure to add
#
# <script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=false"></script>
# <script type="text/javascript" src="http://maps.google.com/maps/api/js?libraries=geometry&sensor=false"></script>
#
# to the including HTML page or it will not work (the decode function for encoded coordinates is in the geometry library.)
@Ivesvdf
Ivesvdf / Findrsync.cmake
Created July 12, 2011 12:07
A CMake module script for including librsync
# Written by Ives van der Flaas <ives.vdf@gmail.com>, 2011
#
# License: Public domain.
#
# Defines
#
# RSYNC_INCLUDE_DIRS
# which contains the include directory for librsync.h
#
# RSYNC_LIBRARIES