Skip to content

Instantly share code, notes, and snippets.

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

Achilleas Pipinellis axilleas

🏠
Working from home
View GitHub Profile
@sstratoti
sstratoti / baby_buddy.yaml
Created February 7, 2021 17:59
BabyBuddy Package
sensor:
- platform: rest
scan_interval: 15
name: BabyBuddy Feedings
resource: https://babybuddy.YOURDOMAIN.com/api/feedings/?limit=20
value_template: N/A
json_attributes:
- results
headers:
Authorization: !secret baby_buddy_token
@kabili207
kabili207 / Rclone systemd service.md
Last active April 20, 2024 15:54
Rclone systemd user service

rclone systemd service

Preparation

This service will use the same remote name you specified when using rclone config create. If you haven't done that yet, do so now.

Next, create the mountpoint for your remote. The service uses the location ~/mnt/<remote> by default.

mkdir ~/mnt/dropbox
@epcim
epcim / kubernetes_pods_docker_disk_usage.md
Last active January 22, 2024 03:57
docker disk space introspection kubernetes docker overlay

identify big pods/containers

investigage big files

DST=/mnt
find /var/lib -type f -size +1G -exec ls -lh {} \; | tee  $DST/bigfiles_var_lib_$(date "+%H%M").log
find /var/lib -type f -size +1G -exec ls -lh {} \; | awk '{ print $5 ": " $9 }' | sort -rh > $DST/bigfiles_var_lib_$(date "+%H%M").sorted.log

misbehave processes

@hitautodestruct
hitautodestruct / reset.md
Created July 17, 2018 12:58
Reset root password on scaleway.com
@woudsma
woudsma / portainer-dokku.md
Last active May 7, 2023 23:04
TLS secured TCP exposed Docker daemon on Dokku host - setup

TLS secured TCP exposed Docker daemon on Dokku host - setup

  1. Create certificates
  2. Edit Docker options
  3. Restart Docker
  4. Copy client certificates from host
  5. (optional) Add remote endpoint in Portainer

Tested on a standard $5/mo DigitalOcean VPS running Ubuntu 16.04.


#!/bin/bash
modprobe -r ec_sys
modprobe ec_sys write_support=1
on="\x8a"
off="\x0a"
led(){
echo -n -e $1 | dd of="/sys/kernel/debug/ec/ec0/io" bs=1 seek=12 count=1 conv=notrunc 2> /dev/null
@jesperronn
jesperronn / docx2md.md
Last active November 21, 2023 12:49 — forked from aembleton/docx2md.md
Convert a Word Document into MD

Converting a Word Document to Markdown in One Move

The Problem

A lot of important government documents are created and saved in Microsoft Word (*.docx). But Microsoft Word is a proprietary format, and it's not really useful for presenting documents on the web. So, I wanted to find a way to convert a .docx file into markdown.

Installing Pandoc

On a mac you can use homebrew by running the command brew install pandoc.

The Solution

@wvengen
wvengen / README.md
Last active March 25, 2024 07:53
Ruby memory analysis over time

Finding a Ruby memory leak using a time analysis

When developing a program in Ruby, you may sometimes encounter a memory leak. For a while now, Ruby has a facility to gather information about what objects are laying around: ObjectSpace.

There are several approaches one can take to debug a leak. This discusses a time-based approach, where a full memory dump is generated every, say, 5 minutes, during a time that the memory leak is showing up. Afterwards, one can look at all the objects, and find out which ones are staying around, causing the

@eluleci
eluleci / Dockerfile
Last active August 8, 2023 07:57
Dockerfile for Android CI
############################################################
# Dockerfile to build Android project and use Jenkins CI
#
############################################################
FROM ubuntu:14.04
MAINTAINER eluleci <emrullahluleci@gmail.com>
RUN apt-get update
@audy
audy / gist:52215fc35ac163006f42
Last active March 29, 2022 16:38
dokku postgresql rsync nightly backup

dokku postgresql rsync nightly backup

This is a rough guide to automating a nightly 7-day rolling remote backup of your PostgreSQL database(s) for your dokku app(s). There is a slight difference if you are using an older version of Dokku.

This will save the comprssed output of pg_dump as well as the contents of the /home directory on your dokku machine (just in case).

You will need to create a shell script in /root and edit the cron file.